question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to Assign a Tag Using "type: auto-tag-user"

See original GitHub issue

Hi All,

I’m trying to test Cloud Custodian with AWS as the tagging policies seem perfect for one of our biggest niggles however through probably my own ignorance I’m not having any success, could anybody point me in the right direction?

This is the policy…

policies:
- name: ec2-auto-tag-owner
  resource: ec2
  mode:
    type: cloudtrail
    events:
      - source: ec2.amazonaws.com
        event: StartInstances
        ids: "responseElements.instancesSet.items[].instanceId"
      - source: ec2.amazonaws.com
        event: RunInstances
        ids: "responseElements.instancesSet.items[].instanceId"
      - source: ec2.amazonaws.com
        event: RebootInstances
        ids: "responseElements.instancesSet.items[].instanceId"
    role: arn:aws:iam::660910064092:role/custodian-auto-tagger
  filters:
    - tag:CreatorName: absent
  actions:
    - type: auto-tag-user
      tag: CreatorName
      principal_id_tag: CreatorId

The error in the Lambda…

11:56:24
[INFO]	2018-06-26T11:56:24.593Z	f304cba9-7937-11e8-80f6-7b22b832a002	Found resource ids: []
11:56:24
[WARNING]	2018-06-26T11:56:24.593Z	f304cba9-7937-11e8-80f6-7b22b832a002	Could not find resource ids

Let me know if there’s anything more useful or helpful I can provide!

Cheers, Rich

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
thisisshicommented, Jun 27, 2018

you can try requestParameters.instancesSet.items[].instanceId

0reactions
riwestoncommented, Jun 27, 2018

Ahhhhhh! I understand now, that makes perfect sense.

Thank you for all your help 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to Assign a Tag Using "type: auto-tag-user" #2565
Hi All, I'm trying to test Cloud Custodian with AWS as the tagging policies ... Unable to Assign a Tag Using "type: auto-tag-user"...
Read more >
cloud-custodian/cloud-custodian - Gitter
I've just started learning c7n 30mins ago in prep for a client who is interested in it, so I won't be doing code...
Read more >
Cloud-Custodian DynamoDB auto-tag-user exists?
Lamda function which is created by the custodian is trying to "describe" the table/resource which has been just created, but can't do it, ......
Read more >
AWS Common Actions — Cloud Custodian documentation
To use this action, specify the resource type that contains the tags that are to be copied, which can be found by using...
Read more >
Manage Tags - Mailchimp
The Tags page in your audience lets you manage your tag structure, add or delete tags, ... To target these contacts with a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found