https://www.amazon.com/dp/B09PVD9VSC/
- Create a virtual environment and install dependencies:
python -m venv avenv
source avenv/bin/activate
pip install -r requirements/requirements-dev.txt
- run unittests and make sure they pass
python -m unittest
- install aws cli v2 for working with aws resources locally
#assumes region is set and output type is json
((aws ssm get-parameter --name /burnday/v1 --with-decryption | ConvertFrom-Json).Parameter.Value | ConvertFrom-Json)
aws cloudformation update-stack --stack-name burnday-alexa-skill --template-body file://templates/burnday_alexa_skill.template --tags Key=project,Value=burnday Key=prod,Value=yes Key=cloudformation_managed,Value=yes
implement to ensure no secrets are commited locally:
setup a baseline where all tracked files will be compared to:
detect-secrets scan > .secrets.baseline
compare all tracked files to baseline the results
key should be {}
if no secrets are present
detect-secrets scan | \
python3 -c "import sys, json; print(json.load(sys.stdin)['results'])"
(detect-secrets scan | ConvertFrom-Json).results