Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TF Make deploy Lambda fails #418

Open
fivehorizons opened this issue Feb 24, 2022 · 3 comments
Open

TF Make deploy Lambda fails #418

fivehorizons opened this issue Feb 24, 2022 · 3 comments

Comments

@fivehorizons
Copy link

Version information

Describe the bug

Running make deploy from dce-master folder

  • aws s3 cp artifacts/lambda/account_pool_metrics.zip s3://-dce-artifacts-dce2/lambda/account_pool_metrics.zip --sse
    upload: artifacts/lambda/account_pool_metrics.zip to s3://-dce-artifacts-dce2/lambda/account_pool_metrics.zip
  • aws lambda update-function-code --function-name account_pool_metrics-dce2 --s3-bucket -dce-artifacts-dce2 --s3-key lambda/account_pool_metrics.zip
    {
    "FunctionName": "account_pool_metrics-dce2",
    "FunctionArn": "arn:aws:lambda:us-east-1::function:account_pool_metrics-dce2",
    "Runtime": "go1.x",
    "Role": "arn:aws:iam:::role/dce-lambda-dce220220224191211019900000002",
    "Handler": "account_pool_metrics",
    "CodeSize": 12951978,
    "Description": "Handles API requests to the /accounts endpoint",
    "Timeout": 300,
    "MemorySize": 128,
    "LastModified": "2022-02-24T19:19:58.000+0000",
    "CodeSha256": "Qswk1GQtCqVAldGPLwas1re8PdmA/2ZenIbC2Oj0Hcg=",
    "Version": "$LATEST",
    "Environment": {
    "Variables": {
    "NAMESPACE": "dce2",
    "ACCOUNT_ID": "",
    "ACCOUNT_DB": "AccountsDce2",
    "AWS_CURRENT_REGION": "us-east-1",
    "DEBUG": "false"
    }
    },
    "TracingConfig": {
    "Mode": "PassThrough"
    },
    "RevisionId": "4809607e-f7cd-47e0-8e24-c8364c7e8529",
    "State": "Active",
    "LastUpdateStatus": "InProgress",
    "LastUpdateStatusReason": "The function is being created.",
    "LastUpdateStatusReasonCode": "Creating"
    }
  • aws lambda publish-version --function-name account_pool_metrics-dce2

An error occurred (ResourceConflictException) when calling the PublishVersion operation: The operation cannot be performed at this time. An update is in progress for resource: arn:aws:lambda:us-east-1::function:account_pool_metrics-dce2
make: *** [Makefile:40: deploy] Error 255

To Reproduce
terraform apply to make sure its clean, Try again same error. TF Destroy start over, try new name same issue

@fivehorizons
Copy link
Author

I waited 24 hours also to make sure it was not issue. I have read the need to add a Wait to lambda

@mazzy89
Copy link

mazzy89 commented Apr 29, 2022

I’ve stumbled upon this issue as well. I’ve solved by adding a sleep 5 before running the publish API call and it worked.

@fivehorizons
Copy link
Author

I think we added a lamba wait but sleep might be better

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants