I'm trying to get temporary STS credentials through a federated user via a corporate account. Corporate policy doesn't allow the use of IAM users and authentication is done through AD.
Using the AWS Cli, I am trying this, but receive an error
aws sts assume-role --role-arn arn:aws:iam::<ID>:role/aws-service-role/ecs.amazonaws.com/<role> --role-session-name "Rolesession1" --external-id <federated user login> --debug
AWS Config:
[default]
region = us-east-1
output = json
[default]
aws_access_key_id =
aws_secret_access_key =
aws_session_token =
Stacktrace:
An error occurred (InvalidClientTokenId) when calling the AssumeRole operation: The security token included in the request is invalid. 2019-01-29 09:15:54,986 - MainThread - awscli.clidriver - DEBUG - Exiting with rc 255
An error occurred (InvalidClientTokenId) when calling the AssumeRole operation: The security token included in the request is invalid.}