amazon-ecs-local-container-endpoints icon indicating copy to clipboard operation
amazon-ecs-local-container-endpoints copied to clipboard

Is it possible to use this container if the profile that I want to use locally has MFA enabled?

Open gillespied opened this issue 2 years ago • 0 comments

I've very modified the example to use a profile from my local config:

    environment:
      # define the home folder; credentials will be read from $HOME/.aws
      HOME: "/home"
      # You can change which AWS CLI Profile is used
      AWS_PROFILE: "assumed-profile"

To authenticate as assumed profile at the command line I would need to provide an MFA code. My config looks something like:

[profile assumed_profile]
role_arn = arn:aws:iam::etc
mfa_serial = arn:aws:iam::etc
source_profile = default
region = eu-west-2
output = json

Running my docker compose file now I get the error:

Failed to create Credentials Service: AssumeRoleTokenProviderNotSetError: assume role with MFA enabled, but AssumeRoleTokenProvider session option not set.

How do i tell the local endpoint the MFA code so that it can assume the role?

gillespied avatar Mar 30 '23 17:03 gillespied