GorillaStack / auto-tag

Automatically tag AWS resources on creation, for cost assignment
GNU General Public License v3.0
457 stars 158 forks source link

How to debug why it's not tagging resources? #89

Closed cdtiwari-ebi closed 3 years ago

cdtiwari-ebi commented 3 years ago

Hi Team,

I have tried deploying using below command; ./deploy_autotag.sh -r eu-west-2 --s3-bucket <autotag-bucket> --profile <myprofile> -ld --s3-profile <myprofile> create

I am using same profile for --profile, --s3-profile At the end I am getting successfully deployed message The AutoTag deployment is complete

After the deployment I tried spinning few ec2 instances but not instance, network, volume nothing is tagged. I was wondering where can I see errors and logs because I am trying to use debug option -ld as suggested in documentation

I appreciate your efforts and help.

rayjanoka commented 3 years ago

The Lambda Function should have some logs

cdtiwari-ebi commented 3 years ago

Here are my steps;

  1. ./deploy_autotag.sh -r eu-west-2 --s3-bucket <autotag-bucket> --profile <myprofile> -ld --s3-profile <myprofile> create
  2. Manually check the stack in each region and waited for CREATE_COMPLETE
  3. Spin few EC2 instances, waiting for Tags to enable. Waited for 5-10min but no tags.
  4. Go to Lambda function AutoTag, 'Monitor' increase the window until 1w for logs and traces.
  5. Nothing was visible.
    Question: Is there any way to check errors If there is anything?
cdtiwari-ebi commented 3 years ago

Screenshot 2021-03-04 at 21 38 56 This is what I got after a lot of try and catch. Is it useful to understand what's wrong with happening?

rayjanoka commented 3 years ago

ok, the problem is likely that you do not have CloudTrail enabled in your account.

https://github.com/GorillaStack/auto-tag#prerequisites

cdtiwari-ebi commented 3 years ago

Thanks for helping.