Closed drumadrian closed 1 year ago
Thanks for the feature request. you should be able to have multiple values in your samconfig.toml file this way right now, but i have tagged this issue as feature request. 👍
version = 0.1
[default]
[default.deploy]
[default.deploy.parameters]
capabilities = "CAPABILITY_IAM CAPABILITY_NAMED_IAM"
Thank you @sriram-mv
I was able to use that approach to have multiple values in my samconfig.toml file
Screenshot:
Hi sriram-mv@
I added a PR for the documentation as it is not clear; however, I would recommend updating the documentation once this feature is released.
Also there seems to be no way to specify multiple capacities using cli args.
I think changing the default option behaviour would be a breaking change for many so instead of a feature request I think this should be a UX change request. Multiple values for capabilities for both toml and cli arg are realized by having a long string with values separated by space like: capabilities = "CAPABILITY_IAM CAPABILITY_NAMED_IAM". I think this is still a relevant request since the doc and the help text doesn't mention this.
Hi @qingchm,
That sounds good. I hope we can find a way to implement this change without breaking anyone's code.
Maybe a warning from the CLI could help.
Thanks for looking into this 🤓
My pleasure!
[default.deploy]
[default.deploy.parameters]
capabilities = ["CAPABILITY_IAM", "CAPABILITY_NAMED_IAM"]
resolve_s3 = true
On further investigation, above seems to work. Is this something that you are still running into?
Hey @sriram-mv 🤓
This request has been open for a while so I think the context of my original request is expired.
I don't use the Serverless Application Model (SAM) anymore, so can't say if this is still an issue. I was able to use your help in May 2022 to specify multiple values so I updated this request and finished my project.
I think the request can be closed if all possible valid expressions of multiple capabilities are working:
For example:
capabilities = [ "CAPABILITY_IAM", "CAPABILITY_AUTO_EXPAND" ]
Also, @qingchm discovered the risk of a breaking change to address this issue. @qingchm may have some good input on the current risks with this type of change.
Thank you for helping with this request. I sincerely appreciate that Amazonians try their best to follow up on customer requests. Let me know if you need anything else. I don't mind jumping on a Chime call.
Take care,
Adrian
@drumadrian Trying to parse through some of our older issues. I think this was solved in https://github.com/aws/aws-sam-cli/commit/164747650d6b2c776d5a94032e74f09ca17393a7 (looking at the tests) but trying to verify that.
Thanks for submitting it the initial request!
Checked with the team! Yes, we can finally close this one out!
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.
Describe your idea/feature/enhancement:
The samconfig.toml file allows specifying capabilities like this:
capabilities = "CAPABILITY_IAM"
This documentation page explains that SAM uses TOML: https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-config.html
Proposal:
The TOML documentation shows that TOML arrays are expressed like this:
The SAM TOML file should allow this as a valid expression of multiple capabilities:
capabilities = [ "CAPABILITY_IAM", "CAPABILITY_AUTO_EXPAND" ]
Additional Details:
Thank you for considering this feature