Skip to content

Instantly share code, notes, and snippets.

{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"sts:AssumeRole",
"ec2:DescribeInstances",
"ec2:DescribeTags",
"ec2:CreateTags",
@nskitch
nskitch / aws_tag_audit_plus_cloudwatch.py
Created August 15, 2017 22:42
aws_tag_audit_plus_cloudwatch
#!/usr/bin/env python
#
# Author: Nick Skitch (CAP team)
# For Tagging Compliance.
prog_desc = "Generate CSV report of all instance tags"
#
# Name => <datacenter>-<environment>-<org>-<customer>-<application>-<additional>
# Creator => Ex: CAP, PAAS, etc
# App => Ex: Cassandra, Redis, EMR, etc.
# AppOwner => (Acutal Customer who is using the app) Ex: Asset Team
@nskitch
nskitch / generate_csv_all_instance_tags.py
Created July 19, 2017 21:17
Generate report for AWS required tags
#!/usr/bin/env python
#
# Author: Nick Skitch (CAP team)
# For Tagging Compliance.
prog_desc = "Generate CSV report of all instance tags"
import boto3
import json
import argparse
import csv
@nskitch
nskitch / aws_tag_audit.py
Created July 19, 2017 21:13
aws tag audit NON_COMPLIANT_TAGGING
#!/usr/bin/env python
#
# Author: Nick Skitch
# For Tagging Compliance.
prog_desc = "Evaluation of AWS EC2 instances for tag compliance. If dryrun false, will add non_compliant_tag key tag with value \
of missing required tags. WIP."
import boto3
import json
import argparse