When creating an application that has a publish section in the manifest file, an SNS Topic will be created when you deploy your application and according to the documentation the ARN of the newly created SNS Topic(s) will be injected into your task environment in the COPILOT_SNS_TOPIC_ARNS variable.
So, in my application, I am using two separate accounts. I ran my initial copilot init for my app using what I'll call the prod account, but have a separate environment in another account that we'll call nonprod.
Right now, when deploying my application to my nonprod environment/account, while building the ARN for the SNS Topic it is hardcoding the Account ID from the prod account. In my cloudformation template you see (using fake account IDs):
- Name: COPILOT_SNS_TOPIC_ARNS
Value: '{"readyForProcessing":"arn:aws:sns:us-east-1:111111111prod:pf-athena-nonprod-ingest-readyForProcessing"}'
However, I would expect to see:
- Name: COPILOT_SNS_TOPIC_ARNS
Value: '{"readyForProcessing":"arn:aws:sns:us-east-1:22222222nonprod:pf-athena-nonprod-ingest-readyForProcessing"}'
Or maybe even (I think this is the better way to do it):
- Name: COPILOT_SNS_TOPIC_ARNS
Value: !Sub '{"readyForProcessing":"arn:aws:sns:us-east-1:${AWS::AccountId}:pf-athena-nonprod-ingest-readyForProcessing"}'
I'm using the latest release (v1.11.0)
When creating an application that has a
publishsection in the manifest file, an SNS Topic will be created when you deploy your application and according to the documentation the ARN of the newly created SNS Topic(s) will be injected into your task environment in theCOPILOT_SNS_TOPIC_ARNSvariable.So, in my application, I am using two separate accounts. I ran my initial
copilot initfor my app using what I'll call the prod account, but have a separate environment in another account that we'll call nonprod.Right now, when deploying my application to my nonprod environment/account, while building the ARN for the SNS Topic it is hardcoding the Account ID from the prod account. In my cloudformation template you see (using fake account IDs):
However, I would expect to see:
Or maybe even (I think this is the better way to do it):
I'm using the latest release (
v1.11.0)