Skip to content

Deploy to cross regions S3 got error IllegalLocationConstraintException #74

Description

@chaintng

Describe the bug
Error due to S3 region constraints

INFO	APPLICATION ERROR Error downloading original image
INFO	IllegalLocationConstraintException: The ap-southeast-7 location constraint is incompatible for the region specific endpoint this request was sent to.
    at throwDefaultError (/var/runtime/node_modules/@aws-sdk/node_modules/@smithy/smithy-client/dist-cjs/index.js:422:20)
    at /var/runtime/node_modules/@aws-sdk/node_modules/@smithy/smithy-client/dist-cjs/index.js:431:5
    at de_CommandError (/var/runtime/node_modules/@aws-sdk/client-s3/dist-cjs/index.js:5202:14)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async /var/runtime/node_modules/@aws-sdk/node_modules/@smithy/middleware-serde/dist-cjs/index.js:36:20
    at async /var/runtime/node_modules/@aws-sdk/middleware-sdk-s3/dist-cjs/index.js:488:18
    at async /var/runtime/node_modules/@aws-sdk/node_modules/@smithy/middleware-retry/dist-cjs/index.js:312:38
    at async /var/runtime/node_modules/@aws-sdk/middleware-sdk-s3/dist-cjs/index.js:110:22
    at async /var/runtime/node_modules/@aws-sdk/middleware-sdk-s3/dist-cjs/index.js:137:14

..

Since Lambda Webhook URL is not available in ap-southeast-7 yet

I have to deploy to ap-southeast-1, but the code assume S3 to be in the same region

I hard code my S3 Region and it work now.

I haven't check how to link this with cdk deploy et since i don't have knowledge much

just share here so maybe someone can quickly fix the lambda script

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions