cloudformation-coverage-roadmap icon indicating copy to clipboard operation
cloudformation-coverage-roadmap copied to clipboard

[AWS::Lambda::Function] - [BUG] - Lambda creation through Cloudformation sometimes fails with resource exists

Open arshikam opened this issue 1 year ago • 0 comments

Name of the resource

AWS::Lambda::Function

Resource Name

No response

Issue Description

When creating multiple lambda functions simultaneously, the creation sometimes fails with below error:

Resource handler returned message: "Function creation failed because the function already exists" 

Expected Behavior

Lambda with the same name does not exist in the account, however it stills fails with function exists error

Observed Behavior

Upon checking Cloudtrail it was found that CFN is sometimes making 2 'CreateFunction' API calls for the same lambda. First one is getting successful however the second call is failing with above error.

Test Cases

Try creating 10-15 stacks in parallel. Each with an average of 10-15 lambdas.

Other Details

As per AWS Support, there is an internal bug. So creating this github issue to track this publicly.

Note: Sequential deployment of the stacks and using DependsOn is not suitable for our use case.

arshikam avatar Jun 25 '24 14:06 arshikam