Skip to content

opt-out-import prod deploy #3

opt-out-import prod deploy

opt-out-import prod deploy #3

name: opt-out-import prod deploy
on:
workflow_dispatch:
jobs:
deploy:
permissions:
contents: read
id-token: write
runs-on: ubuntu-latest
environment: prod
steps:
- uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: ${{ vars.AWS_REGION }}
role-to-assume: arn:aws:iam::${{ secrets.ACCOUNT_ID }}:role/delegatedadmin/developer/dpc-prod-github-actions
- name: Promote lambda code from test to prod
run: |
aws s3 cp --no-progress \
s3://dpc-test-opt-out-import-function/function-${{ github.sha }}.zip \
s3://dpc-prod-opt-out-import-function/function-${{ github.sha }}.zip
aws lambda update-function-code --function-name dpc-prod-opt-out-import \
--s3-bucket dpc-prod-opt-out-import-function --s3-key function-${{ github.sha }}.zip