- Newest
- Most votes
- Most comments
Based on the error message you're receiving, the issue is that the aws-region parameter is missing from your GitHub Actions workflow configuration. When configuring AWS credentials in your GitHub Actions workflow, you need to explicitly provide the AWS region.
To fix this, you need to:
- Add the
aws-regionparameter to your Configure AWS Credentials step in your workflow file - Set up a secret variable in your GitHub repository called
AWS_REGIONwith your desired AWS region value (e.g.,us-east-1,eu-west-1, etc.)
Your Configure AWS Credentials step should look something like this:
- name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v1 with: role-to-assume: ${{ secrets.YOUR_ROLE_ARN }} aws-region: ${{ secrets.AWS_REGION }}
Make sure you've properly configured the AWS_REGION secret in your GitHub repository settings under Settings > Secrets and variables > Actions. This will provide the required region parameter that the action is looking for.
If you're using IAM user credentials instead of role assumption, you'll still need to include the aws-region parameter in the same way.
Sources
Community | Shift Left! A story on how to avoid security issues by using cloud services
Community | Shift Left! A story on how to avoid security issues by using cloud services
