IAM role needed for EventBridge scheduled reboot of EC2 instances

0

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

1 Antwort
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
EXPERTE
beantwortet vor einem Jahr

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen