jetbridge/lemmy-cdk

can not change region.

Closed this issue · 1 comments

Yornik commented

If I change the region in the .env.local i get this error

❯ cdk bootstrap
dotenv-flow: "AWS_REGION" is already defined in `process.env` and will not be overwritten

/Users/git_repos/github/lemmy-cdk/node_modules/@aws-cdk/aws-cloudfront/lib/distribution.ts:263
  private renderCacheBehaviors(): CfnDistribution.CacheBehaviorProperty[] | undefined {
              ^
Error: Distribution certificates must be in the us-east-1 region and the certificate you provided is in eu-central-1.
    at new Distribution (/Users/git_repos/github/lemmy-cdk/node_modules/@aws-cdk/aws-cloudfront/lib/distribution.ts:263:15)
    at new SiteCDN (/Users/git_repos/github/lemmy-cdk/lib/cdn.ts:66:25)
    at new Stack (/Users//git_repos/github/lemmy-cdk/lib/stack.ts:52:17)
    at Object.<anonymous> (/Users//git_repos/github/lemmy-cdk/bin/cdk.ts:18:1)
    at Module._compile (node:internal/modules/cjs/loader:1233:14)
    at Module.m._compile (/Users//git_repos/github/lemmy-cdk/node_modules/ts-node/src/index.ts:1056:23)
    at Module._extensions..js (node:internal/modules/cjs/loader:1287:10)
    at Object.require.extensions.<computed> [as .ts] (/Users/git_repos/github/lemmy-cdk/node_modules/ts-node/src/index.ts:1059:12)
    at Module.load (node:internal/modules/cjs/loader:1091:32)
    at Function.Module._load (node:internal/modules/cjs/loader:938:12)

Subprocess exited with error 1

I only have access to eu-central-1 so I was wondering is this a bug or a user error

Yornik commented

This was an error on my side I just needed to create a certificate in that region