NOTE: these instructions are for Mac/Linux - Windows users can perhaps adapt this as required.
Create an executable script called aws-ssh-proxy in a location in your path (or add a new location to your path).
#!/usr/bin/env bash
set -o nounset| { | |
| "tenant": "test", | |
| "countries": ["US","UK","DE"], | |
| "cidrs": [ | |
| "10.45.70.0/23", | |
| "56.116.207.0/24", | |
| "84.199.246.0/24", | |
| "132.121.105.0/24", | |
| "188.187.189.0/24", | |
| "125.143.200.0/24", |
| # content provided as part of thread here: https://www.reddit.com/r/aws/comments/cffmxr/how_do_you_strip_the_attachments_from_aws_sessns/ | |
| from email.parser import BytesParser | |
| from email import policy | |
| import os | |
| # event will be JSON from SES incoming email rule - NOT an S3 PUT event | |
| def lambda_handler(event, context): | |
| try: | |
| ses_mail = event['Records'][0]['ses']['mail'] |