Skip to main content
Join the chat at https://gitter.im/Answers4AWS/graffiti-monkey Build Status

The Graffiti Monkey goes around tagging things. By looking at the tags an EC2 instance has, it copies those tags to the EBS Volumes that are attached to it, and then copies those tags to the EBS Snapshots.

Usage

usage: graffiti-monkey [-h] [--region REGION] [--profile PROFILE] [--verbose] [--version] [--config CONFIG.YML] [--dryrun]

Propagates tags from AWS EC2 instances to EBS volumes, and then to EBS
snapshots. This makes it much easier to find things down the road.

optional arguments:
  -h, --help           show this help message and exit
  --region REGION      the region to tag things in (default is current region of
                       EC2 instance this is running on). E.g. us-east-1
  --profile PROFILE    the profile to use to connect to EC2 (default is 'default',
                       see Boto docs for profile credential options)
  --verbose, -v        enable verbose output (-vvv for more)
  --version            display version number and exit
  --config CONFIG.YML  read a yaml configuration file.  specify tags to propagate without changing code.
  --dryrun             dryrun only, display tagging actions but do not perform them
  --append             append propagated tags to existing tags (up to a total of ten tags). When not set,
                       graffiti-monkey will overwrite existing tags.

Examples

Suppose you have the following in us-east-1:

i-abcd1234
  - Tags:
    - Name: "Instance 1"

vol-bcde3456
  - Attached to i-abcd1234 on /dev/sda1

snap-cdef4567
  - Snapshot of vol-bcde3456

When you run:

graffiti-monkey --region us-east-1

First, Graffiti Monkey will set the EBS volume tags

vol-bcde3456
  - Tags:
    - Name: "Instance 1"
    - instance_id: i-abcd1234
    - device: /dev/sda1

and then it will set the tags on the EBS Snapshot

snap-cdef4567
  - Tags:
    - Name: "Instance 1"
    - instance_id: i-abcd1234
    - device: /dev/sda1

Installation

You can install Graffiti Monkey using the usual PyPI channels. Example:

sudo pip install graffiti_monkey

You can find the package details here: https://pypi.python.org/pypi/graffiti_monkey

Alternatively, if you prefer to install from source:

git clone git@github.com:Answers4AWS/graffiti-monkey.git
cd graffiti-monkey
python setup.py install

Configuration

This project uses Boto to call the AWS APIs. You can pass your AWS credentials to Boto can by using a .boto file, IAM Roles or environment variables. Full information can be found here:

http://boto.readthedocs.org/en/latest/boto_config_tut.html

Graffiti-monkey itself can be configured using a yaml file

---
#region: us-west-1
_instance_tags_to_propagate:
  - 'Name'
  - 'Owner'

_volume_tags_to_propagate:
  - 'Name'
  - 'instance_id'
  - 'device'
  - 'Owner'

_instance_tags_to_propagate is used to define the tags that are propagated from an instance to its volumes. _volume_tags_to_propagate defines the tags that are propagated from a volume to its snapshots.

When using yaml configuration files you need to have pyYAML. This can be easily setup

using pip pip install PyYAML. If you don’t use config files you don’t have this limitation.

Wiki

Can be found here: https://github.com/Answers4AWS/graffiti-monkey/wiki

Source Code

The Python source code for Graffiti Monkey is available on GitHub:

https://github.com/Answers4AWS/graffiti-monkey

About Answers for AWS

This code was written by Peter Sankauskas, founder of Answers for AWS - a company focused on helping businesses learn how to use AWS, without doing it the hard way. If you are looking for help with AWS, please contact us.

License

Copyright 2013 Answers for AWS LLC

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Release files for graffiti_monkey 0.9.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for graffiti_monkey 0.9.0
File Size Uploaded
graffiti_monkey-0.9.0.tar.gz 14.2 kB Details

Release files / graffiti_monkey-0.9.0.tar.gz

Download URL graffiti_monkey-0.9.0.tar.gz
Size 14.2 kB
Tags Source
SHA-256 checksum
How to use checksums
2e91bf8332e626d6087829431e41cb94807fd2bf600162953e9a629f12fe9749
BLAKE2b-256 checksum
How to use checksums
695990323eaf309fd7492d016eb344aa2c4036a50e5ded0a856e21ed22d928ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.9.0 This release

1 release file

0.8.0

0.7.0

2 release files

0.6.0

1 release file

0.5.3

1 release file

0.5.2

1 release file

0.5.1

1 release file

0.5.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page