cloudavail / aws-missing-tools

tools for managing AWS resources including EC2, EBS, RDS, IAM, CloudFormation and Route53.
1.34k stars 406 forks source link

ec2-automate-backup: tags not applied to snapshots #120

Open ActionScripted opened 8 years ago

ActionScripted commented 8 years ago

When I run the following command:

actionscripted@dev $ ./ec2-automate-backup.sh -s tag -t Backups,Values=true -n -h -u

The output is:

Tagging Snapshot snap-6fac131e with the following Tags: Key=CreatedBy,Value=ec2-automate-backup Key=Name,Value=ec2ab_vol-964a987a_1455760489 Key=InitiatingHost,Value='dev' Key=Volume,Value=vol-964a987a Key=Created,Value=1455760489

The snapshot is created but there aren't any tags applied to it, it isn't named, etc. Under tags it's just empty.

AWS CLI version:

aws-cli/1.10.5 Python/2.7.6 Linux/3.13.0-77-generic botocore/1.3.27

Screenshot in case that's in any way helpful:

ec2_management_console
niciliketo commented 8 years ago

@ActionScripted might not be the same in your case, but I had similar problem and traced it back to the permissions which the user I was running as. I had to add the create tags permission.

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "ec2:Describe*",
                "ec2:CreateSnapshot",
                "ec2:DeleteSnapshot",
                "ec2:CreateTags"
            ],
            "Resource": "*"
        }
    ]
}