Skip to main content

Usage of awsenv

  1. Install boto3 to your base env

  2. Add the following awsenv function to your shell resource config (e. g. .zshrc or .oh-my-zsh/custom/awsenv.zsh)

awsenv(){
  eval $(awsenv-cli $@)
}
  1. Add a config.jsonc (note the c for comment) with the following strutucture under ~/.awsenv/config.json
{
    "AWS_DEFAULT_REGION": "eu-central-1",
    "AWS_DEFAULT_OUTPUT": "json",
    "AWS_PAGER": "",

    "defaultUser": "<your-name-you-want-to-login-with-by-default,must-match-a-name-below-in-users>",
    "defaultRole": "<some-role-name>",
    "defaultAccount": "<some-account-id>",
    "defaultDuration": 3600,

    "users": {
        "<your-name-1>": {
            "AWS_ACCESS_KEY_ID": "<your-access-key>",
            "AWS_SECRET_ACCESS_KEY": "<your-secret-access-key>",
            "SERIAL_NUMBER": "<your-mfa-serial>"
        }
    },

    "predefinedShortcuts": {
        "<some-shortcut-1>": {
            "user": "<your-name>",
            "role": "<some-role-name>",
            "account": "<some-account-id>",
            "duration": 43200
        },
        "<some-shortcut-2>": {
            "user": "<your-name>",
            "role": "<some-role-name>",
            "account": "<some-account-id>",
            "duration": 3600
        }
    }
}

Development of awsenv

Metadata

Release files for awsenv-cli 0.0.3

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

Source distribution (sdist)

Source distribution for awsenv-cli 0.0.3
File Size Uploaded
awsenv-cli-0.0.3.tar.gz 5.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for awsenv-cli 0.0.3
File Interpreter ABI Platform
awsenv_cli-0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 11.8 kB

Release files / awsenv-cli-0.0.3.tar.gz

Download URL awsenv-cli-0.0.3.tar.gz
Size 5.5 kB
Tags Source
SHA-256 checksum
How to use checksums
682ddb3dcd8294ad0cb25dee7f562ef60b76a0e4a97e132f3914935a96558b96
BLAKE2b-256 checksum
How to use checksums
319c7990a7b586cae5696939d900381157dc74228c0bf42cde5f6c912c3f1c44
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.2

Release files / awsenv_cli-0.0.3-py3-none-any.whl

Download URL awsenv_cli-0.0.3-py3-none-any.whl
Size 6.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1f3bfec7168c5863f123de58b228c11881faf1df2cb742d7e392d25b8b1efa40
BLAKE2b-256 checksum
How to use checksums
b3b70051ef4c5b05bb51a6d5a346b2c1aaa8e0238666607678090a8c59bc0f38
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.2

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files

0.0.2

2 release files

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