Using AWS CloudTrail with HealthImaging
AWS HealthImaging is integrated with AWS CloudTrail, a service that provides a record of actions taken by a user, role, or an AWS service in HealthImaging. CloudTrail captures all API calls for HealthImaging as events. The calls captured include calls from the HealthImaging console and code calls to the HealthImaging API operations. If you create a trail, you can turn on continuous delivery of CloudTrail events to an Amazon S3 bucket, including events for HealthImaging. 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 HealthImaging, 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.
Creating a trail
CloudTrail is turned on for your AWS account when you create the account. When activity occurs in HealthImaging, 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.
Note
To view CloudTrail event history for AWS HealthImaging in the AWS Management Console, go to the Lookup
attributes menu, select Event source, and choose
medical-imaging.amazonaws.com
.
For an ongoing record of events in your AWS account, including events for HealthImaging, 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:
Note
AWS HealthImaging supports two types of CloudTrail events — management events and data events. Management events are the general events that every AWS service generates, including HealthImaging. By default, logging is applied to management events for every HealthImaging API call that has it enabled. Data events are billable and generally reserved for APIs that have high transactions per second (tps), so you can opt out of having CloudTrail logs for cost purposes.
With HealthImaging, all API actions listed in the AWS HealthImaging API Reference are considered management events with
the exception of GetImageFrame
. The GetImageFrame
action is onboarded
with CloudTrail as a data event and therefore must be enabled. For more information, see Logging data
events in the AWS CloudTrail User Guide.
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 AWS 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 AWS service.
For more information, see the CloudTrail
userIdentity
element.
Understanding log 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 for HealthImaging that demonstrates the
GetDICOMImportJob
action.
{ "eventVersion": "1.08", "userIdentity": { "type": "AssumedRole", "principalId": "XXXXXXXXXXXXXXXXXXXXX:ce6d90ba-5fba-4456-a7bc-f9bc877597c3", "arn": "arn:aws:sts::123456789012:assumed-role/TestAccessRole/ce6d90ba-5fba-4456-a7bc-f9bc877597c3" "accountId": "123456789012", "accessKeyId": "XXXXXXXXXXXXXXXXXXXX", "sessionContext": { "sessionIssuer": { "type": "Role", "principalId": "XXXXXXXXXXXXXXXXXXXXX", "arn": "arn:aws:iam::123456789012:role/TestAccessRole", "accountId": "123456789012", "userName": "TestAccessRole" }, "webIdFederationData": {}, "attributes": { "creationDate": "2022-10-28T15:52:42Z", "mfaAuthenticated": "false" } } }, "eventTime": "2022-10-28T16:02:30Z", "eventSource": "medical-imaging.amazonaws.com", "eventName": "GetDICOMImportJob", "awsRegion": "us-east-1", "sourceIPAddress": "192.0.2.0", "userAgent": "aws-sdk-java/2.18.1 Linux/5.4.209-129.367.amzn2int.x86_64 OpenJDK_64-Bit_Server_VM/11.0.17+9-LTS Java/11.0.17 vendor/Amazon.com_Inc. md/internal io/sync http/Apache cfg/retry-mode/standard", "requestParameters": { "jobId": "5d08d05d6aab2a27922d6260926077d4", "datastoreId": "12345678901234567890123456789012" }, "responseElements": null, "requestID": "922f5304-b39f-4034-9d2e-f062de092a44", "eventID": "26307f73-07f4-4276-b379-d362aa303b22", "readOnly": true, "eventType": "AwsApiCall", "managementEvent": true, "recipientAccountId": "824333766656", "eventCategory": "Management" }