Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I let aws cli command wait until the update finish?

I am using aws cli command to update a lambda' configuration, e.g. update memory size. The command finishes very quick but the next command which updates the same lambda failed with:

An error occurred (ResourceConflictException) when calling the UpdateFunctionConfiguration 
operation: The operation cannot be performed at this time. An update is in progress for 
resource: arn:aws:lambda

I see there is an update request in progress which causes the command fail. Is there a way to make my aws cli command waiting until the update finish?

like image 667
Joey Yi Zhao Avatar asked Oct 15 '25 11:10

Joey Yi Zhao


1 Answers

You can use function-updated command between the two function update commands. It will wait until the Lambda's LastUpdateStatus will be successful, meaning that the next update can be invoked.

Invoke it like so:

aws lambda wait function-updated --function-name $MY_FUNC
like image 79
Ervin Szilagyi Avatar answered Oct 18 '25 05:10

Ervin Szilagyi