Skip to content

add permissions block for build workflow #4

add permissions block for build workflow

add permissions block for build workflow #4

Workflow file for this run

name: build-lambda
on:
push:
branches:
- main
env:
AWS_REGION: "us-west-2"
BUILD_ARTIFACTS: "stackgen-demo-builds"
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: ${{ env.AWS_REGION }}
role-to-assume: ${{ vars.AWS_ROLE_TO_ASSUME }}
- name: Build Lambda
run: |
make build
- name: Upload Lambda Artifacts
run: |
aws s3 sync ./build/ s3://${{ env.BUILD_ARTIFACTS }}/build/ --region ${AWS_REGION}