Logging Route 53 ARC API calls using Amazon CloudTrail - Amazon Route 53 Application Recovery Controller
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Logging Route 53 ARC API calls using Amazon CloudTrail

Amazon Route 53 Application Recovery Controller is integrated with Amazon CloudTrail, a service that provides a record of actions taken by a user, role, or an Amazon service in Route 53 ARC. CloudTrail captures all API calls for Route 53 ARC as events. The calls captured include calls from the Route 53 ARC console and code calls to the Route 53 ARC API operations.

If you create a trail, you can enable continuous delivery of CloudTrail events to an Amazon S3 bucket, including events for Route 53 ARC. If you don't configure a trail, you can still view the most recent events in the CloudTrail console in Event history.

Using the information collected by CloudTrail, you can determine the request that was made to Route 53 ARC, the IP address from which the request was made, who made the request, when it was made, and additional details.

To learn more about CloudTrail, see the Amazon CloudTrail User Guide.

Route 53 ARC information in CloudTrail

CloudTrail is enabled on your Amazon Web Services account when you create the account. When activity occurs in Route 53 ARC, that activity is recorded in a CloudTrail event along with other Amazon service events in Event history. You can view, search, and download recent events in your Amazon Web Services account. For more information, see Working with CloudTrail Event history.

For an ongoing record of events in your Amazon Web Services account, including events for Route 53 ARC, create a trail. A trail enables CloudTrail to deliver log files to an Amazon S3 bucket. By default, when you create a trail in the console, the trail applies to all Amazon Web Services Regions. The trail logs events from all Regions in the Amazon partition and delivers the log files to the Amazon S3 bucket that you specify. Additionally, you can configure other Amazon services to further analyze and act upon the event data collected in CloudTrail logs. For more information, see the following:

All Route 53 ARC actions are logged by CloudTrail and are documented in the Recovery Readiness API Reference Guide for Amazon Route 53 Application Recovery Controller, Recovery Control Configuration API Reference Guide for Amazon Route 53 Application Recovery Controller, and Routing Control API Reference Guide for Amazon Route 53 Application Recovery Controller. For example, calls to the CreateCluster, UpdateRoutingControlState and CreateRecoveryGroup actions generate entries in the CloudTrail log files.

Every event or log entry contains information about who generated the request. The identity information helps you determine the following:

  • Whether the request was made with root or Amazon Identity and Access Management (IAM) user credentials.

  • Whether the request was made with temporary security credentials for a role or federated user.

  • Whether the request was made by another Amazon service.

For more information, see the CloudTrail userIdentity element.

Viewing Route 53 ARC events in event history

CloudTrail lets you view recent events in Event history. To view events for Route 53 ARC API requests, you must choose US West (Oregon) in the Region selector at the top of the console. For more information, see Working with CloudTrail Event history in the Amazon CloudTrail User Guide.

Understanding Route 53 ARC log file entries

A trail is a configuration that enables delivery of events as log files to an Amazon S3 bucket that you specify. CloudTrail log files contain one or more log entries. An event represents a single request from any source and includes information about the requested action, the date and time of the action, request parameters, and so on. CloudTrail log files aren't an ordered stack trace of the public API calls, so they don't appear in any specific order.

The following example shows a CloudTrail log entry that demonstrates the CreateCluster action for control configuration.

{ "eventVersion": "1.08", "userIdentity": { "type": "IAMUser", "principalId": "A1B2C3D4E5F6G7EXAMPLE", "arn": "arn:aws:iam::111122223333:user/smithj", "accountId": "111122223333", "accessKeyId": "AKIAIOSFODNN7EXAMPLE", "sessionContext": { "sessionIssuer": { "type": "Role", "principalId": "A1B2C3D4E5F6G7EXAMPLE", "arn": "arn:aws:iam::111122223333:role/smithj", "accountId": "111122223333", "userName": "smithj" }, "webIdFederationData": {}, "attributes": { "mfaAuthenticated": "false", "creationDate": "2021-06-30T04:44:41Z" } } }, "eventTime": "2021-06-30T04:45:46Z", "eventSource": "route53-recovery-control-config.amazonaws.com", "eventName": "CreateCluster", "awsRegion": "us-west-2", "sourceIPAddress": "192.0.2.50", "userAgent": "aws-cli/2.0.0 Python/3.8.2 Darwin/19.6.0 botocore/2.0.0dev7", "requestParameters": { "ClientToken": "12345abcdef-1234-5678-abcd-12345abcdef", "ClusterName": "XYZCluster" }, "responseElements": { "Cluster": { "Arn": "arn:aws:route53-recovery-control::012345678901:cluster/abc123456-aa11-bb22-cc33-abc123456", "ClusterArn": "arn:aws:route53-recovery-control::012345678901:cluster/abc123456-aa11-bb22-cc33-abc123456", "Name": "XYZCluster", "Status": "PENDING" } }, "requestID": "6090509a-5a97-4be6-8e6a-7d73example", "eventID": "9cab44ef-0777-41e6-838f-f249example", "readOnly": false, "eventType": "AwsApiCall", "managementEvent": true, "eventCategory": "Management", "recipientAccountId": "111122223333" }

The following example shows a CloudTrail log entry that demonstrates the UpdateRoutingControlState action for routing control.

{ "eventVersion": "1.08", "userIdentity": { "type": "AssumedRole", "principalId": "A1B2C3D4E5F6G7EXAMPLE", "arn": "arn:aws:sts::111122223333:assumed-role/admin/smithj", "accountId": "111122223333", "accessKeyId": "AKIAIOSFODNN7EXAMPLE", "sessionContext": { "sessionIssuer": { "type": "Role", "principalId": "A1B2C3D4E5F6G7EXAMPLE", "arn": "arn:aws:iam::111122223333:role/admin", "accountId": "111122223333", "userName": "admin" }, "webIdFederationData": {}, "attributes": { "mfaAuthenticated": "false", "creationDate": "2021-06-30T04:44:41Z" } } }, "eventTime": "2021-06-30T04:45:46Z", "eventSource": "route53-recovery-control-config.amazonaws.com", "eventName": "UpdateRoutingControl", "awsRegion": "us-west-2", "sourceIPAddress": "192.0.2.50", "userAgent": "aws-cli/2.0.0 Python/3.8.2 Darwin/19.6.0 botocore/2.0.0dev7", "requestParameters": { "RoutingControlName": "XYZRoutingControl3", "RoutingControlArn": "arn:aws:route53-recovery-control::012345678:controlpanel/0123456bbbbbbb0123456bbbbbb0123456/routingcontrol/abcdefg1234567" }, "responseElements": { "RoutingControl": { "ControlPanelArn": "arn:aws:route53-recovery-control::012345678:controlpanel/0123456bbbbbbb0123456bbbbbb0123456", "Name": "XYZRoutingControl3", "Status": "DEPLOYED", "RoutingControlArn": "arn:aws:route53-recovery-control::012345678:controlpanel/0123456bbbbbbb0123456bbbbbb0123456/routingcontrol/abcdefg1234567" } }, "requestID": "6090509a-5a97-4be6-8e6a-7d73example", "eventID": "9cab44ef-0777-41e6-838f-f249example", "readOnly": false, "eventType": "AwsApiCall", "managementEvent": true, "eventCategory": "Management", "recipientAccountId": "111122223333" }

The following example shows a CloudTrail log entry that demonstrates the CreateRecoveryGroup action for readiness check.

{ "eventVersion": "1.08", "userIdentity": { "type": "AssumedRole", "principalId": "A1B2C3D4E5F6G7EXAMPLE", "arn": "arn:aws:iam::111122223333:role/admin", "accountId": "111122223333", "accessKeyId": "AKIAIOSFODNN7EXAMPLE", "sessionContext": { "sessionIssuer": { "type": "Role", "principalId": "AROA33L3W36EXAMPLE", "arn": "arn:aws:iam::111122223333:role/admin", "accountId": "111122223333", "userName": "EXAMPLENAME" }, "webIdFederationData": {}, "attributes": { "mfaAuthenticated": "false", "creationDate": "2021-07-06T17:38:05Z" } } }, "eventTime": "2021-07-06T18:08:03Z", "eventSource": "route53-recovery-readiness.amazonaws.com", "eventName": "CreateRecoveryGroup", "awsRegion": "us-west-2", "sourceIPAddress": "192.0.2.50", "userAgent": "Boto3/1.17.101 Python/3.8.10 Linux/4.14.231-180.360.amzn2.x86_64 exec-env/AWS_Lambda_python3.8 Botocore/1.20.102", "requestParameters": { "recoveryGroupName": "MyRecoveryGroup" }, "responseElements": { "Access-Control-Expose-Headers": "x-amzn-errortype,x-amzn-requestid,x-amzn-errormessage,x-amzn-trace-id,x-amzn-requestid,x-amz-apigw-id,date", "cells": [], "recoveryGroupName": "MyRecoveryGroup", "recoveryGroupArn": "arn:aws:route53-recovery-readiness::111122223333:recovery-group/MyRecoveryGroup", "tags": "***" }, "requestID": "fd42dcf7-6446-41e9-b408-d096example", "eventID": "4b5c42df-1174-46c8-be99-d67aexample", "readOnly": false, "eventType": "AwsApiCall", "managementEvent": true, "eventCategory": "Management", "recipientAccountId": "111122223333" }

The following example shows a CloudTrail log entry that demonstrates the ListManagedResources action for zonal shift.

{ "eventVersion": "1.08", "userIdentity": { "type": "AssumedRole", "principalId": "A1B2C3D4E5F6G7EXAMPLE", "arn": "arn:aws:iam::111122223333:role/admin", "accountId": "111122223333", "accessKeyId": "AKIAIOSFODNN7EXAMPLE", "sessionContext": { "sessionIssuer": { "type": "Role", "principalId": "AROA33L3W36EXAMPLE", "arn": "arn:aws:iam::111122223333:role/admin", "accountId": "111122223333", "userName": "EXAMPLENAME" }, "webIdFederationData": {}, "attributes": { "creationDate": "2022-11-14T16:01:51Z", "mfaAuthenticated": "false" } } }, "eventTime": "2022-11-14T16:14:41Z", "eventSource": "arc-zonal-shift.amazonaws.com", "eventName": "ListManagedResources", "awsRegion": "us-west-2", "sourceIPAddress": "192.0.2.50", "userAgent": "Boto3/1.17.101 Python/3.8.10 Linux/4.14.231-180.360.amzn2.x86_64 exec-env/AWS_Lambda_python3.8 Botocore/1.20.102", "requestParameters": null, "responseElements": null, "requestID": "VGXG4ZUE7UZTVCMTJGIAF_EXAMPLE", "eventID": "4b5c42df-1174-46c8-be99-d67_EXAMPLE", "readOnly": true, "eventType": "AwsApiCall", "managementEvent": true, "recipientAccountId": "111122223333" "eventCategory": "Management" } }

The following example shows a CloudTrail log entry that demonstrates the StartZonalShift action with a conflict exception for zonal shift.

{ "eventVersion": "1.08", "userIdentity": { "type": "AssumedRole", "principalId": "A1B2C3D4E5F6G7EXAMPLE", "arn": "arn:aws:iam::111122223333:role/admin", "accountId": "111122223333", "accessKeyId": "AKIAIOSFODNN7EXAMPLE", "sessionContext": { "sessionIssuer": { "type": "Role", "principalId": "AROA33L3W36EXAMPLE", "arn": "arn:aws:iam::111122223333:role/admin", "accountId": "111122223333", "userName": "EXAMPLENAME" }, "webIdFederationData": {}, "attributes": { "creationDate": "2022-11-14T16:01:51Z", "mfaAuthenticated": "false" } } }, "eventTime": "2022-11-14T16:10:38Z", "eventSource": "arc-zonal-shift.amazonaws.com", "eventName": "StartZonalShift", "awsRegion": "us-west-2", "sourceIPAddress": "192.0.2.50", "userAgent": "Boto3/1.17.101 Python/3.8.10 Linux/4.14.231-180.360.amzn2.x86_64 exec-env/AWS_Lambda_python3.8 Botocore/1.20.102", "errorCode": "ConflictException", "errorMessage": "There's already an active zonal shift for that resource identifier: 'arn:aws:testservice:us-west-2:077059137270:testResource/456apples'. Active zonal shift: 'bac23b74-176e-c073-de8f-484ca508910f'", "requestParameters": { "resourceIdentifier": "arn:aws:testservice:us-west-2:077059137270:testResource/456apples", "awayFrom": "usw2-az1", "expiresIn": "2m", "comment": "HIDDEN_FOR_SECURITY_REASONS" }, "responseElements": null, "requestID": "OP4OYXZ54HUPMIPGWH_EXAMPLE", "eventID": "0bca6660-e999-43a5-9008-EXAMPLE", "readOnly": false, "eventType": "AwsApiCall", "managementEvent": true, "recipientAccountId": "111122223333" "eventCategory": "Management" } }