Description
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
Parameters:
Stage:
Type: String
Description: Stage Name
Default: develop
use parameter in API Gateway creation
ProfileAPIGateway:
Type: AWS::Serverless::Api
Properties:
GatewayResponses:
DEFAULT_4XX:
ResponseParameters:
Headers:
Access-Control-Allow-Origin: "'*'"
Name: !Ref ApisApi
StageName: !Ref Stage
...
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"
]
}