Skip to content

Workflow file for this run

name: Test Setup Provisioned Concurrency Action
on:
push:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Run the action
id: run-action
uses: ./
with:
function-name: 'test-lambda-function'
provisioned-concurrency: 1
- name: Cleanup
run: |
NEW_VERSION=1
# Remove provisioned concurrency
aws lambda put-provisioned-concurrency-config \
--function-name test-lambda-function \
--qualifier $NEW_VERSION \
--provisioned-concurrent-executions 0
# Delete the version
aws lambda delete-function --function-name test-lambda-function --qualifier $NEW_VERSION