-
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
Bug: sam deploy --guided doesn't remove conflicting properties #4841
Comments
This is fixed by the latest release 1.78.0 Please have a look! Feel free to re-open if there are other issues regarding this! |
|
@qingchm
|
version: 0.2 Running command sam package --s3-bucket ${TESTING_ARTIFACT_BUCKET} --region ${TESTING_REGION} --output-template-file packaged-test.yaml Cannot use both --resolve-s3 and --s3-bucket parameters. Please use only one. |
Reopening the issue for investigation |
|
Description:
When running a guided deployment and saving the parameters back to a
samconfig.toml
that already includes aresolve_s3=true
option, the S3 bucket option is also added, making the nextsam deploy
without a guided flag fail.Steps to reproduce:
sam init
.sam build
sam deploy --guided
and ensure to save to asamconfig.toml
filesam deploy
again without the --guided flagObserved result:
Error message about conflicting arguments
Error: Cannot use both --resolve-s3 and --s3-bucket parameters in non-guided deployments. Please use only one or use the --guided option for a guided deployment.
Expected result:
Deploy should succeed.
The issue seems to be that when writing to the config file, the
resolve_s3=true
option isn't cleaned up even though AWS SAM CLI creates a managed bucket and uses that bucket for subsequent deployments.The fix is adding a step here: https://github.com/aws/aws-sam-cli/blob/develop/samcli/commands/deploy/guided_config.py#L66 to remove these kinds of conflicting parameters before flushing the config.
The text was updated successfully, but these errors were encountered: