View a markdown version of this page

Get notified about host events - Amazon Elastic VMware Service

Get notified about host events

AWS Health tells you in advance when an EC2 instance that runs one of your Amazon Elastic VMware Service hosts is scheduled for maintenance or retirement. You can route these events with Amazon EventBridge to an Amazon SNS topic, so that your operations team gets them by email or another channel. You can set up the rule with the EventBridge console or the AWS CLI.

Events that affect your environment

AWS sends you the following notifications for an Amazon EVS environment.

EC2 scheduled events

If an instance that runs one of your hosts is affected by a scheduled event, AWS notifies you in advance. AWS sends an email to the address that’s associated with your AWS account, and sends an AWS Health event. The events include system-maintenance and instance-retirement events. For what to do when you get one, see Host maintenance and retirement events.

Impaired environment health

If a required connector is not created or becomes unreachable, Amazon EVS reports impaired environment health through AWS Health. For more information, see Monitor environment status.

Windows Server entitlements

If the connection to vCenter Server is not restored within the 8-hour grace period, Amazon EVS removes the entitlements and sends you an AWS Health notification. For more information, see Troubleshoot Windows Server entitlements.

AWS Health events identify the affected EC2 instance. To find the host that runs on an instance, compare the instance ID with the ec2InstanceId value that aws evs list-environment-hosts returns.

Before you begin

Before you create the rule, complete the following tasks.

  • Create an Amazon SNS topic and subscribe your email address or another endpoint to it. For more information, see Creating an Amazon SNS topic in the Amazon Simple Notification Service Developer Guide.

  • Make sure that the access policy of the topic allows EventBridge to publish to it. For more information, see Amazon SNS permissions in the Amazon EventBridge User Guide.

  • Create the rule in each AWS Region where you have an Amazon EVS environment. EventBridge rules receive events for your own AWS account only.

Event pattern

The following event pattern matches AWS Health scheduled change events for Amazon EC2. This includes maintenance and retirement events for the instances that run your hosts.

{ "source": ["aws.health"], "detail-type": ["AWS Health Event"], "detail": { "service": ["EC2"], "eventTypeCategory": ["scheduledChange"] } }

To also receive EC2 issue events, add issue to the eventTypeCategory list. For the fields that you can match, see Reference: AWS Health events Amazon EventBridge schema in the AWS Health User Guide.

The pattern matches events for every EC2 instance in your account, not only your Amazon EVS hosts.

Create the rule

To create the rule in the Amazon EventBridge console or with the AWS CLI, use the following steps.

Example
Console
  1. Open the Amazon EventBridge console.

  2. Create a rule on the default event bus with the event pattern from the previous section. For the steps, see Creating rules in Amazon EventBridge in the Amazon EventBridge User Guide.

  3. For the target, choose your Amazon SNS topic.

  4. Create the rule.

AWS CLI
  1. Save the event pattern from the previous section in a file named evs-host-events.json.

  2. Create the rule. Replace <region-code> with the Region where you created the environment.

    aws events put-rule \ --name evs-host-events \ --event-pattern file://evs-host-events.json \ --region <region-code>
  3. Add your Amazon SNS topic as the target of the rule. Replace <region-code> with the Region where you created the environment. Replace the example account ID with your own value.

    aws events put-targets \ --rule evs-host-events \ --targets 'Id=1,Arn=arn:aws:sns:<region-code>:111122223333:evs-host-events' \ --region <region-code>

    In other partitions, such as AWS GovCloud (US), replace arn:aws with the partition of your account, for example arn:aws-us-gov.

  4. Confirm that the rule exists. Replace <region-code> with the Region where you created the environment.

    aws events describe-rule \ --name evs-host-events \ --region <region-code>

You have created a rule that sends EC2 scheduled change events to your Amazon SNS topic. To check the pattern without waiting for an event, use the sample events in the EventBridge console. For more information, see Configuring an EventBridge rule to send notifications about events in AWS Health in the AWS Health User Guide.

To receive events from all accounts in an organization, see Aggregating AWS Health events in the AWS Health User Guide.

Next step: Plan how you respond to each event type. For more information, see Host maintenance and retirement events.