-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Translator Wrapper defaults to us-east-1
for SAR applications
#2065
Comments
Does is work when using
|
It does not. I think the SAMTranslatorWrapper fills the pseudo params like |
I have this exact same issue on the same OS :(. Is there a fix on its way? |
https://github.com/awslabs/aws-sam-cli/blob/23212ef827a105d23339712adc9422c6cc55e12c/samcli/lib/providers/sam_base_provider.py#L161 seems to be the line in question. This behavior is intentional, even with AccountId being dummy ones instead of inferencing from local creds. Is it just region that seems to be causing this issue or any other intrinsics as well? |
|
Just kidding, I modified the wrong template when manually testing, switching it to:
fails but with |
https://github.com/awslabs/serverless-application-model/blob/develop/samtranslator/plugins/application/serverless_app_plugin.py#L129 seems to be where the ApplicationId transformed to The dict of params passed into the translator transforms This works fine if I just do |
fix is released, I verified it using sam version |
|
Description
sam build
does not replace the region properly when transforming the template. The region is defined asus-east-1
and that is the region used on transform in SamTranslatorWrapper regardless ofAWS_DEFAULT_REGION
,.aws/config
, or region flag valuesSteps to reproduce
Reproduction repo: https://github.com/NathanYocum/sam-sar-bug (requires changing account id's and an s3 bucket in us-east-1 and us-east-2).
Observed result
Command:
AWS_DEFAULT_REGION=us-east-2 sam build --debug
Full output:
I was able to fix this by adding
to https://github.com/awslabs/aws-sam-cli/blob/develop/samcli/lib/samlib/wrapper.py#L40 but I'm sure the region in context is encapsulated somewhere else better for a solution.
Expected result
Build/Deploy succeeds in us-east-2 and other regions aside from us-east-1
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
sam --version
: 0.53.0 (tried both the pip and brew versions to no success)The text was updated successfully, but these errors were encountered: