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
Add option to override resolve_s3 from samconfig #6899
Comments
Thanks for opening this feature request. It looks like the inverse of the flag needs to be configured (ie. In the mean time, I'm going to mark this as a good first issue for folks that wanted to contribute to this project. |
@lucashuy I would like to contribute this issue. I'm having doubt that new option
am i right here ? |
Hi @nitintecg, this would actually be something that is changed in the existing aws-sam-cli/samcli/commands/_utils/experimental.py Lines 187 to 196 in c6b1155
Since |
The place where we define our aws-sam-cli/samcli/commands/_utils/options.py Lines 739 to 748 in 0849b2a
The changes here should be adding the inverse to the flag, and updating/adding any new unit tests to validate that the new inverse doesn't break anything. Integration tests that actually deploy resources can be run too, but incurs any related AWS costs. The team can help out with running or writing these tests when you're ready for that. |
Describe your idea/feature/enhancement
If samconfig sets
resolve_s3
there is no way to override this setting using command line arguments. There should be the option to clear this flag using the command line arguments so that--s3-bucket
can be used instead when needed.Proposal
Add the option to pass
--resolve-s3 false
on the CLI which would be the equivalent of not setting--resolve-s3
at all.Additional Details
We try to setup our projects so that developers can stand up our applications in their own sandbox accounts with same settings that our CI builds use when deploying to production environments. samconfig has been very useful for that as we can move most of the CLI arguments to configuration that is checked into git. Developers deploying to their test environments can then simply run
sam deploy
without needing to copy and paste a bunch of CLI arguments.The issue we are running into is that for developer environments, using
resolve_s3
in samconfig works great and automatically detects the SourceBucket from the aws-sam-cli-managed-default stack. But in our CI pipelines, we are using the user and role generated fromsam pipeline bootstrap
which has its own artifact bucket and does not have permissions to the bucket in aws-sam-cli-managed-default. This means we need to specify--s3-bucket
in the CI environments. But because--resolve-s3
is a flag, it can not be unset and using--s3-bucket
throws an error since resolve-s3 and s3-bucket are mutually exclusive.The work around is fairly minor. Just don't include resolve_s3 in samconfig and require developers include it as a command line argument when running sam. But it would be nice if everything set in samconfig could be overridden by the CLI arguments when needed.
The text was updated successfully, but these errors were encountered: