Example code for
Assumes:
- General understanding of how to build and run AWS SAM applications
Prerequisites:
- Python 3.7
- pip3(or- pipaliased to- pip3)
- make
- aws-cli
Tested on:
- Linux
- MacOS
- Install dependencies:
make install-dependencies- 
Note: - Depending on your local setup you might want to change pip3topip. This makefile assumes the Python3 version.
- Running make install-dependenciesis a one-off task, feel free to install the required Python packages with your preferred tool)
 
- Depending on your local setup you might want to change 
- 
Change into pipenv-shell:
pipenv shell- Configure AWS profile:
export AWS_PROFILE=[your profile name](or use the default profile if configured)
- Create artifact bucket:
- Edit ARTIFACT_BUCKETinMakefileto become globally unique
- E.g. default-sg-remediation-artifacts-[your account id]
 
- Edit 
make create-artifact-bucketmake deploy- Change egress or ingress on the default security group
- Lambda gets invoked
- egress/ingress get revoked
- security group gets tagged
 
