Closed eoeoms closed 1 year ago
Thanks @eoeoms for the feature request. This would be a request for the Lambda team, as they own the UpdateFunctionCode API. I'll go ahead and transfer this issue to our cross-SDK repository and reach out to the Lambda team for further review.
P84820090
I was advised that a support case was created for this. We can continue tracking the request via that ticket.
This issue is now closed.
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 the feature
aws lambda publish-version
supports the--description
option to override the description in the function configuration.However, for
aws lambda update-function-code
command, while it supports the--publish
option to publish a new version of the function after updating the code, (which has the same effect as calling PublishVersion separately) there's no way to provide the version description for overriding the description in the function configuration. It'll always just use the description of the function as the version description.It'd be nice to be able to provide a version description when running
aws lambda update-function-code
with the--publish
option.Use Case
This is related to aws/aws-cli#6585.
I was also running the
aws lambda update-function-code
andaws lambda publish-version
back to back in my CI/CD pipeline, which sometimes failed because the previous update didn't complete yet.I fully understand why this is happening, and some ways to properly get around it, (like checking for the
LastUpdateStatus
of the function usingaws lambda get-function
oraws lambda get-function-configuration
before making another update) but I just thought it'd be nice if I didn't have to implement any extra logic to wait until the previous update is completed, especially since aws cli already supports updating the function code and publishing a version with a single command that presumably handles checking for theLastUpdateStatus
under the hood.Proposed Solution
Add support for
--description
option to theaws lambda update-function-code
command that works similarly to that of theaws lambda publish-version
command.Other Information
Technically, for my use case, adding a feature to the
aws lambda update-function-code
command where users can provide it an option to make the command complete the execution only when theLastUpdateStatus
changes toSuccessful
orFailed
would work out too.And this alternative solution could be a more versatile solution that can also be applied to any of the other commands that updates a function, like
update-function-configuration
andpublish-version
.Acknowledgements
CLI version used
2.11.6
Environment details (OS name and version, etc.)
Windows