Execute commands across multiple AWS accounts available via single sign-on (SSO).
ssorepeat [--help] [--profile PROFILE] [FILTERS] [COMMAND [ARGS]]
Repeats execution of COMMAND
across AWS accounts selected via FILTERS
when
logged in a Single Sign-On (SSO) session. Use --profile PROFILE
to select
session credentials for botocore.session
. ssorepeat
writes the results of
COMMAND
as a JSON on the standard output.
aws --profile some-profile sso login
ssorepeat --profile some-profile \
--include-only "\b[Dd]emo\b" \
exec aws s3 ls
After SSO login, ssorepeat
will run aws s3 ls
in accounts whose name
contains the word "Demo" or "demo", using the default SSO role setup for this
profile.
curl -sSL https://install.python-poetry.org | python3 -
Add it to your $PATH
then proceed into the repository:
poetry build
pip install .
cp bin/ssorepeat ~/.local/bin
If you don't like to pollute your own local python environment and only need it
temporarily, a quick and dirty way is to move bin/ssorepeat
to the
repository's root and renaming it:
cp bin/ssorepeat ssorepeat.sh
chmod a+x ssorepeat.sh
./assorepeat.sh --help
ssorepeat --help
ssorepeat
is free software provided as-is under the terms of the Apache
License, version 2.0. This software and its authors are not affiliated to AWS.