aws-lambda-dotnet icon indicating copy to clipboard operation
aws-lambda-dotnet copied to clipboard

Failed to create CloudFormation change set: Received malformed response

Open dalton5 opened this issue 6 years ago • 44 comments

Hi,

When I publish my aws lambda function I have a final error with this:

Uploading to S3. (Bucket: wtbucketlambda Key: WT-serverless-xxxxxx.template) ... Progress: 100% Found existing stack: True CloudFormation change set created ... Waiting for change set to be reviewed Failed to create CloudFormation change set: Received malformed response from transform AWS::Serverless-2016-10-31 Failed to publish AWS Serverless application

Do you know how can I fix it?

It's a big issue because I can't publish my lambda function

Thanks,

My serverless template:

`{ "AWSTemplateFormatVersion" : "2010-09-09", "Transform" : "AWS::Serverless-2016-10-31", "Description" : "Starting template for an AWS Serverless Application.", "Resources" : { "DefaultFunction" : { "Type" : "AWS::Serverless::Function", "Properties": { "Handler": "not_required_for_custom_runtime", "Runtime": "provided", "CodeUri": "", "Description": "Default function", "MemorySize": 256, "Timeout": 30, "Role": null, "Policies": [ "AWSLambdaFullAccess", "AmazonSSMReadOnlyAccess", "AWSLambdaVPCAccessExecutionRole" ], "Events": { "ProxyResource": { "Type": "Api", "Properties": { "Path": "/{proxy+}", "Method": "ANY" } }, "APIWarmingSchedule": { "Type": "Schedule", "Properties": { "Schedule": "rate(5 minutes)", "Input": "{ "Resource": "WarmingLambda", "Body": "5" }" } } } } } }, "Outputs" : { "ApiURL" : { "Description" : "API endpoint URL for Prod environment", "Value" : { "Fn::Sub" : "https://${ServerlessRestApi}.execute-api.${AWS::Region}.amazonaws.com/Prod/" } }

} }`

My aws lambda tools default json file

{ "region" : "us-east-1", "profile" : "wetip", "s3-bucket" : "wtbucketlambda", "template" : "serverless.template", "stack-name" : "WT", "configuration" : "Release", "framework" : "netcoreapp2.2", "msbuild-parameters" : "--self-contained true" }

dalton5 avatar Nov 20 '20 03:11 dalton5

I have the same issue.

My template:

{
   "AWSTemplateFormatVersion":"2010-09-09",
   "Transform":"AWS::Serverless-2016-10-31",
   "Description":"An AWS Serverless Application that uses the ASP.NET Core framework running in Amazon Lambda.",
   "Parameters":{
      "ShouldCreateBucket":{
         "Type":"String",
         "AllowedValues":[
            "true",
            "false"
         ],
         "Description":"If true then the S3 bucket that will be proxied will be created with the CloudFormation stack."
      },
      "BucketName":{
         "Type":"String",
         "Description":"Name of S3 bucket that will be proxied. If left blank a name will be generated.",
         "MinLength":"0"
      }
   },
   "Conditions":{
      "CreateS3Bucket":{
         "Fn::Equals":[
            {
               "Ref":"ShouldCreateBucket"
            },
            "true"
         ]
      },
      "BucketNameGenerated":{
         "Fn::Equals":[
            {
               "Ref":"BucketName"
            },
            ""
         ]
      }
   },
   "Resources":{
      "AspNetCoreFunction":{
         "Type":"AWS::Serverless::Function",
         "Properties":{
            "Handler":"xxx::xxx.LambdaEntryPoint::FunctionHandlerAsync",
            "Runtime":"dotnetcore3.1",
            "CodeUri":"s3://xxx/xxx/AspNetCoreFunction-CodeUri-637343401555849743-637343401710605189.zip",
            "MemorySize":256,
            "Timeout":30,
            "Role":null,
            "Policies":[
               "AWSLambdaFullAccess"
            ],
            "Environment":{
               "Variables":{
                  "AppS3Bucket":{
                     "Fn::If":[
                        "CreateS3Bucket",
                        {
                           "Ref":"Bucket"
                        },
                        {
                           "Ref":"BucketName"
                        }
                     ]
                  }
               }
            },
            "Events":{
               "ProxyResource":{
                  "Type":"Api",
                  "Properties":{
                     "Path":"/{proxy+}",
                     "Method":"ANY"
                  }
               },
               "RootResource":{
                  "Type":"Api",
                  "Properties":{
                     "Path":"/",
                     "Method":"ANY"
                  }
               }
            }
         }
      },
      "Bucket":{
         "Type":"AWS::S3::Bucket",
         "Condition":"CreateS3Bucket",
         "Properties":{
            "BucketName":{
               "Fn::If":[
                  "BucketNameGenerated",
                  {
                     "Ref":"AWS::NoValue"
                  },
                  {
                     "Ref":"BucketName"
                  }
               ]
            }
         }
      }
   },
   "Outputs":{
      "ApiURL":{
         "Description":"API endpoint URL for Prod environment",
         "Value":{
            "Fn::Sub":"https://${ServerlessRestApi}.execute-api.${AWS::Region}.amazonaws.com/Prod/"
         }
      },
      "S3ProxyBucket":{
         "Value":{
            "Fn::If":[
               "CreateS3Bucket",
               {
                  "Ref":"Bucket"
               },
               {
                  "Ref":"BucketName"
               }
            ]
         }
      }
   }
}

