7
7
8
8
---
9
9
10
- ### News
10
+ ### Recent News
11
+
12
+ #### v4 Announcement (9/11/23)
13
+
14
+ We have just released ` v4 ` of Configure AWS Credentials. The only thing that
15
+ changed from ` v3 ` is that the action now runs on ` node20 ` instead of ` node16 ` .
16
+ You can still see the ` v3 ` announcement below, as it is still recent.
17
+
18
+ #### v3 Announcement (8/23/23)
11
19
12
20
We have recently released ` v3 ` of Configure AWS Credentials! With this new
13
21
release we have migrated the code to TypeScript, and have also migrated away
@@ -82,7 +90,7 @@ To do that, you would add the following step to your workflow:
82
90
83
91
``` yaml
84
92
- name : Configure AWS Credentials
85
- uses : aws-actions/configure-aws-credentials@v3
93
+ uses : aws-actions/configure-aws-credentials@v4
86
94
with :
87
95
role-to-assume : arn:aws:iam::123456789100:role/my-github-actions-role
88
96
aws-region : us-east-2
@@ -111,15 +119,15 @@ jobs:
111
119
- name: Checkout
112
120
uses: actions/checkout@v3
113
121
- name: Configure AWS credentials from Test account
114
- uses: aws-actions/configure-aws-credentials@v3
122
+ uses: aws-actions/configure-aws-credentials@v4
115
123
with:
116
124
role-to-assume: arn:aws:iam::111111111111:role/my-github-actions-role-test
117
125
aws-region: us-east-1
118
126
- name: Copy files to the test website with the AWS CLI
119
127
run: |
120
128
aws s3 sync . s3://my-s3-test-website-bucket
121
129
- name: Configure AWS credentials from Production account
122
- uses: aws-actions/configure-aws-credentials@v3
130
+ uses: aws-actions/configure-aws-credentials@v4
123
131
with:
124
132
role-to-assume: arn:aws:iam::222222222222:role/my-github-actions-role-prod
125
133
aws-region: us-west-2
@@ -209,7 +217,7 @@ within the Action. See [issue 419](https://github.com/aws-actions/configure-aws-
209
217
You can skip this session tagging by providing
210
218
`role-skip-session-tagging` as true in the action's inputs :
211
219
` ` ` yaml
212
- uses: aws-actions/configure-aws-credentials@v3
220
+ uses: aws-actions/configure-aws-credentials@v4
213
221
with:
214
222
role-skip-session-tagging: true
215
223
` ` `
@@ -220,13 +228,13 @@ You can skip this session tagging by providing
220
228
An IAM policy in stringified JSON format that you want to use as an inline session policy.
221
229
Depending on preferences, the JSON could be written on a single line like this :
222
230
` ` ` yaml
223
- uses: aws-actions/configure-aws-credentials@v3
231
+ uses: aws-actions/configure-aws-credentials@v4
224
232
with:
225
233
inline-session-policy: '{"Version":"2012-10-17","Statement":[{"Sid":"Stmt1","Effect":"Allow","Action":"s3:List*","Resource":"*"}]}'
226
234
` ` `
227
235
Or we can have a nicely formatted JSON as well :
228
236
` ` ` yaml
229
- uses: aws-actions/configure-aws-credentials@v3
237
+ uses: aws-actions/configure-aws-credentials@v4
230
238
with:
231
239
inline-session-policy: >-
232
240
{
@@ -246,13 +254,13 @@ Or we can have a nicely formatted JSON as well:
246
254
The Amazon Resource Names (ARNs) of the IAM managed policies that you want to use as managed session policies.
247
255
The policies must exist in the same account as the role. You can pass a single managed policy like this :
248
256
` ` ` yaml
249
- uses: aws-actions/configure-aws-credentials@v3
257
+ uses: aws-actions/configure-aws-credentials@v4
250
258
with:
251
259
managed-session-policies: arn:aws:iam::aws:policy/AmazonS3ReadOnlyAccess
252
260
` ` `
253
261
And we can pass multiple managed policies likes this :
254
262
` ` ` yaml
255
- uses: aws-actions/configure-aws-credentials@v3
263
+ uses: aws-actions/configure-aws-credentials@v4
256
264
with:
257
265
managed-session-policies: |
258
266
arn:aws:iam::aws:policy/AmazonS3ReadOnlyAccess
@@ -295,7 +303,7 @@ When the JWT is created, an audience needs to be specified. By default, the audi
295
303
296
304
` ` ` yaml
297
305
- name: Configure AWS Credentials for China region audience
298
- uses: aws-actions/configure-aws-credentials@v3
306
+ uses: aws-actions/configure-aws-credentials@v4
299
307
with:
300
308
audience: sts.amazonaws.com.cn
301
309
aws-region: us-east-3
@@ -407,7 +415,7 @@ You can use this action to simply configure the region and account ID in the
407
415
environment, and then use the runner's credentials for all AWS API calls made by
408
416
your Actions workflow :
409
417
` ` ` yaml
410
- uses: aws-actions/configure-aws-credentials@v3
418
+ uses: aws-actions/configure-aws-credentials@v4
411
419
with:
412
420
aws-region: us-east-2
413
421
` ` `
@@ -417,7 +425,7 @@ APIs called by your Actions workflow.
417
425
Or, you can use this action to assume a role, and then use the role credentials
418
426
for all AWS API calls made by your Actions workflow :
419
427
` ` ` yaml
420
- uses: aws-actions/configure-aws-credentials@v3
428
+ uses: aws-actions/configure-aws-credentials@v4
421
429
with:
422
430
aws-region: us-east-2
423
431
role-to-assume: my-github-actions-role
@@ -440,7 +448,7 @@ environment.
440
448
441
449
Manually configured proxy :
442
450
` ` ` yaml
443
- uses: aws-actions/configure-aws-credentials@v3
451
+ uses: aws-actions/configure-aws-credentials@v4
444
452
with:
445
453
aws-region: us-east-2
446
454
role-to-assume: my-github-actions-role
@@ -470,7 +478,7 @@ should include the AWS CLI by default.
470
478
# ## AssumeRoleWithWebIdentity (recommended)
471
479
` ` ` yaml
472
480
- name: Configure AWS Credentials
473
- uses: aws-actions/configure-aws-credentials@v3
481
+ uses: aws-actions/configure-aws-credentials@v4
474
482
with:
475
483
aws-region: us-east-2
476
484
role-to-assume: arn:aws:iam::123456789100:role/my-github-actions-role
@@ -481,13 +489,13 @@ In this example, the Action will load the OIDC token from the GitHub-provided en
481
489
# ## AssumeRole with role previously assumed by action in same workflow
482
490
` ` ` yaml
483
491
- name: Configure AWS Credentials
484
- uses: aws-actions/configure-aws-credentials@v3
492
+ uses: aws-actions/configure-aws-credentials@v4
485
493
with:
486
494
aws-region: us-east-2
487
495
role-to-assume: arn:aws:iam::123456789100:role/my-github-actions-role
488
496
role-session-name: MySessionName
489
497
- name: Configure other AWS Credentials
490
- uses: aws-actions/configure-aws-credentials@v3
498
+ uses: aws-actions/configure-aws-credentials@v4
491
499
with:
492
500
aws-region: us-east-2
493
501
role-to-assume: arn:aws:iam::987654321000:role/my-second-role
@@ -499,7 +507,7 @@ In this two-step example, the first step will use OIDC to assume the role `arn:a
499
507
# ## AssumeRole with static IAM credentials in repository secrets
500
508
` ` ` yaml
501
509
- name: Configure AWS Credentials
502
- uses: aws-actions/configure-aws-credentials@v3
510
+ uses: aws-actions/configure-aws-credentials@v4
503
511
with:
504
512
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
505
513
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
@@ -515,7 +523,7 @@ In this example, the secret `AWS_ROLE_TO_ASSUME` contains a string like `arn:aws
515
523
` ` ` yaml
516
524
- name: Configure AWS Credentials 1
517
525
id: creds
518
- uses: aws-actions/configure-aws-credentials@v3
526
+ uses: aws-actions/configure-aws-credentials@v4
519
527
with:
520
528
aws-region: us-east-2
521
529
role-to-assume: arn:aws:iam::123456789100:role/my-github-actions-role
@@ -524,7 +532,7 @@ In this example, the secret `AWS_ROLE_TO_ASSUME` contains a string like `arn:aws
524
532
run: |
525
533
aws sts get-caller-identity
526
534
- name: Configure AWS Credentials 2
527
- uses: aws-actions/configure-aws-credentials@v3
535
+ uses: aws-actions/configure-aws-credentials@v4
528
536
with:
529
537
aws-region: us-east-2
530
538
aws-access-key-id: ${{ steps.creds.outputs.aws-access-key-id }}
0 commit comments