Skip to content

stacks which use EdgeFunctions must have an explicitly set region #1725

Closed as not planned
@rnrnstar2

Description

@rnrnstar2

Environment information

System:
  OS: macOS 12.7.3
  CPU: (4) x64 Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz
  Memory: 40.34 MB / 8.00 GB
  Shell: /bin/zsh
Binaries:
  Node: 20.14.0 - ~/.nvm/versions/node/v20.14.0/bin/node
  Yarn: undefined - undefined
  npm: 10.7.0 - ~/.nvm/versions/node/v20.14.0/bin/npm
  pnpm: undefined - undefined
NPM Packages:
  @aws-amplify/backend: 1.0.0
  @aws-amplify/backend-cli: 1.0.1
  aws-amplify: 6.3.8
  aws-cdk: Not Found
  aws-cdk-lib: Not Found
  typescript: 5.4.5
AWS environment variables:
  AWS_PROFILE = rnrnstar-us
  AWS_STS_REGIONAL_ENDPOINTS = regional
  AWS_NODEJS_CONNECTION_REUSE_ENABLED = 1
  AWS_SDK_LOAD_CONFIG = 1
No CDK environment variables

Description

I tried to create an EdgeFunction with cdk, but the following error occurred because backend.createStack does not allow you to set the region.

Unable to build the Amplify backend definition.

Caused By: Error: stacks which use EdgeFunctions must have an explicitly set region
at EdgeFunction.createCrossRegionFunction (/Users/suzumuradaichi/github/MiracleLinkMaker/node_modules/aws-cdk-lib/aws-cloudfront/lib/experimental/edge-function.js:1:7079)

Resolution: Check your backend definition in the amplify folder for syntax and type errors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    pending-triageIncoming issues that need categorization

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions