Skip to content

Action is always assuming role with user credentials on 2nd call #1339

@ecs-jnguyen

Description

@ecs-jnguyen

Describe the bug

Hello, the latest commit 2c168adcae62d67531ba83842723c8f30695116a on the main branch is always trying to do role chaining instead of OIDC when we call configure-aws-credentials the second time.

This was introduced as part of #1338

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

I am expecting the role to be assumed via OIDC with this message Assuming role with OIDC

Current Behavior

I am seeing the message Assuming role with user credentials. It fails because the role to assume does not allow the previous role to assume it.

Reproduction Steps

name: Test Action

on:
  push:
  workflow_dispatch:

permissions:
  id-token: write
  contents: read

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: aws-actions/configure-aws-credentials@2c168adcae62d67531ba83842723c8f30695116a
        with:
          aws-region: us-west-2
          role-to-assume: <role-to-assume-here>

      - uses: aws-actions/configure-aws-credentials@2c168adcae62d67531ba83842723c8f30695116a
        with:
          aws-region: us-west-2
          role-to-assume: <role-to-assume-here>

Possible Solution

No response

Additional Information/Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingp0

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions