(CLI): hotswapping should wait for Lambda's `updateFunctionCode` operation to complete
See original GitHub issueDescription
Right now, when hotswapping Lambda code, we don’t wait for the updateFunctionCode
API call we make to complete.
However, according to the documentation, this operation is actually eventually consistent today for Lambda functions that use Docker images, or are present in a VPC, and, even more importantly, this API will become eventually consistent for all Functions starting February 1, 2022.
We need to change our logic to wait for the operation to complete.
While implementing this, we should be cognizant of making sure we wait as effectively as possible, to not affect Lambda hotswap times too adversely. The simplest solution might be to use the standard Lambda waiter, that we use if we need to publish a new Version. Perhaps we can use a custom Waiter for this purpose, like we do for ECS service hotswapping.
Thanks a lot to @tmokmss who figured out all of this while working on Docker image Function hotswapping.
Acknowledge
- I may be able to implement this feature request
- This feature might incur a breaking change
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:6 (5 by maintainers)
Top GitHub Comments
@skinny85 my comment describes the state with those changes in place. In the current state the
State
will always be active and theLastUpdateStatus
will always beSuccessful
.@skinny85 yep I’ve already started working on it 😃