IAM role needed for EventBridge scheduled reboot of EC2 instances

0

Which IAM role(s) are needed for rebooting EC2 instances via EventBridge?

1개 답변
1

Please use this link https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-iam.html

Please create a role with the following json!

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "CloudWatchEventsBuiltInTargetExecutionAccess",
            "Effect": "Allow",
            "Action": [
                "ec2:RebootInstances",
                "ec2:StopInstances",
                "ec2:TerminateInstances"
            ],
            "Resource": [
                "arn:aws:ec2:ap-south-1:AWS_ACCOUNT_ID:instance/YOUR_INSTANCE_ID"
            ]
        }
    ]
}

Please use this as a trust relationship

{
	"Version": "2012-10-17",
	"Statement": [
		{
			"Effect": "Allow",
			"Principal": {
				"Service": "events.amazonaws.com"
			},
			"Action": "sts:AssumeRole"
		}
	]
}
profile picture
전문가
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