Advertisement
Guest User

buildspec.yml for Python

a guest
Feb 24th, 2020
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 0.78 KB | None | 0 0
  1. version: 0.2
  2.  
  3. #env:
  4. #  variables:
  5. #    FUNCTION: "arn:aws:lambda:us-east-1:619094005353:function:Test"
  6. phases:
  7.   install:
  8.     runtime-versions:
  9.       python: 3.8
  10.   pre_build:
  11.     commands:
  12.      - echo Build enviromment `uname -a` `aws --version 2>&1` `python --version`
  13.       - echo Started build at `date`
  14.       - pip install -r requirements.txt -t .
  15.       #- mkdir /tmp/
  16.       - rm buildspec.yml .gitignore
  17.       - mv sam.yaml /tmp/
  18.   build:
  19.     commands:
  20.      - echo Building at `date`
  21.       - zip -r /tmp/output.zip *
  22.       - aws cloudformation package --template-file /tmp/sam.yaml --s3-bucket $S3_BUCKET --output-template-file template.yaml
  23.   post_build:
  24.     commands:
  25.      - echo Finished build at `date`
  26. artifacts:
  27.   files:
  28.    - template.yaml
  29.   discard-paths: yes
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement