Skip to content

CLIP-1903: Test.

CLIP-1903: Test. #7

Workflow file for this run

name: Check AWS Role Assumption
on:
workflow_dispatch:
push:
branches:
- CLIP-1903-new-github-action-to-update-policy
jobs:
check-role-assumption:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Install jq
run: sudo apt-get update && sudo apt-get install -y jq
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-region: us-east-1
role-to-assume: ${{ secrets.AWS_IAM_ROLE }}
role-session-name: TestSession
role-duration-seconds: 600
- name: Verify AWS Credentials and Extract Role Name
run: |
IDENTITY_JSON=$(aws sts get-caller-identity)
ROLE_NAME=$(echo $IDENTITY_JSON | jq -r '.Arn' | cut -d'/' -f2)
FIRST_10_CHARS=$(echo $ROLE_NAME | cut -c1-10)
echo "Role Name First 10 Chars: $FIRST_10_CHARS"