Skip to content

Instantly share code, notes, and snippets.

View tjpatter's full-sized avatar
🤘

Timothy Patterson tjpatter

🤘
View GitHub Profile
@tjpatter
tjpatter / cfn-s3-queue-notification.yml
Created October 8, 2020 12:31 — forked from davidfrey/cfn-s3-queue-notification.yml
Cloud Formation: S3 Queue Notification
AWSTemplateFormatVersion: "2010-09-09"
Description: Video Processing Queue Pipeline, S3 -> SQS -> Lambda -> EC2 (GPU instance)
Metadata:
AWS::CloudFormation::Interface:
ParameterGroups:
- Label:
default: Stack Variables
Parameters:
- Environment
- AppName
#!/bin/bash
ip=$1
aws ec2 describe-instances --filter "Name=private-ip-address, Values=${ip}" --query 'Reservations[*].Instances[*].{InstanceId:InstanceId,PrivateIpAddress:PrivateIpAddress,Name:Tags[?Key==`Name`] | [0].Value}' --output text