#✅ - Deployment error related to CDK bucket permissions

3 messages · Page 1 of 1 (latest)

crimson bough
#

Hi there! I'm experiencing an AWS Amplify deployment error related to CDK bucket permissions. My build is failing with the following error:

"Bucket named 'cdk-#####-assets-#####-eu-central-1' exists, but not in account #####. Wrong account?"

Important details:

  • The bucket definitely exists in the correct AWS account (#####)
  • This was working perfectly until recent changes involving environment variables
  • I'm using Next.js with AWS Amplify Gen 2
  • The error occurs during the build phase during deployment.

I've verified:

  1. The S3 bucket exists in the correct account
  2. The deployment is targeting the correct region (eu-central-1)
  3. The AWS credentials being used are for the correct account

Any guidance on resolving this CDK deployment error would be greatly appreciated!

crimson bough
#

✅ Just auto-solved the problem:

The root cause was environment variables I added for Amazon SES (which is in eu-west-1) while my Amplify project is deployed in eu-central-1. Adding environment variables like AMAZON_REGION=eu-west-1 for SES actually conflicted with Amplify's deployment region.

Solution: Instead of using generic AWS environment variables, prefix them specifically for SES:

❌ Don't use:
AMAZON_REGION=eu-west-1

✅ Use instead:
SES_REGION=eu-west-1

Hope this helps anyone running into similar region conflicts when integrating SES!

ember crescentBOT
#

✅ - Deployment error related to CDK bucket permissions