i have cloud formation template defines new api gateway:
awstemplateformatversion: '2010-09-09' transform: aws::serverless-2016-10-31 description: api getting planetary info resources: planetsapi: type: aws::apigateway::restapi properties: name: "planets api"
i have codepipeline set create change set , execute change set.
when change set executes, fails following error:
13:55:28 utc-0400 create_failed aws::apigateway::restapi planetsapi s3 object size exceeds limit of 2 mb
i don't know limit coming from, or why being uploaded s3. google searches turning no useful information. curiously, if create change set , execute through cloudformation console, don't errors.
what doing wrong?
had same problem. , wow, realized when use aws cloudformation package
, creates bodys3location
properties (bucket
, key
) under define type: aws::apigateway::restapi
. happens, though had not defined such parameters earlier in template, before being processed cloudformation package
. this, causes error.
what did tackle issue:
let
codepipeline
run, , fail (with error)go aws console, find failed stack, , expand template
find lines in
bodys3location
, parameters generated (for me in lines 22 24)add command in
buildspec.yml
delete these lines, after package command (example below)aws cloudformation package --s3-bucket some-s3bucket --template-file ./template.yml --output-template-file ./packaged-template.yml
sed --in-place '22,24d' packaged-template.yml
commit
,push
repo again- it must work now!
note: not best solution, issue must solved, aws end!
update:
it aws cli version. try installing version before running cloudformation package
command (in codebuild
), , should go.
pip install awscli==1.11.37
Comments
Post a Comment