-
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
SAM build not honouring --profile or --region #5390
Comments
Thanks for your report! sam build calls through to Agreed on build not throwing a stack-trace. |
PR has been merged to |
Patch is released in v1.90.0. Closing |
Re-opening this issue as new version of SAMT have not been released yet |
Patch is released in v1.91.0. Closing |
Description:
SAM build will not use a profile or region passed in on the command line, the SAM build command requires these parameters to be setup as env variables or as defaults in the .aws/config file
Steps to reproduce:
Install the latest version of SAM
create a template containing a Type: AWS::Serverless::Application resource
remove any environment variables or defaults in the .aws/config file
run sam build --profile [profilename]
OR
run sam build --region [regionname]
Observed result:
Build fails
Expected result:
Build should succeed
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
{
"version": "1.84.0",
"system": {
"python": "3.8.17",
"os": "macOS-12.3-arm64-arm-64bit"
},
"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"
]
}
sam --version
: 1.84.0I believe the bug is in this line of code-
https://github.com/aws/serverless-application-model/blob/23a882bc405cd598c8ae330a470116864485ad8f/samtranslator/region_configuration.py#L52
This bug shows that the test environment is either using seeded data or the test suites are incomplete
The text was updated successfully, but these errors were encountered: