CloudFormation: Deployment error

0

I am developing Lambda (NET6) and have added Github Action: build, upload and deploy. Now the 1 & 2 work fine, but the Deploy step completed with error: Run aws cloudformation deploy --template-file ./aws/cfn/pm2customers-lambda.yml --stack-name pm2customers-lambda-apigw --parameter-overrides
aws cloudformation deploy --template-file ./aws/cfn/pm2customers-lambda.yml --stack-name pm2customers-lambda-apigw --parameter-overrides
Application=pm2customer-lambda-apigw
Environment=dev
LambdaName=lambda
LambdaHandler=pm2aws
LambdaBucketName=pm2customer-lambda-apigw-bucket
LambdaZipFile=pm2customerlambda-77612e3d34a8acf9ba2620beea4ffaab77a005aa.zip
--capabilities CAPABILITY_IAM

shell: /usr/bin/bash -e {0} env: APPLICATION_PACKAGE: pm2customerlambda APPLICATION_NAME: pm2customer-lambda-apigw LAMBDA_BUCKET_NAME: pm2customer-lambda-apigw-bucket SLN_WORKING_DIR: . AWS_DEFAULT_REGION: eu-west-2 AWS_REGION: eu-west-2 AWS_ACCESS_KEY_ID: *** AWS_SECRET_ACCESS_KEY: ***

An error occurred (ValidationError) when calling the CreateChangeSet operation: Stack:arn:aws:cloudformation:eu-west-2:***:stack/pm2customers-lambda-apigw/dc4c4710-2489-11ee-b6be-0a649fe12144 is in ROLLBACK_COMPLETE state and can not be updated. Error: Process completed with exit code 254.

What should I fix ?

1 Answer
0

Hi, ValidationError means that your file pm2customers-lambda.yml is incorrect in its syntax or structure. You should install cfn-lint to check it and find what wrong it.

To install cfn-lint: see https://github.com/aws-cloudformation/cfn-lint

Also, you can go to the AWS console for CFN and check the events for your failed stack: you should find your stack in ROLBACK_COMPLETE state and may be able to spot the incorrect part of your yaml in the Events tab

Hope it helps! Didier

profile pictureAWS
EXPERT
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions