Skip to content

Commit 2a4dddd

Browse files
authored
chore: Migrated from long-term IAM to OIDC (#596)
* Migrated from long-term IAM to OIDC
1 parent 0626488 commit 2a4dddd

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

.github/workflows/test-workflow.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ on:
55

66
name: Integration Test
77

8+
permissions:
9+
id-token: write
10+
contents: read
11+
812
jobs:
913
deploy:
1014
name: Deploy
@@ -19,10 +23,10 @@ jobs:
1923
echo Integration test run: githubactionsamazonecsdeplo-NWcjHIgDJLXw:ecb0a69e-514e-4d6c-b21e-dda87ed159e4
2024
2125
- name: Configure AWS credentials
22-
uses: aws-actions/configure-aws-credentials@v1
26+
uses: aws-actions/configure-aws-credentials@v4
2327
with:
24-
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
25-
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
28+
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/GitHubActionsDeployTaskIntegrationTests
29+
role-session-name: deploy_task_integration_tests
2630
aws-region: us-west-2
2731

2832
- name: Deploy Amazon ECS task definition with one-off task and wait for task stopped set to false

test-workflow.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ on:
55

66
name: Integration Test
77

8+
permissions:
9+
id-token: write
10+
contents: read
11+
812
jobs:
913
deploy:
1014
name: Deploy
@@ -19,10 +23,10 @@ jobs:
1923
echo Integration test run: BUILD_ID
2024
2125
- name: Configure AWS credentials
22-
uses: aws-actions/configure-aws-credentials@v1
26+
uses: aws-actions/configure-aws-credentials@v4
2327
with:
24-
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
25-
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
28+
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/GitHubActionsDeployTaskIntegrationTests
29+
role-session-name: deploy_task_integration_tests
2630
aws-region: us-west-2
2731

2832
- name: Deploy Amazon ECS task definition with one-off task and wait for task stopped set to false

0 commit comments

Comments
 (0)