# Problem updating AWS lambda function

**URL:** <https://discuss.hashicorp.com/t/problem-updating-aws-lambda-function/20597>\
**Category:** CDK for Terraform\
**Created:** [February 4, 2021, 9:58pm UTC](https://discuss.hashicorp.com/t/problem-updating-aws-lambda-function/20597 "2021-02-04T21:58:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jimmajurehmd](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/jimmajurehmd/32/15577_2.png) [@jimmajurehmd](https://discuss.hashicorp.com/u/jimmajurehmd)\
**Post date:** [February 4, 2021, 9:58pm UTC](https://discuss.hashicorp.com/t/problem-updating-aws-lambda-function/20597/1 "2021-02-04T21:58:16Z")

</div>

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"
}
```

---

<div class="post-metadata">

**Author:** ![jimmajurehmd](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/jimmajurehmd/32/15577_2.png) [@jimmajurehmd](https://discuss.hashicorp.com/u/jimmajurehmd)\
**Post date:** [February 4, 2021, 10:06pm UTC](https://discuss.hashicorp.com/t/problem-updating-aws-lambda-function/20597/2 "2021-02-04T22:06:54Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![skorfmann](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/skorfmann/32/9494_2.png) [@skorfmann](https://discuss.hashicorp.com/u/skorfmann)\
**Post date:** [February 5, 2021, 12:42pm UTC](https://discuss.hashicorp.com/t/problem-updating-aws-lambda-function/20597/3 "2021-02-05T12:42:43Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jimmajurehmd](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/jimmajurehmd/32/15577_2.png) [@jimmajurehmd](https://discuss.hashicorp.com/u/jimmajurehmd)\
**Post date:** [February 5, 2021, 2:00pm UTC](https://discuss.hashicorp.com/t/problem-updating-aws-lambda-function/20597/4 "2021-02-05T14:00:00Z")

</div>

# 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.
