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

Cloud formation package exit with error 255 #3280

Closed
pke0108 opened this issue Apr 20, 2018 · 7 comments
Closed

Cloud formation package exit with error 255 #3280

pke0108 opened this issue Apr 20, 2018 · 7 comments
Labels
closing-soon This issue will automatically close in 4 days unless further comments are made.

Comments

@pke0108
Copy link

pke0108 commented Apr 20, 2018

I have cloudformation package command runs with build option from codepipeline. But I get error 255; which was not happened before.

Error while executing command: aws cloudformation package --template samTemplate-dev.yml --s3-bucket $S3_BUCKET --output-template-file template-export-dev.yml. Reason: exit status 255

Please some one address.

@dstufft
Copy link
Contributor

dstufft commented Apr 23, 2018

Are you getting any other output? If not try adding --debug and see if there is an error or a traceback being printed and include that logging here.

@dstufft dstufft added the closing-soon This issue will automatically close in 4 days unless further comments are made. label Apr 23, 2018
@teknogeek0
Copy link

Pavan, is there any chance you are trying to package a node.js application? If so look further up in the logs to see if you are seeing an error about timestaps. It might be related to this: npm/npm#19968. I stumbled upon this issue as it just happened to me in a previously working Serverless project. This other post: aws/aws-sdk-js#1977 (comment) helped me solve this (for now).

@pke0108
Copy link
Author

pke0108 commented Apr 26, 2018

@teknogeek0 Yes, this is nodejs application, we use this as lambda function. I have tried the option that you mentioned, but still the same issue. I get this error while packaging.

Spec file below:

version: 0.2

phases:
  build:
    commands:
      - echo Installing source NPM dependencies...
      - npm install
      #- ls $CODEBUILD_SRC_DIR
      # - find $CODEBUILD_SRC_DIR/node_modules -mtime +10950 -exec touch {} ;
      - ls -ltr node_modules
      - pip install --upgrade awscli
      - aws s3 cp --recursive server/ s3://$WEBSITE_S3_BUCKET/server/ --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers
      - aws s3 cp --recursive config/ s3://$WEBSITE_S3_BUCKET/config/ --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers
      - aws s3 cp --recursive node_modules/ s3://$WEBSITE_S3_BUCKET/node_modules/ --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers
      - aws s3 cp package.json s3://$WEBSITE_S3_BUCKET/package.json --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers
      - echo Packaging source ...    
      - aws cloudformation package --template samTemplate-dev.yml --s3-bucket $S3_BUCKET --output-template-file template-export-dev.yml

artifacts:
  type: zip
  files:
    #- ./**/*
    - template-export-dev.yml

@kyleknap kyleknap removed the closing-soon This issue will automatically close in 4 days unless further comments are made. label Jun 14, 2018
@stealthycoin
Copy link
Contributor

We would still need the debug output to be able to provide any help.

@stealthycoin stealthycoin added the closing-soon This issue will automatically close in 4 days unless further comments are made. label Jul 3, 2018
@no-response no-response bot closed this as completed Jul 10, 2018
@no-response
Copy link

no-response bot commented Jul 10, 2018

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.

@ShardulKhodankar
Copy link

Hi, I also see the same error. Any update on this? I am just trying to create an S3 bucket and API gateway via my CF template.

@ylpitseleh
Copy link

You probably have typo in your template.yml. I had the same issue and the error has been fixed after I corrected the typo.

thoward-godaddy pushed a commit to thoward-godaddy/aws-cli that referenced this issue Feb 12, 2022
thoward-godaddy pushed a commit to thoward-godaddy/aws-cli that referenced this issue Feb 12, 2022
thoward-godaddy pushed a commit to thoward-godaddy/aws-cli that referenced this issue Feb 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closing-soon This issue will automatically close in 4 days unless further comments are made.
Projects
None yet
Development

No branches or pull requests

7 participants