Dpl lambda fails to deploy: "An update is in progress for resource"

Hi,

All of a sudden TravisCI fails to deploy some lambda functions (which have been deployed successfully in the past).

running dpl command to deploy doSomeMagic...
Installing deployment dependencies
Installing gem dependencies: aws-sdk-lambda (~> 1.0), rubyzip (~> 1.2.2)
Using Access Key: AK******************
Setting the build environment up for the deployment
Updating existing function doSomeMagic.
Updating code.
The operation cannot be performed at this time. An update is in progress for resource: arn:aws:lambda:<my-region>:123456789:function:doSomeMagic
Script failed with status #<struct Dpl::Provider::Status provider=Dpl::Providers::Script, status=:stable, info=nil>
failed to deploy

I suspect it could be related to this AWS Lambda state change:

Regards,
Hubert

1 Like

We’re getting the same for lambda deployments via dpl v1 and 2.

Updating code.

The operation cannot be performed at this time. An update is in progress for resource: arn:aws:lambda:us-east-1:...

Happens consistently after initial deploy. (If I delete the lambda, it will thereafter deploy correctly.) Out of ideas. Anyone have workarounds?

My work-around is to use dpl --provider="cloudformation".

Great workaround @HubertWagnerVE,

You can also try:

dpl --provider=cloudformation --access_key_id=<ACCESS_KEY_ID> --secret_access_key=<SECRET_ACCESS_KEY> --filepath=<cf_template_file> --stack_name=<stack_name> --promote=<boolean> --parameters {ExampleParameter1=value1,ParamSqsName=example-name}

Which is a bit more flexible in the param sequences, I’ve shipped this issue to the internal team to see if it’s an issue that we need to investigate further (including myself.)

Imprint