chgong avatar Nov 20 '20 04:11 chgong

Having the same issue for the last a few hours. It was working yesterday with the same template. The thing is, that's a template deploying a DynamoDB table. No lambdas. I just saw this thread and wanted to say that this may be a more general issue unrelated to lambda

ckalan avatar Nov 20 '20 04:11 ckalan

Same for me for a template that is unchanged and was working previously, so this looks like a regression.

matthewdenobrega avatar Nov 20 '20 04:11 matthewdenobrega

I'm facing the same issue too. However, the aws health check dashboard does not show any indicators for service disruptions in us-east-1. https://status.aws.amazon.com/ Is everyone seeing this issue in us-east-1?

An older thread of similar issue which was due to aws service being down. https://github.com/aws/serverless-application-model/issues/793

NithuPMTR avatar Nov 20 '20 05:11 NithuPMTR

This seems to be fixed now !

NithuPMTR avatar Nov 20 '20 06:11 NithuPMTR

Hi @dalton5,

Good morning.

Per comment from @NithuPMTR, please verify if this works now for you and confirm if this issue could be closed.

Thanks, Ashish

ashishdhingra avatar Nov 20 '20 17:11 ashishdhingra

It works for me now.

chgong avatar Nov 20 '20 19:11 chgong

Yes it works. You can close. thanks

dalton5 avatar Nov 21 '20 03:11 dalton5

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.

github-actions[bot] avatar Nov 21 '20 03:11 github-actions[bot]

same issue again..

orr-levinger avatar Nov 25 '20 14:11 orr-levinger

same issue again..

I confirm, same issue when trying to deploy app stack to us-east-1 :/

piiertho avatar Nov 25 '20 14:11 piiertho

Can confirm as well

Laberbear avatar Nov 25 '20 14:11 Laberbear

Can confirm as well, same issue

MatiasSasRise avatar Nov 25 '20 14:11 MatiasSasRise

Same issue here

Same issue here us-east-1

izidorome avatar Nov 25 '20 14:11 izidorome

Received malformed response from transform AWS::Serverless-2016-10-31

Deploying to us-east-1

nxp9 avatar Nov 25 '20 14:11 nxp9

Seeing the same issue.

itshari avatar Nov 25 '20 14:11 itshari

Same here: us-east-1

Unisay avatar Nov 25 '20 14:11 Unisay

Same issue here trying to deploy in us-east

rogeriozambon avatar Nov 25 '20 14:11 rogeriozambon

same here :(

thoreg avatar Nov 25 '20 14:11 thoreg