mmmorris1975 / aws-runas

aws-runas rewritten in Go
MIT License
87 stars 20 forks source link

Add --ecs flag #55

Closed mmmorris1975 closed 4 years ago

mmmorris1975 commented 4 years ago

Add the --ecs flag to create an endpoint on the local system which can be used to get credentials for a profile.

Unlike the EC2 metadata feature, using the --ec2 flag, this new ECS feature does not require sudo/admin privileges on the host to run, since it uses an existing network interface (localhost), and a high-numbered port. However, the AWS libraries do not automatically know this endpoint address (like it does with the hard-coded http://169.254.169.254/ endpoint for the EC2 metadata service), so you are required to set the AWS_CONTAINER_CREDENTIALS_FULL_URI environment variable for the programs you are running to use this endpoint.

Fixes #54