User Tools

Site Tools


aws:codebuild

AWS codebuild

Python in Lambda

buildspec.yaml

version: 0.2
 
phases:
  install:
    commands:
      - echo "Installing boto3 with pip"
      - pip install boto3
 
  build:
    commands:
      - echo "Running reports.py"
      - python3 -c 'from reports import lambda_handler; lambda_handler({}, {})'
      - echo "Finished reports.py"

Note the use of ({}, {}) to pass parameters in to the Lambda Function, in this case, no parameters are needed.

BASH shell script

aws/codebuild.txt · Last modified: by andrew

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki