-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Bug: Using a Ref in StageName is Not Working Properly - Template.yaml #3548
Comments
Thanks for reporting this issue. I can reproduce the behaviour you see with the stage name reference. This is due to how we treat and resolve intrinsics, and in this case SAM does not resolve the serverless-application-model/samtranslator/model/eventsources/push.py Lines 734 to 740 in e302b20
Let me transfer this to over to the SAM repo in case the folks there have anymore insight. |
Thanks @Jonathynlee for raising this issue. You can update your template, and replace
with
|
@moelasmar |
This issue is now closed. Comments on closed issues are hard for our team to see. |
Description:
In template.yaml, I am using a parameter reference for StageName. When I go to build and deploy my sam application, it is replaced with "Stage". If I pass the string in directly there are no issues.
Steps to reproduce:
create parameter
use parameter in API Gateway creation
Please note the "StageName: !Ref Stage"
Observed result:
The incorrect StageName is being used
Expected result:
Logical resource Ids should all have "develop" at the end, not "Stage"
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
{
"version": "1.105.0",
"system": {
"python": "3.11.4",
"os": "Windows-10-10.0.19045-SP0"
},
"additional_dependencies": {
"docker_engine": "Not available",
"aws_cdk": "Not available",
"terraform": "Not available"
},
"available_beta_feature_env_vars": [
"SAM_CLI_BETA_FEATURES",
"SAM_CLI_BETA_BUILD_PERFORMANCE",
"SAM_CLI_BETA_TERRAFORM_SUPPORT",
"SAM_CLI_BETA_RUST_CARGO_LAMBDA"
]
}
The text was updated successfully, but these errors were encountered: