Skip to content

Commit 85649ef

Browse files
committed
Use IAM role and update publish workflow
1 parent 6fc3fad commit 85649ef

File tree

2 files changed

+10
-54
lines changed

2 files changed

+10
-54
lines changed

.github/workflows/publish.yml

+8-8
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
release:
55
types: [published]
66

7+
permissions:
8+
id-token: write # This is required for requesting the JWT
9+
710
jobs:
811
publish:
912
runs-on: ubuntu-latest
@@ -33,15 +36,12 @@ jobs:
3336
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
3437
deploy_chime_prod_demo:
3538
needs: publish
36-
name: Prod - Chime and ChimeSDKMeetings Client - Deploy the Serverless Meeting Demos
39+
name: Deploy Meeting Demos with the latest NPM release
3740
runs-on: ubuntu-latest
38-
strategy:
39-
matrix:
40-
name: [ ChimeProd, ChimeSDKMeetingsProdIAD, ChimeSDKMeetingsProdPDX, ChimeSDKMeetingsProdFRA, ChimeSDKMeetingsProdSIN, ChimeSDKMeetingsIAD_ChimeSDKMediaPipelinesProdIAD, Chime_ChimeSDKMediaPipelinesProdIAD ]
4141
env:
4242
AWS_DEFAULT_REGION: us-east-1
4343
AWS_DEFAULT_OUTPUT: text
44-
NAME: ${{ matrix.name }}
44+
NAME: PROD
4545
steps:
4646
- name: Verify the npm version is available
4747
id: npm_version
@@ -72,10 +72,10 @@ jobs:
7272
done
7373
shell: bash
7474
- name: Configure AWS Credentials
75-
uses: aws-actions/configure-aws-credentials@v1
75+
uses: aws-actions/configure-aws-credentials@v4
7676
with:
77-
aws-access-key-id: ${{ secrets.PROD_CANARY_AWS_ACCESS_KEY }}
78-
aws-secret-access-key: ${{ secrets.PROD_CANARY_AWS_SECRET_ACCESS_KEY }}
77+
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME_CANARY_PROD }}
78+
role-session-name: publish-demo-deployment
7979
aws-region: us-east-1
8080
- name: Checkout Package
8181
uses: actions/checkout@v2

script/deploy-canary-demo

+2-46
Original file line numberDiff line numberDiff line change
@@ -21,54 +21,10 @@ GAMMA)
2121
npm run deploy -- -b chime-sdk-meeting-readiness-checker-media-gamma$canarySuffix -s chime-sdk-meeting-readiness-checker-media-gamma$canarySuffix -a meetingReadinessChecker -m $GAMMA_CHIME_ENDPOINT_US_EAST_1 -t -l
2222
;;
2323

24-
ChimeProd)
25-
echo "Deploying to prod stage for canary that talks to prod Chime client for meetings and prod Chime client for media pipelines"
26-
27-
# Uses Chime Client
24+
PROD)
25+
echo "Deploying to canary-prod with latest NPM release"
2826
npm run deploy -- -b chime-sdk-demo-prod-canary$canarySuffix -o chime-sdk-demo-prod-canary$canarySuffix -s chime-sdk-demo-prod-canary$canarySuffix -i eu-south-1 -t -l -p chime.amazonaws.com
2927
npm run deploy -- -b chime-sdk-meeting-readiness-checker-prod-canary$canarySuffix -s chime-sdk-meeting-readiness-checker-prod-canary$canarySuffix -a meetingReadinessChecker -t -l
3028
;;
3129

