Closed bsmitches closed 9 months ago
Thanks for reporting this. I believe this is the same as (or very similar to) https://github.com/aws-amplify/amplify-backend/issues/965
I left a comment on that other issue to also note that we need to use the same env var resolution for amplify sandbox secret
commands. Closing this issue in favor of that one.
Environment information
Description
I use
us-east-1
for my workloads (defined in my environment variable). When usingnpx amplify sandbox secret set <name>
, these secrets are always put inus-west-2
(set in CLI Profile Config), resulting in an error when runningnpx amplify sandbox
, which usesus-east-1
(set inAWS_DEFAULT_REGION
).This results in a deployment error when CloudFormation can't resolve secret in other region using
Replication steps
us-west-2
export AWS_DEFAULT_REGION=us-east-1
npx amplify sandbox secret set foo
(puts secret inus-west-2
)npx amplify sandbox secret get foo
(retrieves secret fromus-west-2
)aws ssm describe-parameters --query "Parameters[].Name"
(retrieves parameters fromus-east-1
)aws ssm describe-parameters --query "Parameters[].Name" --region us-west-2
npx amplify sandbox
tries to deploy inus-east-1
but fails with below error