aws-actions / configure-aws-credentials

Configure AWS credential environment variables for use in other GitHub Actions.
MIT License
2.46k stars 468 forks source link

Not recognizing inputs for configuring credentials #1158

Open mikeheft opened 1 month ago

mikeheft commented 1 month ago

Describe the bug

I am receiving an error in my action logs about an error:

> Run aws-actions/configure-aws-credentials@v4
  with:
    audience: sts.amazonaws.com
  Error: Input required and not supplied: aws-region

However, here is my job step. I had it set with ${{ secrets.AWS_REGION }} but that was failing as well, so I hard coded it.

permissions:
  id-token: write
  contents: read
steps:
  - name: Set up AWS credentials
    uses: aws-actions/configure-aws-credentials@v4
    with:
      aws-region: us-west-2
      aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
      aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

Here are the logs from that step. The secrets in question are all set properly. This was working previously then I moved it to a reusable workflow and that is when it started to fail.

##[debug]Evaluating condition for step: 'Set up AWS credentials'
##[debug]Evaluating: success()
##[debug]Evaluating success:
##[debug]=> true
##[debug]Result: true
##[debug]Starting: Set up AWS credentials
##[debug]Register post job cleanup for action: aws-actions/configure-aws-credentials@v4
##[debug]Loading inputs
##[debug]Evaluating: secrets.AWS_ACCESS_KEY_ID
##[debug]Evaluating Index:
##[debug]..Evaluating secrets:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'AWS_ACCESS_KEY_ID'
##[debug]=> null
##[debug]Result: null
##[debug]Evaluating: secrets.AWS_SECRET_ACCESS_KEY
##[debug]Evaluating Index:
##[debug]..Evaluating secrets:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'AWS_SECRET_ACCESS_KEY'
##[debug]=> null
##[debug]Result: null
##[debug]Evaluating: secrets.AWS_REGION
##[debug]Evaluating Index:
##[debug]..Evaluating secrets:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'AWS_REGION'
##[debug]=> null
##[debug]Result: null
##[debug]Loading env
Run aws-actions/configure-aws-credentials@v4
Error: Input required and not supplied: aws-region
##[debug]Node Action run completed with exit code 1
##[debug]Finishing: Set up AWS credentials

Regression Issue

Expected Behavior

Expected it to configure the credentials successfully as it did previously

Current Behavior

> Run aws-actions/configure-aws-credentials@v4
  with:
    audience: sts.amazonaws.com
  Error: Input required and not supplied: aws-region

Reproduction Steps

Possible Solution

No response

Additional Information/Context

The secrets in question are all set properly. This was working previously then I moved it to a reusable workflow and that is when it started to fail.

kellertk commented 5 days ago

Your run output indicates that your secrets aren't being picked up at all by the action run. Are you sure you have permissions to read them? Organization-level secrets might have different permissions and secrets aren't populated to forked repositories. Please review https://docs.github.com/en/actions/security-for-github-actions/security-guides/using-secrets-in-github-actions

github-actions[bot] commented 7 hours ago

This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.