version: 0.1

env:
  variables:
    BUILD_OUTPUT_BUCKET: ""

phases:
  install:
    commands:
      - echo "nothing to do in install"
  pre_build:
    commands:
      - echo "nothing to do in pre_build"
  build:
    commands:
      - echo "Starting SAM packaging `date` in `pwd`"
      - aws cloudformation package --template-file distribution-lambda.yaml --s3-bucket $BUILD_OUTPUT_BUCKET --output-template-file app-output-sam.yaml
  post_build:
    commands:
      - echo "build completed on `date`"

artifacts:
  files:
    - app-output-sam.yaml
  discard-paths: yes
