https://github.com/cisagov/aws-profile-sync
Synchronize AWS credential profiles from remote sources
https://github.com/cisagov/aws-profile-sync
aws credentials git ssh sync
Last synced: 29 days ago
JSON representation
Synchronize AWS credential profiles from remote sources
- Host: GitHub
- URL: https://github.com/cisagov/aws-profile-sync
- Owner: cisagov
- License: cc0-1.0
- Created: 2020-02-10T18:53:05.000Z (almost 6 years ago)
- Default Branch: develop
- Last Pushed: 2025-10-08T02:16:24.000Z (about 1 month ago)
- Last Synced: 2025-10-08T04:13:35.544Z (about 1 month ago)
- Topics: aws, credentials, git, ssh, sync
- Language: Python
- Homepage:
- Size: 985 KB
- Stars: 15
- Watchers: 4
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# aws-profile-sync โ๏ธ๐งป๐ฐ #
[](https://github.com/cisagov/aws-profile-sync/actions)
[](https://github.com/cisagov/aws-profile-sync/actions/workflows/codeql-analysis.yml)
[](https://coveralls.io/github/cisagov/aws-profile-sync?branch=develop)
[](https://snyk.io/test/github/cisagov/aws-profile-sync)
`aws-profile-sync` is a command line utility that simplifies the synchronization
of
[AWS credential profiles](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html)
across groups of users.
## Requirements ##
- Python versions 3.6 and above. Note that Python 2 *is not* supported.
- Git version 2.23 and above if using the Git handler.
## Installation ##
From source:
```console
git clone https://github.com/cisagov/aws-profile-sync.git
cd aws-profile-sync
pip install -r requirements.txt
```
## Usage ##
The utility reads a credentials file looking for magic `#!aws-profile-sync` comments.
It will then fetch the remote content and intelligently integrate it into a new
credentials file.
```gitconfig
[cool-user]
aws_access_key_id = XXXXXXXXXXXXXXXXXXXX
aws_secret_access_key = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#!profile-sync ssh://git@github.com/aceofspades/aws-profiles.git branch=master filename=roles -- source_profile=cool-user role_session_name=lemmy-is-god mfa_serial=arn:aws:iam::123456789012:mfa/ian.kilmister
# This line will get replaced
#!profile-sync-stop
# These lines won't be modified by the utility.
# That was a great time, the summer of '71 - I can't remember it, but I'll never forget it!.
```
The utility will replace all the content between the `#!aws-profile-sync` and
`#!aws-profile-sync-stop` lines in the above example. To do this it will:
- Clone the repository that lives at `git@github.com/aceofspades/aws-profiles.git`.
- Switch to the `master` branch.
- Read the file `roles`.
- Override and replace any values specified after the `--` in the magic line.
A copy of your previous `credentials` file is stored next to it as `credentials.backup`.
For detailed usage instructions see: `aws-profile-sync --help`
## Contributing ##
We welcome contributions! Please see [`CONTRIBUTING.md`](CONTRIBUTING.md) for
details.
## License ##
This project is in the worldwide [public domain](LICENSE).
This project is in the public domain within the United States, and
copyright and related rights in the work worldwide are waived through
the [CC0 1.0 Universal public domain
dedication](https://creativecommons.org/publicdomain/zero/1.0/).
All contributions to this project will be released under the CC0
dedication. By submitting a pull request, you are agreeing to comply
with this waiver of copyright interest.