aws-actions / configure-aws-credentials

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

AWS SSO Support with aws-actions/configure-aws-credentials #1051

Closed kotowick closed 4 months ago

kotowick commented 5 months ago

Describe the feature

Feature description

I am trying to use act locally but configure-aws-credentials fails. Is there anyway to get this to work with AWS SSO from a local machine?

I tried with role-chaining too.

The below config works in Github Actions, just not locally.

permissions: id-token: write contents: read

Use Case

Using ACT locally

Proposed Solution

No response

Other Information

No response

Acknowledgements

tim-finnigan commented 5 months ago

Thanks for the feature request, it sounds like this is something worth looking more into. Can you provide any additional context regarding your use case? Specially, what you're currently doing with ACT and how you are currently blocked.

github-actions[bot] commented 4 months 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.

stevenruizhang commented 3 months ago

i execute aws sso login, and i can get dev profile result for aws configure list --profile my-dev-admin-profile in my local, but when running the pipeline i get error "Error loading SSO Token: Token for my-sso does not exist", is that any configuration missing? image

image

name: 'Win_Deploy'

on: push: branches: [ "main" ] pull_request: workflow_dispatch:

permissions: id-token: write contents: read

jobs: build: name: 'Terraform' runs-on: self-hosted steps:

Clone the repository to the GitHub Actions runner

- name: Clone
  uses: actions/checkout@v2      
# Configure AWS Credentials
# You will need to replace <IAM_ROLE> with the IAM role ARN you created in the previous step
- name: Get AWS Configure List
  run: |
      aws configure list --profile my-dev-admin-profile
- name: Publish on aws dev env
  if: github.ref == 'refs/heads/master'
  run: ./publish_win.ps1 dev

1068

stevenruizhang commented 3 months ago

@tim-finnigan @swinton @jplock any updates on that?