Skip to main content

AWS EC2 Metadata Imposter Service

Project description

This service was created to ease the usage of AWS SDK tools with using assumed roles in your development environment.


pip install imposter


Launching the service

imposter --profile <AWS CLI profile name> [--bind [host]:port]( [-D] (daemonize)

If the service detects you do not have the private IP address, it will attempt to create it for you with sudo. It will also ask for credentials so that you can run the service on privileged ports.

Stopping the service

imposter --stop

Listing roles

imposter --roles

Switching roles

imposter --profile <AWS CLI profile name>

If the service is running, it will attempt to switch the active role. If not, it will launch it. Switching roles is equivalent to running

curl -XPOST<profilename>

Checking service status

imposter --status

Your AWS CLI config

Your AWS CLI config should not have credentials in the default profile, otherwise the AWS SDK will look there for credentials before looking for the EC2 Metadata service. Instead, have your config profiles point to a separate, non-default section with your credentials, e.g.

[profile teamrole1]
role_arn = arn:aws:iam::123456789012:role/teamrole1
source_profile = myidentity
role_session_name = teamrole1

[profile teamrole2]
role_arn = arn:aws:iam::123456789012:role/teamrole2
source_profile = myidentity
role_session_name = teamrole2

aws_access_key_id = ABCDEFGHIJKLMNOPQRST
aws_secret_access_key = abcdefghij1234567890abcdefghij1234567890

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for imposter, version 0.0.13
Filename, size File type Python version Upload date Hashes
Filename, size imposter-0.0.13-py2-none-any.whl (8.5 kB) File type Wheel Python version 2.7 Upload date Hashes View
Filename, size imposter-0.0.13.tar.gz (7.5 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page