What will happen in this case?
It is not possible to stop the instance using the CloudWatch alarm
CloudWatch will stop the instance when the action is executed
The user cannot set an alarm on EC2 since he does not have the permission
The user can setup the action but it will not be executed if the user does not have EC2 rights
Explanations:
It is possible to stop an EC2 instance using CloudWatch alarms if the necessary permissions are in place. However, the IAM user in question lacks the required permissions to execute the stop action.
While the CloudWatch alarm can trigger the action to stop an EC2 instance, the user does not have permission to execute this action, meaning it will not actually stop the instance.
The user can set an alarm on EC2 instances for monitoring purposes, as the CloudWatch service itself is separate from EC2 instance management permissions. However, the user will not be able to execute the stop action due to lack of EC2 permissions.
The user can configure the alarm action, but since he does not have the necessary permissions to stop EC2 instances, the action will not be executed when the alarm condition is met.