Skip to content

Commit 8d1f990

Browse files
authored
Fixes the AWS Secrets end-to-end test by setting permissions for the .aws directory. (#6192)
Removes getting the STS caller. Updates the configure-aws-credentials GHA action to v5. Use a String for the binds map rather than a GString. Signed-off-by: David Venable <dlv@amazon.com>
1 parent 99f2521 commit 8d1f990

3 files changed

Lines changed: 7 additions & 9 deletions

File tree

.github/workflows/data-prepper-aws-secrets-e2e-tests.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,21 @@ jobs:
2929
ref: ${{ github.event.pull_request.head.sha }}
3030
- name: configure aws credentials
3131
id: creds
32-
uses: aws-actions/configure-aws-credentials@v4
32+
uses: aws-actions/configure-aws-credentials@v5
3333
with:
3434
role-to-assume: ${{ secrets.TEST_IAM_ROLE_ARN }}
3535
aws-region: ${{ secrets.TEST_REGION }}
3636
output-credentials: true
37-
- name: get caller identity 1
38-
run: |
39-
aws sts get-caller-identity
4037
- name: Configure AWS Credentials file
4138
run: |
4239
aws configure set default.region ${{ secrets.TEST_REGION }}
4340
aws configure set default.aws_access_key_id ${{ steps.creds.outputs.aws-access-key-id }}
4441
aws configure set default.aws_secret_access_key ${{ steps.creds.outputs.aws-secret-access-key }}
4542
aws configure set default.aws_session_token ${{ steps.creds.outputs.aws-session-token }}
43+
- name: Fix AWS credentials permissions for Docker
44+
run: |
45+
chmod 644 ~/.aws/credentials ~/.aws/config
46+
ls -la ~/.aws/
4647
- name: Set up JDK 11
4748
uses: actions/setup-java@v1
4849
with:

.github/workflows/kinesis-source-integration-tests.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,12 @@ jobs:
3030

3131
- name: configure aws credentials
3232
id: creds
33-
uses: aws-actions/configure-aws-credentials@v4
33+
uses: aws-actions/configure-aws-credentials@v5
3434
with:
3535
role-to-assume: ${{ secrets.TEST_IAM_ROLE_ARN }}
3636
aws-region: ${{ secrets.TEST_REGION }}
3737
output-credentials: true
3838

39-
- name: get caller identity 1
40-
run: |
41-
aws sts get-caller-identity
4239
- name: Configure AWS Credentials file
4340
run: |
4441
aws configure set default.region ${{ secrets.TEST_REGION }}

e2e-test/log/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ logTestConfigurations.each { testConfiguration ->
7979
exposePorts('tcp', [2021, 4900])
8080
hostConfig.portBindings = ['2021:2021', '4900:4900']
8181
hostConfig.binds = [
82-
"${System.getProperty('user.home')}/.aws" : '/.aws',
82+
("${System.getProperty('user.home')}/.aws".toString()) : '/.aws',
8383
(project.file("src/integrationTest/resources/${testConfiguration.pipelineConfiguration}").toString()) : '/usr/share/data-prepper/pipelines/log-pipeline.yaml',
8484
(project.file("src/integrationTest/resources/${testConfiguration.dataPrepperConfiguration}").toString()): '/usr/share/data-prepper/config/data-prepper-config.yaml'
8585
]

0 commit comments

Comments
 (0)