An alternative i have been doing is you can actually use the below in my github action as a step , configure your role in AWS account role for github action permission (https://aws.amazon.com/blogs/security/use-iam-roles-to-connect-github-actions-to-actions-in-aws/)
- name: Configure AWS Credentials
# if: ${{ env.ACCOUNT == 'XXXX' }}
uses: aws-actions/[email protected]
with:
aws-region: ${{ env.REGION }}
role-to-assume: arn:aws:iam::xxxx:role/github-action-XXXX