Skip to content

feat: Add AWS SAM Lambda function template for Hue API #15

feat: Add AWS SAM Lambda function template for Hue API

feat: Add AWS SAM Lambda function template for Hue API #15

name: Deploy to AWS Lambda
on:
push:
branches:
- master
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.x"
- name: Install AWS SAM CLI
run: |
pip install aws-sam-cli
- name: Package the SAM Application
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: |
sam package --template-file template.yml --s3-bucket hue-api-lambda-deployment --output-template-file packaged.yaml --region us-east-2
- name: Deploy to AWS Lambda
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: |
sam deploy \
--template-file packaged.yaml \
--stack-name hue-lighting-stack \
--capabilities CAPABILITY_IAM \
--region us-east-2 \
--no-confirm-changeset