Skip to main content

EC2 Metadata Service Imposter

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

Installation

pip install imposter

Usage

Launching the service

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

If the service detects you do not have the private IP address 169.254.169.254, 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 http://169.254.169.254/roles/<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

[myidentity]
aws_access_key_id = ABCDEFGHIJKLMNOPQRST
aws_secret_access_key = abcdefghij1234567890abcdefghij1234567890

Metadata

Release files for imposter 0.0.13

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for imposter 0.0.13
File Size Uploaded Provenance Actions
imposter-0.0.13.tar.gz 7.5 kB Without provenance Details for imposter-0.0.13.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for imposter 0.0.13
File Interpreter ABI Platform Actions
imposter-0.0.13-py2-none-any.whl Python 2 none any Details for imposter-0.0.13-py2-none-any.whl

Total release size: 16.0 kB

Release files / imposter-0.0.13.tar.gz

Download URL imposter-0.0.13.tar.gz
Size 7.5 kB
Tags Source
SHA-256 checksum
How to use checksums
2e811108995d86b84390ecec4506b60e57d577cc7e2da34beab9fac4021571ea
BLAKE2b-256 checksum
How to use checksums
6b6e440af175ffdd61ab0954bd5fcbe5748077115653b5f026295cbdc98cb641
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / imposter-0.0.13-py2-none-any.whl

Download URL imposter-0.0.13-py2-none-any.whl
Size 8.5 kB
Tags Python 2
SHA-256 checksum
How to use checksums
40e41ab32ec124d3ba85321cae631511354b5269107bd66ede8df509400273a4
BLAKE2b-256 checksum
How to use checksums
694db5cbbd6a9cbe7859631bd7e9e38019af0142e2811c8c54cc79a939e25bbb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for imposter 0.0.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page