Skip to content

AWS_* credentials are persisted throughout the job steps  #100

Closed
@0mnius

Description

@0mnius

Hello!

I can see that other actions in other steps are able to access AWS_* credentials set by aws-actions/configure-aws-credentials@v1:

image

Is there any flag like persist-credentials: false that i can use to unset those envars at the end of the step (like one in actions/checkout)?

Here is the workflow snips i use in my yaml file:

jobs:
  myjob:
    runs-on: windows-2016
    steps:

      # Do some stuff

      # Setup AWS CLI credentials
    - name: 'Configure AWS creds'
       uses: aws-actions/configure-aws-credentials@v1
       with:
         aws-access-key-id: ${{ secrets.MY_AWS_ACCESS_KEY_ID }}
         aws-secret-access-key: ${{ secrets.MY_AWS_SECRET_ACCESS_KEY }}
         aws-region: us-east-1

      # Publish to S3 
    - name: 'Copy to S3 bucket'
       run: |
         aws s3 cp ${{ github.workspace }}\foo\  s3://my-s3-bucket/bar/ --recursive --exclude "*" --include "*.baz"
       shell: pwsh

      # Send Slack notification
    - name: 'Slack channel notification'
       uses: 8398a7/action-slack@v3
       env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
       # other slack action config

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    closed-for-stalenessresponse-requestedWaiting on additional info and feedback. Will move to 'closing-soon' in 5 days.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions