Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I see AWS CloudFormation logs in CloudWatch?

I am not able to view CloudFormation stackset operation logs in the CloudFormation console. Although each stackset operation does have an "Operation ID" Is it possible to see the logs in CloudWatch? Or some way to turn on logging?

like image 839
Subtubes Avatar asked Feb 19 '19 22:02

Subtubes


People also ask

How do I access CloudFormation logs in CloudWatch?

To view event logs for the stack, right-click the stack's name. The AWS Toolkit for JetBrains displays the event logs in the CloudFormation tool window. To hide or show the CloudFormation tool window, on the main menu, choose View, Tool Windows, CloudFormation.

How do I view logs in AWS CloudWatch?

To view log dataOpen the CloudWatch console at https://console.aws.amazon.com/cloudwatch/ . In the navigation pane, choose Log groups. For Log Groups, choose the log group to view the streams. In the list of log groups, choose the name of the log group that you want to view.

How do you make CloudWatch dashboard with CloudFormation?

The following steps are needed to create a CloudWatch dashboard with a custom resource. Create a CloudFormation template and add a Lambda-backed custom resource. Write the code creating, updating, and deleting a CloudWatch dashboard. Generate the JSON code describing the customized dashboard.

How do I check my application log in CloudWatch?

Validating Custom Logs in Cloudwatch DashboardGo to Logs –> Log Groups and you will see the log group you mentioned in the agent configuration. Select the log group and you should see your instance identified you mentioned in the config. If you click the instance identifier, it shows all the logs.


1 Answers

CloudFormation stack set events/log cannot be viewed using CloudWatch; this is done only through the AWS Cfn console or API.

If using the AWS-CLI try running aws cloudformation describe-stack-set-operation --stack-set-name xxxxxxx --operation-id xxxx-xxxx-xxxxx to display details of stack set operation.

NB: You can run the command while the stack set is being created to view events as they're reported.

like image 188
meyj Avatar answered Oct 13 '22 01:10

meyj