32-
ChimeSDKMeetingsProdIAD)
33-
echo "Deploying to prod stage for canary that talks to prod IAD ChimeSDKMeetings client for meetings and prod Chime client for media pipelines"
34-
35-
# Uses ChimeSDKMeetings client
36-
npm run deploy -- -r us-east-1 -b chime-sdk-meetings-demo-prod-canary-us-east-1$canarySuffix -o chime-sdk-meetings-iad-demo-prod-canary$canarySuffix -s chime-sdk-meetings-demo-prod-canary-us-east-1$canarySuffix -t -l -p chime.amazonaws.com
37-
;;
38-
39-
ChimeSDKMeetingsIAD_ChimeSDKMediaPipelinesProdIAD)
40-
echo "Deploying to prod stage for canary that talks to prod IAD ChimeSDKMeetings client for meetings and prod IAD ChimeSDKMediaPipelines client for media pipelines"
41-
42-
# Uses ChimeSDKMeetings client
43-
npm run deploy -- -r us-east-1 -b chime-sdk-meetings-$chimeSDKMediaPipelinesStackId-demo-prod-canary-us-east-1$canarySuffix -o chime-sdk-meetings-$chimeSDKMediaPipelinesStackId-iad-demo-prod-canary$canarySuffix -s chime-sdk-meetings-$chimeSDKMediaPipelinesStackId-demo-prod-canary-us-east-1$canarySuffix -t -l
44-
;;
45-
46-
Chime_ChimeSDKMediaPipelinesProdIAD)
47-
echo "Deploying to prod stage for canary that talks to prod Chime client for meetings and prod IAD ChimeSDKMediaPipelines client for media pipelines"
48-
49-
# Uses ChimeSDKMeetings client
50-
npm run deploy -- -r us-east-1 -b chime-sdk-$chimeSDKMediaPipelinesStackId-demo-prod-canary-us-east-1$canarySuffix -o chime-sdk-$chimeSDKMediaPipelinesStackId-iad-demo-prod-canary$canarySuffix -s chime-sdk-$chimeSDKMediaPipelinesStackId-demo-prod-canary-us-east-1$canarySuffix -t -l
51-
;;
52-
53-
ChimeSDKMeetingsProdPDX)
54-
echo "Deploying to prod stage for canary that talks to prod PDX ChimeSDKMeetings client and prod PDX ChimeSDKMediaPipelines client"
55-
56-
# Uses ChimeSDKMeetings client
57-
npm run deploy -- -r us-west-2 -b chime-sdk-meetings-demo-prod-canary-us-west-2$canarySuffix -o chime-sdk-meetings-$chimeSDKMediaPipelinesStackId-pdx-demo-prod-canary$canarySuffix -s chime-sdk-meetings-$chimeSDKMediaPipelinesStackId-demo-prod-canary-us-west-2$canarySuffix -t -l --chime-sdk-media-pipelines-region us-west-2 --chime-sdk-media-pipelines-endpoint https://media-pipelines-chime.us-west-2.amazonaws.com
58-
;;
59-
60-
ChimeSDKMeetingsProdFRA)
61-
echo "Deploying to prod stage for canary that talks to prod FRA ChimeSDKMeetings client and prod FRA ChimeSDKMediaPipelines client"
62-
63-
# Uses ChimeSDKMeetings client
64-
npm run deploy -- -r eu-central-1 -b chime-sdk-meetings-demo-prod-canary-eu-central-1$canarySuffix -o chime-sdk-meetings-$chimeSDKMediaPipelinesStackId-fra-demo-prod-canary$canarySuffix -s chime-sdk-meetings-$chimeSDKMediaPipelinesStackId-demo-prod-canary-eu-central-1$canarySuffix -t -l --chime-sdk-media-pipelines-region eu-central-1 --chime-sdk-media-pipelines-endpoint https://media-pipelines-chime.eu-central-1.amazonaws.com
65-
;;
66-
67-
ChimeSDKMeetingsProdSIN)
68-
echo "Deploying to prod stage for canary that talks to prod SIN ChimeSDKMeetings client and prod SIN ChimeSDKMediaPipelines client"
69-
70-
# Uses ChimeSDKMeetings client
71-
npm run deploy -- -r ap-southeast-1 -b chime-sdk-meetings-demo-prod-canary-ap-southeast-1$canarySuffix -o chime-sdk-meetings-$chimeSDKMediaPipelinesStackId-sin-demo-prod-canary$canarySuffix -s chime-sdk-meetings-$chimeSDKMediaPipelinesStackId-demo-prod-canary-ap-southeast-1$canarySuffix -t -l --chime-sdk-media-pipelines-region ap-southeast-1 --chime-sdk-media-pipelines-endpoint https://media-pipelines-chime.ap-southeast-1.amazonaws.com
72-
;;
73-
7430
esac

0 commit comments

Comments
 (0)