Skip to content

(CLI): hotswapping should wait for Lambda's updateFunctionCode operation to complete #18386

@skinny85

Description

@skinny85

Description

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

Metadata

Metadata

Assignees

Labels

effort/mediumMedium work item – several days of effortfeature-requestA feature should be added or improved.p1package/toolsRelated to AWS CDK Tools or CLI

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions