• Stars
    star
    118
  • Rank 298,189 (Top 6 %)
  • Language
    Python
  • License
    MIT License
  • Created almost 8 years ago
  • Updated about 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

AWS bulk tagging tool

aws-tagger

Tagging AWS resources is hard because each resource type has a different API which is slightly different. The AWS bulk tagging tool eliminates these differences so that you can simplify specify the resource ID and the tags and it takes care of the rest. Any tags that already exist on the resource will not be removed, but the values will be updated if the tag key already exists. Tags are case sensitive.

Install

pip install aws-tagger

Usage

Tag individual resource with a single tag

aws-tagger --resource i-07a9d0e5 --tag "App:Foobar"  

Tag multiple resources with multiple tags

aws-tagger --resource i-07a9d0e5 --resource i-0456e3a9 --tag "App:Foobar" --tag "Team:My Team"

Tag multiple resources from a CSV file

AWS Tagger can also take input from a CSV file. The column names of the CSV file are the tag keys and the colume values are the tag values. The resource id must be in a column called Id. To switch between regions, you can add a Region column with the standard AWS regions names like us-east-1. If the Region column is missing it assumes that the region is the same as the AWS credentials.

echo 'Id,Region,App' > my-resources.csv
echo 'i-11111111,us-east-1,Foobar' >> my-resources.csv
echo 'i-22222222,us-east-1,Foobar' >> my-resources.csv

aws-tagger --csv my-resources.csv

AWS Resource Support

AWS Tagger supports the following AWS resource types.

EC2 instances

Any EC2 volumes that are attached to the instance will be automatically tagged.

aws-tagger --resource i-07a9d0e5 --tag "App:Foobar"  

S3 buckets

aws-tagger --resource my-bucket --tag "App:Foobar"  

RDS instances

aws-tagger --resource arn:aws:rds:us-east-1:111111111:db:my-db --tag "App:Foobar"  

EFS files systems

aws-tagger --resource arn:aws:elasticfilesystem:us-east-1:1111111111:file-system/fs-1111111 --tag "App:Foobar"  

Elastic Load Balancers

aws-tagger --resource arn:aws:elasticloadbalancing:us-east-1:11111111111:loadbalancer/my-elb --tag "App:Foobar"  

Application Load Balancers

aws-tagger --resource arn:aws:elasticloadbalancing:us-east-1:11111111111:loadbalancer/app/nile-content-api-syd-44c45100/f02ac6f33df89ba8 --tag "App:Foobar"  

Elasticache clusters

aws-tagger --resource arn:aws:elasticache:us-east-1:111111111:cluster:my-cluster --tag "App:Foobar"  

Elasticsearch clusters

aws-tagger --resource arn:aws:es:us-east-1:111111111:domain/my-domain --tag "App:Foobar"  

Kinesis streams

aws-tagger --resource arn:aws:kinesis:us-east-1:111111111:stream/my-stream --tag "App:Foobar"  

Cloudfront distributions

aws-tagger --resource arn:aws:cloudfront::1111111111:distribution/E1111111111111 --tag "App:Foobar"  

AWS credentials

AWS Tagger uses the standard AWS credential configuration options.

Environment variables

export AWS_REGION="us-east-1"
export AWS_ACCESS_KEY_ID="aka..."
export AWS_SECRET_ACCESS_KEY="123..."
aws-tagger --resource i-07a9d0e5 --tag "App:Foobar"  

IAM Roles

AWS Tagger also supports cross-account role assumption. You will still need to configure the initial AWS credentials using one of the methods above, but the role will be used to call the actuall AWS API.

aws-tagger --role arn:aws:iam::11111111111:role/MyRole --resource i-07a9d0e5 --tag "App:Foobar"

More Repositories

1

data-police-shootings

The Washington Post is compiling a database of every fatal shooting in the United States by a police officer in the line of duty since 2015.
1,117
star
2

data-homicides

The Washington Post collected data on more than 52,000 criminal homicides over the past decade in 50 of the largest American cities.
179
star
3

data-school-shootings

The Washington Post is compiling a database of school shootings in the United States since Columbine.
150
star
4

ans-schema

JSON schema definition and supporting example/validation code for The Washington Post's ANS specification
JavaScript
108
star
5

crosswalker

A general purpose tool for text-based crosswalking
TypeScript
99
star
6

wpds-ui-kit

WPDS's UiKit coded in React using Stitches, Radix UI and more! Also home to our docs site
TypeScript
89
star
7

FastFEC

An extremely fast FEC filing parser written in C
C
73
star
8

data-2C-beyond-the-limit-usa

The Washington Post's analysis of NOAA climate change data for the contiguous United States
HTML
62
star
9

2020-election-night-model

2020-election-night-model
R
58
star
10

ArcAds

ArcAds is a DFP wrapper created by Arc XP with publishers in mind.
JavaScript
56
star
11

whippersnapper

Whippersnapper is an automated screenshot tool to keep a visual history of content on the web.
Python
56
star
12

data-game-of-thrones-deaths

Every single on-screen death from Game of Thrones, including background extras and animals.
38
star
13

elex-live-model

a model to generate estimates of the number of outstanding votes on an election night based on the current results of the race
Python
37
star
14

nginx-lambda

Invoke lambda functions from NGINX.
C
29
star
15

data-congress-slaveowners

The Washington Post has compiled the first database of slaveholding members of Congress by examining thousands of pages of census records and historical documents
28
star
16

