To use the SMTP interface of AWS SES, you need to generate credentials based on the secret access key of an IAM user. AWS does provide an example script in the documentation, but copying code out of the documentation isn't very user friendly. This tool does the same thing, but its easier to install (if you already have a working python environment).
This code can be installed from pypi. E.g. using pip or pipx.
# with pipx, recommended for a cli tool
pipx install ses-smtp-credentials
# with pip
pip install ses-smtp-credentials
You need to supply the secret access key and the region. ses-smtp-credentials will ask you for missing information, so both are optional arguments.
# Interactive
ses-smtp-credentials
# Non-interactive
ses-smtp-credentials --secret SECRET_ACCESS_KEY --region REGION
This code was based on sample code from the AWS documentation that was released under a modified MIT license on GitHub. In the documentation it's called "smtp_credentials_generate.py". The same license has been adapted to this repository. See the LICENSE file.