Cloud Custodian: Tagging snapshots (AWS)

143 Views Asked by At

I can't figure out how to tag snapshots in AWS using Cloud Custodian...

The example in the docs is:

    resource: ec2
    actions:
      - type: snapshot
        tags:
          CloudCustodian: true 

But this doesn't work; nothing gets tagged. I tried a few other things but no luck...

1

There are 1 best solutions below

0
On

I think the issue is your action isn't accurate.

Try:

actions: 
  - type: tag
    tags:
      CloudCustodian: true 

Doc here lists the proper types for tag action: https://cloudcustodian.io/docs/aws/resources/aws-common-actions.html#aws-common-actions-tag