Skip to content

S3 Client - listObjectsV2 - MethodNotAllowed - POST #75

@stackops-ngin

Description

@stackops-ngin

Minimal test of

import { fromNodeProviderChain } from "@aws-sdk/credential-providers"
import { Console, Effect } from "effect"
import { S3 } from "itty-aws/s3"

const credentials = await fromNodeProviderChain()()

const s3 = new S3({ region: "ap-southeast-2", credentials })
const program = Effect.gen(function*() {
  const ls = yield* s3.listObjectsV2({ Bucket: "itty-aws-smoke-test-1759052254355-utxkkz" })
  yield* Console.log("Ls:", ls)
})

void Effect.runPromise(program)

results in...

node:internal/process/promises:394
    triggerUncaughtException(err, true /* fromPromise */);
    ^

UnknownError: <?xml version="1.0" encoding="UTF-8"?>
<Error>
    <Code>MethodNotAllowed</Code>
    <Message>The specified method is not allowed against this resource.</Message>
    <Method>POST</Method>
    <ResourceType>SERVICE</ResourceType>
    <RequestId>PS5D7ZJVV7R91X5G</RequestId>
    <HostId>MK/Q0FqEygTJrpPXI4UiiWgv734uItdxDePfJY/6/W5om7ONv0pY9v4Auq5dkwpXeu6v9vtTqyw=</HostId>
</Error>  at createServiceError

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions