A.R.
A.R.

Reputation: 2068

Where to find CloudFormation log stream

I used this CloudFormation template to create a stack: https://fwd.aws/mDMrd

One of the steps failed, and the status reason given is:

Failed to create resource. See the details in CloudWatch Log Stream: 2019/07/01/[$LATEST]fa6e...

My problem is that I can't locate this log stream. I can't find what log group this is going under.

Upvotes: 19

Views: 11609

Answers (3)

Russell Reed
Russell Reed

Reputation: 464

For other people having a similar problem with not being able to find the appropriate log in CloudWatch, there's an alternate place to look for the error.

CloudTrail logs the AWS API calls, and you may be able to find the failing API call there, with a better error message. I don't know if anything has to be done to enable this, or if it's always on or on by default.

This will be easiest if there haven't been many other AWS API calls made since the failure.

Go to CloudTrail and then Event History.

In my case, I scanned down past all of the API calls that were from CloudFormation tearing the resources back down, and the very next call was the one I needed to see.

Upvotes: 7

A.R.
A.R.

Reputation: 2068

It turns out CloudFormation created a Log Group named /aws/lambda/Git-to-Amazon-S3-CopyZipsFunction-1K1JCQVK2QDF2 where I can see the log stream, the reason I could not find it was because it took over 5 minutes for the Log Group to show up on the list.

Upvotes: 7

krunal shimpi
krunal shimpi

Reputation: 1

It seems like you are creating cloudwatch log resources and that's what's failing. Can you progamattically display the output error so that you have the full path of the cloudwatch log stream.

Btw you can try cloudkast which is an online aws cloudformation template generator. It's gonna make easier dealing with cloudformation templates.

Upvotes: -4

Related Questions