Problem updating AWS lambda function

I am deploying an AWS lambda function using cdktf. It deploys fine when the lambda doesn’t exist, but I can’t update the function. I’m getting the error listed at the end of the post.

Some posts I’ve seen indicate that TF is making multiple, simultaneous calls to update the lambda.

I’ve tried adding depends_on arguments to force the components to run serially. I’ve also tried using -parallelism=1.

I’m using

Error: Error publishing Lambda Function (deployment_ms-hmd-ms-deployment-lambda) version: ResourceConflictException: The operation cannot be performed at this time. An update is in progress for resource: arn:aws:lambda:us-west-2:830985159802:function:deployment_ms-hmd-ms-deployment-lambda
{
  RespMetadata: {
    StatusCode: 409,
    RequestID: "ea7ca2b4-33eb-4517-aee3-106c8ed50d1c"
  },
  Message_: "The operation cannot be performed at this time. An update is in progress for resource: arn:aws:lambda:us-west-2:830985159802:function:deployment_ms-hmd-ms-deployment-lambda",
  Type: "User"
}

It appears that this is not specifically related to cdktf, but rather because the code is being deployed as an image.

You mean as a Docker image? Out of curiosity, do you know what caused the issue?

Error publishing version when lambda using container updates code #17153.

I haven’t confirmed it, yet, but images are relatively new in Lambda and I’m guessing this is the issue.