User Tools

Site Tools


aws:codebuild

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

aws:codebuild [23/06/2025 10:33] – created andrewaws:codebuild [23/06/2025 10:36] (current) andrew
Line 2: Line 2:
  
 ===== Python in Lambda ===== ===== Python in Lambda =====
 +
 +buildspec.yaml
 +<code python>
 +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"
 +</code>
 + 
 +Note the use of ''({}, {})'' to pass parameters in to the Lambda Function, in this case, no parameters are needed.
 +
  
  
aws/codebuild.1750674803.txt.gz · Last modified: by andrew

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki