aws.redshift-snapshot

Resource manager for Redshift snapshots.

Filters

age

Filters redshift snapshots based on age (in days)

example

policies:
  - name: redshift-old-snapshots
    resource: redshift-snapshot
    filters:
      - type: age
        days: 21
        op: gt
properties:
  days:
    type: number
  op:
    enum:
    - eq
    - equal
    - ne
    - not-equal
    - gt
    - greater-than
    - ge
    - gte
    - le
    - lte
    - lt
    - less-than
    - glob
    - regex
    - regex-case
    - in
    - ni
    - not-in
    - contains
    - difference
    - intersect
  type:
    enum:
    - age
required:
- type

cross-account

Filter all accounts that allow access to non-whitelisted accounts

properties:
  type:
    enum:
    - cross-account
  whitelist:
    items:
      type: string
    type: array
  whitelist_from:
    additionalProperties: 'False'
    properties:
      expr:
        oneOf:
        - type: integer
        - type: string
      format:
        enum:
        - csv
        - json
        - txt
        - csv2dict
      url:
        type: string
    required:
    - url
    type: object
required:
- type

Actions

delete

Filters redshift snapshots based on age (in days)

example

policies:
  - name: redshift-delete-old-snapshots
    resource: redshift-snapshot
    filters:
      - type: age
        days: 21
        op: gt
    actions:
      - delete
properties:
  type:
    enum:
    - delete
required:
- type

revoke-access

Revokes ability of accounts to restore a snapshot

example
policies:
  - name: redshift-snapshot-revoke-access
    resource: redshift-snapshot
    filters:
      - type: cross-account
        whitelist:
          - 012345678910
    actions:
      - type: revoke-access
properties:
  type:
    enum:
    - revoke-access
required:
- type