Skip to content

Setting AWS_PROFILE env var to role based profile with mfa creates general CLI error #559

@mikeapted

Description

@mikeapted

Current Behaviour

Setting AWS_PROFILE env var to access key/secret key causes no issue but changing to a profile based on role assumption with MFA causes:

$ ecs
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x48 pc=0x18a24e8]

goroutine 1 [running]:
github.com/aws/amazon-ecs-cli-v2/internal/pkg/cli.BuildInitCmd(0x1af3220)
	/aws-amazon-ecs-cli-v2/internal/pkg/cli/init.go:254 +0x1d8
main.buildRootCmd(0x0)
	/aws-amazon-ecs-cli-v2/cmd/ecs-preview/main.go:51 +0x104
main.main()
	/aws-amazon-ecs-cli-v2/cmd/ecs-preview/main.go:24 +0x22

Expected behaviour

$ ecs
Launch and manage applications on Amazon ECS and AWS Fargate.

Commands 
  Getting Started ✨
    init        Create a new ECS application.
 
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/enhancementIssues that are improvements for existing features.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions