Automating AWS Ground Station with CloudWatch Events - AWS Ground Station

Automating AWS Ground Station with CloudWatch Events

Amazon CloudWatch Events enables you to automate your AWS services and respond automatically to system events such as application availability issues or resource changes. Events from AWS services are delivered to CloudWatch Events in near real time. You can write simple rules to indicate which events are of interest to you, and what automated actions to take when an event matches a rule. The actions that can be automatically triggered include the following:

  • Invoking an AWS Lambda function

  • Invoking Amazon EC2 Run Command

  • Relaying the event to Amazon Kinesis Data Streams

  • Activating an AWS Step Functions state machine

  • Notifying an Amazon SNS topic or an AWS SMS queue

Some examples of using CloudWatch Events with AWS Ground Station include:

  • Invoking a Lambda function to automate the starting and stopping of Amazon EC2 instances based off the event state.

  • Publishing to an Amazon SNS topic whenever a contact changes states. These topics can be set up to send out email notices at the beginning or end of contacts.

For more information, see the Amazon CloudWatch Events User Guide.

Example CloudWatch Events

Ground Station Contact State Change

If you want to perform a specific action when an upcoming contact is changing states, you can setup a CloudWatch rule to automate this action. This is helpful for when you want to receive notifications about the state changes of your contact. The events are sent to the region that the contact was scheduled from.

An example is provided below.

{ "version": "0", "id": "01234567-0123-0123", "account": "123456789012", "time": "2019-05-30T17:40:30Z", "region": "us-west-2", "source": "aws.groundstation", "resources": [ "arn:aws:groundstation:us-west-2:123456789012:contact/11111111-1111-1111-1111-111111111111" ], "detailType": "Ground Station Contact State Change", "detail": { "contactId": "11111111-1111-1111-1111-111111111111", "groundstationId": "Ground Station 1", "missionProfileArn": "arn:aws:groundstation:us-west-2:123456789012:mission-profile/11111111-1111-1111-1111-111111111111", "satelliteArn": "arn:aws:groundstation::123456789012:satellite/11111111-1111-1111-1111-111111111111", "contactStatus": "PASS" }, "account": "123456789012" }

Possible states for the contactStatus include PREPASS, PASS, POSTPASS, and COMPLETED.

Ground Station Dataflow Endpoint Group State Change

If you want to perform an action when your dataflow endpoint group is being used to receive data, you can set up a CloudWatch rule to automate this action. This will allow you to perform different actions in response to the dataflow endpoint group status changing states. This event will be sent to the region of the dataflow endpoint group.

An example is provided below.

{ "version": "0", "id": "01234567-0123-0123", "account": "123456789012", "time": "2019-05-30T17:40:30Z", "region": "us-west-2", "source": "aws.groundstation", "resources": [ "arn:aws:groundstation:us-west-2:123456789012:dataflow-endpoint-group/bad957a8-1d60-4c45-a92a-39febd98921d, arn:aws:groundstation:us-west-2:123456789012:contact/98ddd10f-f2bc-479c-bf7d-55644737fb09, arn:aws:groundstation:us-west-2:123456789012:mission-profile/c513c84c-eb40-4473-88a2-d482648c9234" ], "detailType": "Ground Station Dataflow Endpoint Group State Change", "detail": { "dataflowEndpointGroupId": "bad957a8-1d60-4c45-a92a-39febd98921d", "groundstationId": "Ground Station 1", "contactId": "98ddd10f-f2bc-479c-bf7d-55644737fb09", "dataflowEndpointGroupArn": "arn:aws:groundstation:us-west-2:680367718957:dataflow-endpoint-group/bad957a8-1d60-4c45-a92a-39febd98921d", "missionProfileArn": "arn:aws:groundstation:us-west-2:123456789012:mission-profile/c513c84c-eb40-4473-88a2-d482648c9234", "dataflowEndpointGroupState": "PREPASS" }, "account": "123456789012" }

Possible states for the dataflowEndpointGroupState include PREPASS, PASS, POSTPASS, and COMPLETED.