Skip to main content

ccaawscreds

Command line commands, awskey and awspw, to change your AWS credentials.

Command genpw to generate arbitray passwords using the password generator.

These tools will only work with credentials stored in the ~/.aws/config file, not in the ~/.aws/credentials file.

AWS Config format is:

[profile profile-name]
aws_access_key_id = AKIA....
aws_secret_access_key = ....

These tools use 2 extra keys for each section in the config file: user and password i.e.

[profile profile-name]
aws_access_key_id = AKIA....
aws_secret_access_key = ....
user = chris.allison
password = anythIng you W@ant

Both of these commands rely on the entries in the config file, if one of the items is missing they will fail.

Note: though the AWS Config file format requires that each profile section has profile prepended to the name, there is no need to type that when referencing it, both these tools, boto3 and the AWS CLI look for just the bare profile name without the word profile prepended (see the examples below).

awspw

This command will change the users password in the named profile, storing the new password back into the config file and also displaying it to the screen along with the old password. The password generator can be optionally configured to return passwords of a certain length. It also splits the generated password into blocks of 4 characters seperated by spaces, as AWS allows spaces in passwords.

Example awspw

$ awspw -l 32 sadmin-static
awscreds 0.2.3
current: 98b8 8d89 7e82 9bec 2)05 1e14 a8Fb a0e9
new: d96d 21fd A816 2762 a[19 81e3 cc52 2af9
$

awskey

This command rotates the users access key for the named profile. It will first delete any inactive keys, then generate a new one, storing it in the config file. Lastly, it deactivates the old, active key.

If you have 2 active aws keys, this command will fail, delete or deactivate one of them and try again.

Example awskey

$ awskey sadmin-static
awscreds 0.2.3
New access key id AKIAXxxxxxxxxxxxxxxx created.
$

genpw

This command will generate an arbitrary password and display it. It uses the password generator with the same limits as above (between 8 and 32 characters, default being 16). It can optionally remove all the spaces from the password.

The password generator works by selecting 4 random words from a list, hashing them with the sha256 function, randomly selecting characters from the resulting string up to the required length. It will then insert a random non-alphabetic character into a random position in the string, and then switch one of the alphabetic characters to upper-case. This should be enough for most password policies.

There is also a list of characters that will not appear in the password to avoid misinterpretation, they are bBiIlLoO so a 0 in the output is definitely a zero not a capital o, simarlarly, a '1' in the output is definitely a one not a lower case L.

Update: as the password is now run through a hashing function, the only letters in the password will be a-f, so the excluded letter check has now been removed.

Example genpw

$ genpw -l 32
ca4b 4dac 74bb d^1c 2b2F 0d2e 8b4d 264c

$ genpw -l 10 -n
149388^34A

Metadata

Release files for ccaawscreds 0.5.6

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

Source distribution (sdist)

Source distribution for ccaawscreds 0.5.6
File Size Uploaded Provenance
ccaawscreds-0.5.6.tar.gz 19.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for ccaawscreds 0.5.6
File Interpreter ABI Platform
ccaawscreds-0.5.6-py3-none-any.whl Python 3 none any Details

Total release size: 38.2 kB

Release files / ccaawscreds-0.5.6.tar.gz

Download URL ccaawscreds-0.5.6.tar.gz
Size 19.4 kB
Tags Source
SHA-256 checksum
How to use checksums
e4b837d5838a8d204621c1d5257264998e406b328ace3e0418359caf8e80f034
BLAKE2b-256 checksum
How to use checksums
635c55bf44eb382c99cfbad50496e47a56c7ad6d6f13475edba4648cb01330c9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.5 CPython/3.8.5 Linux/5.8.3-2-MANJARO

Release files / ccaawscreds-0.5.6-py3-none-any.whl

Download URL ccaawscreds-0.5.6-py3-none-any.whl
Size 18.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3c3f81087ccc624ef548b983d3b9d792edda04fa1d365069a75de89b07a71261
BLAKE2b-256 checksum
How to use checksums
8c3e4e6d83f742375b25b74b1754a0156ecb22b3f1f5119f705ed262adf49a0b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.5 CPython/3.8.5 Linux/5.8.3-2-MANJARO

Security for ccaawscreds 0.5.6

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.

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