version: 0.2 phases: install: commands: - sudo apt-get update -y && sudo apt-get install -y make apt-transport-https - curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - - echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list - sudo apt-get update -y && sudo apt-get install -y yarn pre_build: commands: - yarn install --prod build: commands: - aws cloudformation package --template-file ./src/main/resources/sam.yml --s3-bucket {your-bucket-here} --s3-prefix dependency --output-template-file sam-packaged.yml - echo "{\"Parameters\":{\"Env\":\"$ENV\"}}" > sam-packaged-config.json - echo "{\"Parameters\":{\"ParentStack\":\"$STACK_NAME\"}}" > custom-config.json artifacts: files: - ./src/main/resources/custom.yml - custom-config.json - ./src/main/resources/sam.yml - sam-packaged.yml - sam-packaged-config.json discard-paths: yes