Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Credentials could not be loaded after migrate to v4 #850

Closed
myshon opened this issue Sep 14, 2023 · 2 comments
Closed

Credentials could not be loaded after migrate to v4 #850

myshon opened this issue Sep 14, 2023 · 2 comments
Labels
bug Something isn't working needs-triage This issue still needs to be triaged

Comments

@myshon
Copy link

myshon commented Sep 14, 2023

Describe the bug

I use following credentials configuration (github workflows)

name: Pull request

on:
  pull_request:
    branches:
      - main
...
  plan:
    name: Terraform Plan
    runs-on: ubuntu-latest
...
    steps:
      - name: Checkout
        uses: actions/checkout@v3

      - name: Configure AWS Credentials
        uses: aws-actions/configure-aws-credentials@v2
        with:
          aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
          aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
          role-skip-session-tagging: true
          role-duration-seconds: 900
          aws-region: us-east-1
          mask-aws-account-id: false

It had worked, but recently v2 suddenly stopped working with the following error ❌

Run aws-actions/configure-aws-credentials@v2
(node:2260) NOTE: We are formalizing our plans to enter AWS SDK for JavaScript (v2) into maintenance mode in 2023.

Please migrate your code to use AWS SDK for JavaScript (v3).
For more information, check the migration guide at https://a.co/7PzMCcy
(Use `node --trace-warnings ...` to show where the warning was created)
Error: Credentials could not be loaded, please check your action inputs: Could not load credentials from any provider

I migrated to v4 but another error occurred. ❌

Run aws-actions/configure-aws-credentials@v4
  with:
    role-skip-session-tagging: true
    role-duration-seconds: 900
    aws-region: us-east-1
    mask-aws-account-id: false
    audience: sts.amazonaws.com
...

Error: Credentials could not be loaded, please check your action inputs: Could not load credentials from any providers

I reverted to v3 and it works ✅

Expected Behavior

Success - credentials configured correctly ✅

Current Behavior

Run aws-actions/configure-aws-credentials@v4
  with:
    role-skip-session-tagging: true
    role-duration-seconds: 900
    aws-region: us-east-1
    mask-aws-account-id: false
    audience: sts.amazonaws.com


Error: Credentials could not be loaded, please check your action inputs: Could not load credentials from any providers

Reproduction Steps

github workflow step invoked on dependabot pull-request

  plan:
    name: Terraform Plan
    runs-on: ubuntu-latest
...
    steps:
      - name: Checkout
        uses: actions/checkout@v3

      - name: Configure AWS Credentials
        uses: aws-actions/configure-aws-credentials@v2
        with:
          aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
          aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
          role-skip-session-tagging: true
          role-duration-seconds: 900
          aws-region: us-east-1
          mask-aws-account-id: false

Possible Solution

No response

Additional Information/Context

No response

@myshon myshon added bug Something isn't working needs-triage This issue still needs to be triaged labels Sep 14, 2023
@myshon
Copy link
Author

myshon commented Sep 14, 2023

Sorry, I've found that similar issue exists #202 #188 and probably are related with Dependabot.

@myshon myshon closed this as completed Sep 14, 2023
@github-actions
Copy link

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-triage This issue still needs to be triaged
Projects
None yet
Development

No branches or pull requests

1 participant