This is a project build with Python and AWS CDK. The goal is to have SSH honeypot infrastructure deployed and destroyed within seconds and logged to to CloudWatch for persistence so a Splunk instance can ingest it (for example).
The cdk.json
file tells the CDK Toolkit how to execute this app.
To manually create a virtualenv execute:
python3 -m venv .env
After the init process completes and the virtualenv is created, you can use the following step to activate your virtualenv.
source .env/bin/activate
Once the virtualenv is activated, you can install the required dependencies.
pip install -r requirements.txt
At this point you can now synthesize the CloudFormation template for this code.
cdk synth
To add additional dependencies, for example other CDK libraries, just add
them to your setup.py
file and rerun the pip install -r requirements.txt
command.
Run the bootstrap for the stack
cdk bootstrap
And then deploy it
cdk deploy cdk-cowrie-honeypots
And you're done!
cdk ls
list all stacks in the appcdk synth
emits the synthesized CloudFormation templatecdk deploy
deploy this stack to your default AWS account/regioncdk diff
compare deployed stack with current statecdk docs
open CDK documentation
Enjoy the honeypots and easy deployment!