nginx-aws-lambda

nginx module to proxy calls to AWS Lambda's
C
25
star
17

datawrapper

The custom fork of https://github.com/datawrapper/datawrapper.
PHP
22
star
18

data-inaugural-committee

Python
20
star
19

docker-mongodb

MongoDB docker container
Shell
19
star
20

elex-clarity

A CLI tool for pulling in election results from sites using Clarity
Python
18
star
21

story-huawei-north-korea

18
star
22

data-1033-program

Agency-level data current to September 30, 2015. Source: Department of Defense, Defense Logistics Agency.
16
star
23

data-equitable-sharing-spending

Obtained in December 2014 through a Freedom of Information request
15
star
24

django-mongolier

A lightweight wrapper for using django with MongoDB (pymongo)
JavaScript
13
star
25

amazon-cross-account-kinesis-client-nodejs

Amazon Cross-Account Kinesis Client Library for Node.js
JavaScript
13
star
26

clokta

Python
13
star
27

arc-custom-embed

ARC Custom Embed Reference Implementation
HTML
10
star
28

docker-ecs

Build an EC2 Container Service cluster for running Docker containers.
Shell
10
star
29

wordpress-rest-api-java-client

Java Client for connecting to and parsing JSON coming our of a WordPress REST API plugin
Java
10
star
30

html2ans

Converts HTML into the Washington Post's ANS format
Python
9
star
31

ad-schema

A proposed standard for server to server ad operations.
9
star
32

dropwizard-json-exceptions

Reusable ExceptionMappers for Dropwizard Apps that want more verbose JSON error outputs
Java
8
star
33

wpds-assets-manager

WPDS Assets Manager
JavaScript
8
star
34

data-nfl-arrests

7
star
35

elex-solver

Python
7
star
36

kinesis-customer-sample

Sample application that processes a customers kinesis stream.
6
star
37

data_home_schooling

Data from The Post's groundbreaking analysis of home schooling enrollment across the US
6
star
38

ecs-optimizer

Optimizer your ECS cluster
Python
5
star
39

wpds-v0-docs

Static site to host our v0 documentation around our design system.
JavaScript
5
star
40

data-ncaa-power-five-school-financials

5
star
41

dropwizard-mongo-module

A guice module for connecting a Dropwizard app to a Mongo DB cluster
Java
5
star
42

serverless-plugin-nametag

Serverless framework plugin for applying a standard identification tag to AWS Lambda functions
JavaScript
4
star
43

wpds-plugins

WPDS Design Tools and Plugins for Figma, Zeplin, and more!
TypeScript
4
star
44

tachyons-css

WaPo's flavor of Tachyons, a CSS framework
JavaScript
4
star
45

django-tastypie-extensions

A set of extended capabilities for django-tastypie
Python
4
star
46

dropwizard-peer-authenticator

Dropwizard module to enable BasicAuth security around a service with convenience factories for reading in lists of (users, passwords) who are authorized to make requests of your service.
Java
4
star
47

arc-publishing-platform-postman-collection

This repo contains the Postman Collection for using the Arc Publishing Platform APIs.
4
star
48

data-random-chat-apps

Dataset of iOS app reviews for random chat apps. Manually tagged reviews with unwanted sexual behavior.
4
star
49

docker-memcached

Build a cluster on EC2 instances using Docker containers to run memcached.
Shell
4
star
50

dropwizard-liveness-reporter

Simple thread to squawk a "1" against a Statsd gauge to act as a sentinel for uptime monitors/alerts
Java
3
star
51

lambda-http-proxy

Proxy http requests to lambda functions
JavaScript
3
star
52

docker-jenkins

Docker setup for a Jenkins instance including most common build tools
Dockerfile
3
star
53

data-national-transit-database-heavy-rail-analysis

Comparing safety and reliability among the largest U.S. subways using the National Transit Database
HTML
3
star
54

ios-failable

Either monad to simplify data in completion blocks
Swift
2
star
55

wp-java-checkstyle

2
star
56

lambda-gateway

AWS Lambda Gateway
Go
2
star
57

wpds-coding-a-page-guide

JavaScript
2
star
58

storybook-addon-web-vitals

A storybook addon for instant feedback on loading, interactivity, and layout shift metrics.
JavaScript
2
star
59

py-arc

A client for Arc, written in python.
2
star
60

organ-transplant-shortages

Washington Post Analysis of Potential for Deceased Donor Organ Collection
1
star
61

gh-transfer-archived-repos

Perl
1
star
62

design-tokens

JavaScript
1
star
63

docker-kafka

Shell
1
star
64

wp-oss-parent-pom

Parent POM for open sourced com.washingtonpost artifacts.
1
star
65

arc-video-center-ingest

Ingest videos into ARC Video Center via SFTP & S3 uploads
JavaScript
1
star
66

docker-sangrenel

Kafka load testing tool
Shell
1
star
67

keating-mellnik-census-tracts

Local census data compiled by The Washington Post to explore the increasing share of Americans living in racially mixed city and suburban neighborhoods.
1
star
68

kafka-service-interface

Docker service that exposes Kafka producer and consumer API's
Java
1
star
69

data-republican-caucuses

This dataset contains the membership of each voting Republican to the five major ideological caucuses for Republicans in the U.S. House of Representatives about two months after the start of the 118th Congress, according to The Post's research and reporting.
1
star
70

coral-plugin-health

A simple healthcheck! Nothing serious.
JavaScript
1
star