Logging AWS HealthOmics API calls using AWS CloudTrail
AWS HealthOmics is integrated with AWS CloudTrail, a service that provides a record of actions taken by a user, role, or an AWS service in HealthOmics. CloudTrail captures all API calls for HealthOmics as events. The calls captured include calls from the HealthOmics console and code calls to the HealthOmics API operations. If you create a trail, you can enable continuous delivery of CloudTrail events to an Amazon S3 bucket, including events for HealthOmics. 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 HealthOmics, 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 AWS CloudTrail User Guide.
HealthOmics information in CloudTrail
CloudTrail is enabled on your AWS account when you create the account. When activity occurs in HealthOmics, that activity is recorded in a CloudTrail event along with other AWS service events in Event history. You can view, search, and download recent events in your AWS account. For more information, see Viewing events with CloudTrail Event history.
For an ongoing record of events in your AWS account, including events for HealthOmics, 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 AWS Regions. The trail logs events from all Regions in the AWS partition and delivers the log files to the Amazon S3 bucket that you specify. Additionally, you can configure other AWS services to further analyze and act upon the event data collected in CloudTrail logs. For more information, see the following:
All HealthOmics actions are logged by CloudTrail and are documented in the AWS HealthOmics API Reference. For example,
calls to the
CreateReferenceeStore
, StartVariantImportJob
and CreateWorkflow
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 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 AWS service.
For more information, see the CloudTrail userIdentity element.
Understanding HealthOmics 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 CreateWorkflow action.
{ "eventVersion": "1.08", "userIdentity": { "type": "AssumedRole", "principalId": "AROAIU53LOGOMTOPXXNPG:username", "arn": "arn:aws:sts::account:assumed-role/admin/username", "accountId": "account-id", "accessKeyId": "accessKeyId", "sessionContext": { "sessionIssuer": { "type": "Role", "principalId": "AROAIU53LOGOMTOPXXNPG", "arn": "arn:aws:iam::account:role/admin", "accountId": "account", "userName": "admin" }, "webIdFederationData": {}, "attributes": { "creationDate": "2022-07-23T18:26:09Z", "mfaAuthenticated": "false" } } }, "eventTime": "2022-07-23T18:46:42Z", "eventSource": "omics.amazonaws.com", "eventName": "CreateWorkflow", "awsRegion": "us-west-2", "sourceIPAddress": "205.251.233.176", "userAgent": "aws-cli/1.22.45 Python/3.9.13 Darwin/20.6.0 botocore/1.23.45", "requestParameters": { "name": "parameter_name", "definitionZip": "czM6Ly93b3JrZmxvd2RlZi1oZWxsby9kZWZpbml0aW9uLnppcA==", "requestId": "d788a73c-b81b-45fb-a8a6-d8bb4449ec8a" }, "responseElements": { "id": "1002571", "arn": "arn:aws:omics:us-west-2:555555555555:instance/i-b188560f ", "status": "CREATING", "tags": { "resourceArn": "arn:aws:omics:us-west-2:083685709690:workflow/1002571" } }, "requestID": "842d731d-f264-4b08-a2c9-2f7d45e1eaa3", "eventID": "76872ca2-f208-4193-807d-7dd7ea34e6b2", "readOnly": false, "eventType": "AwsApiCall", "managementEvent": true, "recipientAccountId": "083685709690", "eventCategory": "Management" }