AWS ses documentation change
Summary
Major restructuring of CloudTrail logging documentation for SES. Added detailed sections about data event logging, log delivery scenarios, management events, and expanded example log entries. Includes configuration examples for data event logging and cross-account logging behavior.
Security assessment
The changes enhance documentation about security-relevant logging capabilities (data event logging for SendEmail APIs, cross-account logging scenarios, and TLS details in logs) but do not address a specific disclosed vulnerability. The additions help users implement better security monitoring but are not a direct response to a security flaw.
Diff
diff --git a/ses/latest/dg/logging-using-cloudtrail.md b/ses/latest/dg/logging-using-cloudtrail.md index 9484dee56..1f3efb6be 100644 --- a//ses/latest/dg/logging-using-cloudtrail.md +++ b//ses/latest/dg/logging-using-cloudtrail.md @@ -5 +5 @@ -Amazon SES Information in CloudTrailExample: Amazon SES Log File Entries +SES information in CloudTrailSES data events in CloudTrailLog delivery scenariosSES management eventsCloudTrail log file entries @@ -9 +9 @@ Amazon SES Information in CloudTrailExample: Amazon SES Log File Entries -Amazon SES is integrated with AWS CloudTrail, a service that provides a record of actions taken by a user, role, or an AWS service in Amazon SES. CloudTrail captures API calls for Amazon SES as events. The calls captured include calls from the Amazon SES console and code calls to the Amazon SES API operations. If you create a trail, you can enable continuous delivery of CloudTrail events to an Amazon S3 bucket, including events for Amazon SES. 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 Amazon SES, the IP address from which the request was made, who made the request, when it was made, and additional details. +Amazon SES is integrated with AWS CloudTrail, a service that provides a record of actions taken by a user, role, or an AWS service in SES. CloudTrail captures API calls for SES as events. The calls captured include calls from the SES console and code calls to the SES API operations. If you create a trail, you can enable continuous delivery of CloudTrail events to an Amazon S3 bucket, including events for SES. 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 SES, the IP address from which the request was made, who made the request, when it was made, and additional details. @@ -13 +13 @@ To learn more about CloudTrail, including how to configure and enable it, see th -## Amazon SES Information in CloudTrail +## SES information in CloudTrail @@ -15 +15 @@ To learn more about CloudTrail, including how to configure and enable it, see th -CloudTrail is enabled on your AWS account when you create the account. When supported event activity occurs in Amazon SES, 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](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/view-cloudtrail-events.html). +CloudTrail is enabled on your AWS account when you create the account. When supported event activity occurs in SES, 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](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/view-cloudtrail-events.html). @@ -17 +17 @@ CloudTrail is enabled on your AWS account when you create the account. When supp -For an ongoing record of events in your AWS account, including events for Amazon SES, 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: +For an ongoing record of events in your AWS account, including events for SES, 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: @@ -30 +30,18 @@ For an ongoing record of events in your AWS account, including events for Amazon -Amazon SES supports logging of all the actions listed in the [SES API Reference](https://docs.aws.amazon.com/ses/latest/APIReference/API_Operations.html) and [SES API v2 Reference](https://docs.aws.amazon.com/ses/latest/APIReference-V2/API_Operations.html) as events in CloudTrail log files, except for those listed in the note box below: +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](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-event-reference-user-identity.html). + +## SES data events in CloudTrail + +[Data events](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html#logging-data-events) provide information about the resource operations performed on or in a resource. These are also known as data plane operations. Data events are often high-volume activities. By default, CloudTrail doesn’t log data events. The CloudTrail event history doesn't record data events. + +Additional charges apply for data events. For more information about CloudTrail pricing, see [AWS CloudTrail pricing](https://aws.amazon.com/cloudtrail/pricing/). @@ -34 +51,3 @@ Amazon SES supports logging of all the actions listed in the [SES API Reference] -Amazon SES delivers _management events_ to CloudTrail. Management events include actions that are related to creating and managing resources within your AWS account. In Amazon SES, management events include actions such as creating and deleting identities or receipt rules. +Email sending activity via SES SMTP Interface is not logged to CloudTrail events. For comprehensive activity logging, use the latest SES APIs in the [SES API Reference](https://docs.aws.amazon.com/ses/latest/APIReference/API_Operations.html) and [SES API v2 Reference](https://docs.aws.amazon.com/ses/latest/APIReference-V2/API_Operations.html). + +The following table lists the SES resource types for which you can log data events. The _Data event type (console)_ column shows the value to choose from the **Data event type** list on the CloudTrail console. The _resources.type value_ column shows the `resources.type` value, which you would specify when configuring advanced event selectors using the column shows the AWS CLI or CloudTrail APIs. The _Data APIs logged to CloudTrail_ column shows the API calls logged to CloudTrail for the resource type. @@ -36 +55,5 @@ Amazon SES delivers _management events_ to CloudTrail. Management events include -Management events are different from _data events_. Data events are events that are related to accessing and interacting with data within your AWS account. In Amazon SES, data events include actions such as sending emails. +SES resource types for data events Data event type (console) | resources.type value | Data APIs logged to CloudTrail +---|---|--- +SES identity | AWS::SES::EmailIdentity | **SES:** [SendEmail](https://docs.aws.amazon.com/ses/latest/APIReference/API_SendEmail.html) [SendRawEmail](https://docs.aws.amazon.com/ses/latest/APIReference/API_SendRawEmail.html) [SendTemplatedEmail](https://docs.aws.amazon.com/ses/latest/APIReference/API_SendTemplatedEmail.html) [SendBulkTemplatedEmail](https://docs.aws.amazon.com/ses/latest/APIReference/API_SendBulkTemplatedEmail.html) **SES v2:** [SendEmail](https://docs.aws.amazon.com/ses/latest/APIReference-V2/API_SendEmail.html) [SendBulkEmail](https://docs.aws.amazon.com/ses/latest/APIReference-V2/API_SendBulkEmail.html) +SES configuration set | AWS::SES::ConfigurationSet +SES template | AWS::SES::Template | **SES:** [SendTemplatedEmail](https://docs.aws.amazon.com/ses/latest/APIReference/API_SendTemplatedEmail.html) [SendBulkTemplatedEmail](https://docs.aws.amazon.com/ses/latest/APIReference/API_SendBulkTemplatedEmail.html) **SES v2:** [SendEmail](https://docs.aws.amazon.com/ses/latest/APIReference-V2/API_SendEmail.html) [SendBulkEmail](https://docs.aws.amazon.com/ses/latest/APIReference-V2/API_SendBulkEmail.html) @@ -38 +61 @@ Management events are different from _data events_. Data events are events that -Because Amazon SES only delivers management events to CloudTrail, the following events **aren't** recorded in CloudTrail: +The following example shows how to log all data events for all SES email identities by using the `--advanced-event-selectors` parameter: @@ -40 +62,0 @@ Because Amazon SES only delivers management events to CloudTrail, the following - * SendEmail @@ -42 +64,13 @@ Because Amazon SES only delivers management events to CloudTrail, the following - * SendRawEmail + aws cloudtrail put-event-selectors \ + --region Region \ + --trail-name TrailName \ + --advanced-event-selectors + '[ + { + "Name": "Log SES data plane actions for all email identities", + "FieldSelectors": [ + { "Field": "eventCategory", "Equals": ["Data"] }, + { "Field": "resources.type", "Equals": ["AWS::SES::EmailIdentity"] } + ] + } + ]' @@ -44 +78 @@ Because Amazon SES only delivers management events to CloudTrail, the following - * SendTemplatedEmail +You can further refine the advanced event selectors to filter on the `eventName`, `readOnly`, and `resources.ARN` fields to log only those events that are important to you. For more information about these fields, see [AdvancedFieldSelector](https://docs.aws.amazon.com/awscloudtrail/latest/APIReference/API_AdvancedFieldSelector.html) in the _AWS CloudTrail API Reference_. For more examples on how to log data events see [Logging data events](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html) for trails. @@ -46 +80 @@ Because Amazon SES only delivers management events to CloudTrail, the following - * SendBulkTemplatedEmail +## CloudTrail log delivery scenarios for SES logging @@ -47,0 +82 @@ Because Amazon SES only delivers management events to CloudTrail, the following +CloudTrail delivers logs based on such factors as account and resource ownership, identity type, and region. The following matrix explains to whom and where the logs would be delivered to based on specific combinations of these factors. @@ -48,0 +84,7 @@ Because Amazon SES only delivers management events to CloudTrail, the following +Scenario type | Account roles | Resources | Request flow | Log delivery +---|---|---|---|--- +**Single cross-account** | Account A:_resource owner_ Account B _: requester_ | Email identity | B → A's email identity | Logs delivered to both A and B +Feedback forwarding email | B → A's feedback email | Logs delivered to both A and B +**Multiple cross-account** | Account A:_feedback email owner_ Account B:_email identity owner_ Account C:_requester_ | Feedback email (A) Email identity (B) | C → A's feedback email + B's email identity | Logs delivered to A, B, and C +**Global endpoint (Single account)** | Account A:_owner & requester_ | Global endpoint (primary: _eu‑west‑1_ & secondary: _us‑west‑2_) | A → Global endpoint | Logs delivered to A in region that processed the request (either _eu‑west‑1_ or _us‑west‑2_) +**Global endpoint (Cross-account)** | Account A:_email identity owner_ Account B:_requester_ | Email identity (A) Global endpoint (B) (_eu‑west‑1_ & _us‑west‑2_) | B → A's email identity via Global endpoint | Logs delivered to both A and B in region that processed the request (either _eu‑west‑1_ or _us‑west‑2_) @@ -49,0 +92 @@ Because Amazon SES only delivers management events to CloudTrail, the following +###### Note @@ -51 +94 @@ Because Amazon SES only delivers management events to CloudTrail, the following -You can use event publishing to record events related to email sending. For more information, see [Monitor email sending using Amazon SES event publishing](./monitor-using-event-publishing.html). + * CloudTrail always delivers logs to the requester account. @@ -53 +96 @@ You can use event publishing to record events related to email sending. For more -Every event or log entry contains information about who generated the request. The identity information helps you determine the following: + * Resource owners receive logs even if they didn't perform the operation. @@ -55 +98 @@ Every event or log entry contains information about who generated the request. T - * Whether the request was made with root or AWS Identity and Access Management (IAM) user credentials. + * For Global endpoints, both accounts need CloudTrail subscriptions in all configured regions. @@ -57 +100 @@ Every event or log entry contains information about who generated the request. T - * Whether the request was made with temporary security credentials for a role or federated user. + * During regional impairments, all logs appear in the healthy region. @@ -59 +101,0 @@ Every event or log entry contains information about who generated the request. T - * Whether the request was made by another AWS service. @@ -62,0 +105 @@ Every event or log entry contains information about who generated the request. T +## SES management events in CloudTrail @@ -64 +107 @@ Every event or log entry contains information about who generated the request. T -For more information, see the [CloudTrail userIdentity Element](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-event-reference-user-identity.html). +SES delivers management events to CloudTrail. Management events include actions that are related to creating and managing resources within your AWS account. In Amazon SES, management events include actions such as creating and deleting identities or receipt rules. For more information about SES API operations, see the [SES API Reference](https://docs.aws.amazon.com/ses/latest/APIReference/API_Operations.html) and [SES API v2 Reference](https://docs.aws.amazon.com/ses/latest/APIReference-V2/API_Operations.html). @@ -66 +109 @@ For more information, see the [CloudTrail userIdentity Element](https://docs.aws -## Example: Amazon SES Log File Entries +## CloudTrail log file entries for SES @@ -70 +113,16 @@ A trail is a configuration that enables delivery of events as log files to an Am -The following example shows a CloudTrail log entry that demonstrates the `DeleteIdentity` and `VerifyEmailIdentity` actions. +The following examples demonstrate CloudTrail logs of these event types: + +###### Event types + + * DeleteIdentity + + * VerifyEmailIdentity + + * SendEmail with simple content + + * SendEmail with templated content + + + + +### DeleteIdentity @@ -76,3 +134,22 @@ The following example shows a CloudTrail log entry that demonstrates the `Delete - "awsRegion":"us-west-2", - "eventID":"0ffa308d-1467-4259-8be3-c749753be325", - "eventName":"DeleteIdentity", + "eventVersion": "1.11", + "userIdentity": { + "type": "AssumedRole", + "principalId": "AROA4DO2KAWIPZEXAMPLE:myUserName", + "arn": "arn:aws:sts::111122223333:assumed-role/users/myUserName", + "accountId": "111122223333", + "accessKeyId": "AKIAIOSFODNN7EXAMPLE", + "sessionContext": { + "sessionIssuer": { + "type": "Role", + "principalId": "AROA4DO2KAWIPZEXAMPLE", + "arn": "arn:aws:iam::111122223333:role/admin-role", + "accountId": "111122223333", + "userName": "myUserName" + }, + "attributes": { + "creationDate": "2025-02-27T09:53:35Z", + "mfaAuthenticated": "false" + } + } + }, + "eventTime": "2025-02-27T09:54:31Z", @@ -80,5 +157,4 @@ The following example shows a CloudTrail log entry that demonstrates the `Delete - "eventTime":"2018-02-02T21:34:50Z", - "eventType":"AwsApiCall", - "eventVersion":"1.02", - "recipientAccountId":"111122223333", - "requestID":"50b87bfe-ab23-11e4-9106-5b36376f9d12", + "eventName": "DeleteIdentity", + "awsRegion": "us-east-1", + "sourceIPAddress": "192.0.2.0", + "userAgent": "aws-cli/2.23.4", @@ -86 +162 @@ The following example shows a CloudTrail log entry that demonstrates the `Delete - "identity":"amazon.com" + "identity": "[email protected]" @@ -89,2 +165,23 @@ The following example shows a CloudTrail log entry that demonstrates the `Delete - "sourceIPAddress":"192.0.2.0", - "userAgent":"aws-sdk-java/unknown-version", + "requestID": "50b87bfe-ab23-11e4-9106-5b36376f9d12", + "eventID": "0ffa308d-1467-4259-8be3-c749753be325", + "readOnly": false, + "eventType": "AwsApiCall", + "managementEvent": true, + "recipientAccountId": "111122223333", + "eventCategory": "Management", + "tlsDetails": { + "tlsVersion": "TLSv1.3", + "cipherSuite": "TLS_AES_128_GCM_SHA256", + "clientProvidedHostHeader": "email.us-east-1.amazonaws.com" + } + } + ] + } + +### VerifyEmailIdentity + + + { + "Records":[ + { + "eventVersion": "1.11", @@ -91,0 +189,4 @@ The following example shows a CloudTrail log entry that demonstrates the `Delete + "type": "AssumedRole", + "principalId": "AROA4DO2KAWIPZEXAMPLE:myUserName", + "arn": "arn:aws:sts::111122223333:assumed-role/users/myUserName", + "accountId": "111122223333", @@ -92,0 +194,5 @@ The following example shows a CloudTrail log entry that demonstrates the `Delete