Monday, 20 January 2020

AWS CloudWatch - Create role for cloudwatch to attach to EC2

We need to have Cloudwatch role attached to EC2 instance to get the logs pushed to CloudWatch.

Ref: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/QuickStartEC2Instance.html

> IAM > Role > Create role >



 EC2


Select Cloudwatchfull

or Create policy as per AWS.
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "logs:CreateLogGroup", "logs:CreateLogStream", "logs:PutLogEvents", "logs:DescribeLogStreams" ], "Resource": [ "arn:aws:logs:*:*:*" ] } ] }
Next and enter the new name and create



No comments: