Skip to content
This repository was archived by the owner on Jan 28, 2025. It is now read-only.
This repository was archived by the owner on Jan 28, 2025. It is now read-only.

The ap-east-1 location constraint is incompatible for the region specific endpoint this request was sent to. #2041

@hotlong

Description

@hotlong

Issue Summary

No code changed, but deploy failed in this week, It's ok 10 days ago. I wonder if it is because of bucketRegion

bucketRegion: ap-east-1

Actual behavior

deploy failed

Expected behavior

deploy success

Steps to reproduce

Screenshots/Code/Configuration/Logs

Full log at https://github.com/steedos/steedos.com/runs/4208662248?check_suite_focus=true

DEBUG ─ Starting deployment of CloudFront distribution to the us-east-1 region.
DEBUG ─ Updating CloudFront distribution of ID E1ONY9MU8PSX1R.
error:
  IllegalLocationConstraintException: The ap-east-1 location constraint is incompatible for the region specific endpoint this request was sent to.
    at Request.extractError (/Users/steedos/.serverless/components/registry/npm/@sls-next/serverless-component@3.6.0/node_modules/@sls-next/aws-cloudfront/node_modules/aws-sdk/lib/services/s3.js:699:35)
    at Request.callListeners (/Users/steedos/.serverless/components/registry/npm/@sls-next/serverless-component@3.6.0/node_modules/@sls-next/aws-cloudfront/node_modules/aws-sdk/lib/sequential_executor.js:106:20)
    at Request.emit (/Users/steedos/.serverless/components/registry/npm/@sls-next/serverless-component@3.6.0/node_modules/@sls-next/aws-cloudfront/node_modules/aws-sdk/lib/sequential_executor.js:78:10)
    at Request.emit (/Users/steedos/.serverless/components/registry/npm/@sls-next/serverless-component@3.6.0/node_modules/@sls-next/aws-cloudfront/node_modules/aws-sdk/lib/request.js:686:14)
    at Request.transition (/Users/steedos/.serverless/components/registry/npm/@sls-next/serverless-component@3.6.0/node_modules/@sls-next/aws-cloudfront/node_modules/aws-sdk/lib/request.js:22:10)
    at AcceptorStateMachine.runTo (/Users/steedos/.serverless/components/registry/npm/@sls-next/serverless-component@3.6.0/node_modules/@sls-next/aws-cloudfront/node_modules/aws-sdk/lib/state_machine.js:14:12)
    at /Users/steedos/.serverless/components/registry/npm/@sls-next/serverless-component@3.6.0/node_modules/@sls-next/aws-cloudfront/node_modules/aws-sdk/lib/state_machine.js:26:10
    at Request.<anonymous> (/Users/steedos/.serverless/components/registry/npm/@sls-next/serverless-component@3.6.0/node_modules/@sls-next/aws-cloudfront/node_modules/aws-sdk/lib/request.js:38:9)
    at Request.<anonymous> (/Users/steedos/.serverless/components/registry/npm/@sls-next/serverless-component@3.6.0/node_modules/@sls-next/aws-cloudfront/node_modules/aws-sdk/lib/request.js:688:12)
    at Request.callListeners (/Users/steedos/.serverless/components/registry/npm/@sls-next/serverless-component@3.6.0/node_modules/@sls-next/aws-cloudfront/node_modules/aws-sdk/lib/sequential_executor.js:116:18)
    at Request.emit (/Users/steedos/.serverless/components/registry/npm/@sls-next/serverless-component@3.6.0/node_modules/@sls-next/aws-cloudfront/node_modules/aws-sdk/lib/sequential_executor.js:78:10)
    at Request.emit (/Users/steedos/.serverless/components/registry/npm/@sls-next/serverless-component@3.6.0/node_modules/@sls-next/aws-cloudfront/node_modules/aws-sdk/lib/request.js:686:14)
    at Request.transition (/Users/steedos/.serverless/components/registry/npm/@sls-next/serverless-component@3.6.0/node_modules/@sls-next/aws-cloudfront/node_modules/aws-sdk/lib/request.js:22:10)
    at AcceptorStateMachine.runTo (/Users/steedos/.serverless/components/registry/npm/@sls-next/serverless-component@3.6.0/node_modules/@sls-next/aws-cloudfront/node_modules/aws-sdk/lib/state_machine.js:14:12)
    at /Users/steedos/.serverless/components/registry/npm/@sls-next/serverless-component@3.6.0/node_modules/@sls-next/aws-cloudfront/node_modules/aws-sdk/lib/state_machine.js:26:10
    at Request.<anonymous> (/Users/steedos/.serverless/components/registry/npm/@sls-next/serverless-component@3.6.0/node_modules/@sls-next/aws-cloudfront/node_modules/aws-sdk/lib/request.js:38:9)
    at Request.<anonymous> (/Users/steedos/.serverless/components/registry/npm/@sls-next/serverless-component@3.6.0/node_modules/@sls-next/aws-cloudfront/node_modules/aws-sdk/lib/request.js:688:12)
    at Request.callListeners (/Users/steedos/.serverless/components/registry/npm/@sls-next/serverless-component@3.6.0/node_modules/@sls-next/aws-cloudfront/node_modules/aws-sdk/lib/sequential_executor.js:116:18)
    at callNextListener (/Users/steedos/.serverless/components/registry/npm/@sls-next/serverless-component@3.6.0/node_modules/@sls-next/aws-cloudfront/node_modules/aws-sdk/lib/sequential_executor.js:96:12)
    at IncomingMessage.onEnd (/Users/steedos/.serverless/components/registry/npm/@sls-next/serverless-component@3.6.0/node_modules/@sls-next/aws-cloudfront/node_modules/aws-sdk/lib/event_listeners.js:335:13)
    at IncomingMessage.emit (events.js:327:22)
    at IncomingMessage.EventEmitter.emit (domain.js:467:12)
    at endReadableNT (internal/streams/readable.js:1327:12)
    at processTicksAndRejections (internal/process/task_queues.js:80:21) {
  code: 'IllegalLocationConstraintException',
  region: null,
  time: 2021-11-15T07:41:34.152Z,
  requestId: '14PJYA3P89S8W1F4',
  extendedRequestId: 'OX21IgjW3T3FboRxk6i4WPG4dCrvAcdaamKROIZLk4oY/3pvEoeH5AOg1e6HNYHK8+39y5B3js8=',
  cfId: undefined,
  statusCode: 400,
  retryable: false,
  retryDelay: 111.14701201747681
}

Versions

I've tried 3.4.0, 3.5.0, 3.6.0

  • OS/Environment: Github Actions
  • @sls-next/serverless-component version: 3.6
  • Next.js version: 14

Additional context

Checklist

  • You have reviewed the README and FAQs, which answers several common questions.
  • You have reviewed our DEBUGGING wiki and have tried your best to include complete information and reproduction steps (including your configuration) as is possible. As there is only one maintainer (who maintains this in his free time) and thus very limited resources, if you have time, please try to debug the issue a bit yourself if possible.
  • You have first tried using the most recent latest or alpha @sls-next/serverless-component release version, which may have already fixed your issue or implemented the feature you are trying to use. Note that the old serverless-next.js component and the serverless-next.js plugin are deprecated and no longer maintained.

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