Skip to content

Instantly share code, notes, and snippets.

@matthewarthur
matthewarthur / ec2-permissive-SGs
Last active January 22, 2019 14:13
lambda to identify SGs with permissive rules, returning open ports 22 & 2289
import json
import boto3
region ="us-east-1"
def lambda_handler(event, context):
ec2 = boto3.client('ec2')
response = ec2.describe_security_groups(
Filters=[
{
@matthewarthur
matthewarthur / reader.py
Created December 22, 2018 02:05 — forked from bookshelfdave/reader.py
sample Python code using SQS
import boto3
sqs = boto3.client('sqs', region_name="us-west-2",
aws_access_key_id='',
aws_secret_access_key=''
)
queue_url = ''
response = sqs.receive_message(