CloudTrail logs for VPC Lattice - Amazon VPC Lattice

CloudTrail logs for VPC Lattice

AWS CloudTrail is an AWS service that provides a record of actions taken by a user, role, or an AWS service. CloudTrail captures API calls for VPC Lattice as events. CloudTrail is enabled on your AWS account when you create it. When activity occurs in VPC Lattice, that activity is recorded as a CloudTrail event along with other AWS service events in Event history. The calls captured include calls from the VPC Lattice console and code calls to VPC Lattice API operations. For more information about CloudTrail, see the AWS CloudTrail User Guide.

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. A trail is a CloudTrail configuration that enables delivery of events as log files to an S3 bucket that you specify.

To monitor additional actions, use access logs. For more information, see Access logs.

Understand VPC Lattice 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.

For information related to key-value pairs in the logs, see CloudTrail record contents in the AWS CloudTrail User Guide.

The following is an example log entry for a call to the CreateService API action.

{ "eventVersion": "1.08", "userIdentity": { "type": "AssumedRole", "principalId": "abcdef01234567890", "arn": "arn:abcdef01234567890", "accountId": "abcdef01234567890", "accessKeyId": "abcdef01234567890", "sessionContext": { "sessionIssuer": { "type": "Role", "principalId": "abcdef01234567890", "arn": "arn:abcdef01234567890", "accountId": "abcdef01234567890", "userName": "abcdef01234567890" }, "webIdFederationData": {}, "attributes": { "creationDate": "2022-08-16T03:34:54Z", "mfaAuthenticated": "false" } } }, "eventTime": "2022-08-16T03:36:12Z", "eventSource": "vpc-lattice.amazonaws.com", "eventName": "CreateService", "awsRegion": "us-west-2", "sourceIPAddress": "abcdef01234567890", "userAgent": "abcdef01234567890", "requestParameters": { "name": "rates-service" }, "responseElements": { "name": "rates-service", "id": "abcdef01234567890", "arn": "arn:abcdef01234567890", "status": "CREATE_IN_PROGRESS" }, "requestID": "abcdef01234567890", "eventID": "abcdef01234567890", "readOnly": false, "eventType": "AwsApiCall", "managementEvent": true, "recipientAccountId": "abcdef01234567890", "eventCategory": "Management" }

The following is an example log entry for a call to the DeleteService API action.

{ "eventVersion": "1.08", "userIdentity": { "type": "AssumedRole", "principalId": "abcdef01234567890", "arn": "arn:ABCXYZ123456", "accountId": "abcdef01234567890", "accessKeyId": "abcdef01234567890", "sessionContext": { "sessionIssuer": { "type": "Role", "principalId": "abcdef01234567890", "arn": "arn:aws:iam::AIDACKCEVSQ6C2EXAMPLE:role/Admin", "accountId": "abcdef01234567890", "userName": "Admin" }, "webIdFederationData": {}, "attributes": { "creationDate": "2022-10-27T17:42:36Z", "mfaAuthenticated": "false" } } }, "eventTime": "2022-10-27T17:56:41Z", "eventSource": "vpc-lattice.amazonaws.com", "eventName": "DeleteService", "awsRegion": "us-east-1", "sourceIPAddress": "72.21.198.64", "userAgent": "abcdef01234567890", "requestParameters": { "serviceIdentifier": "abcdef01234567890" }, "responseElements": { "name": "test", "id": "abcdef01234567890", "arn": "arn:abcdef01234567890", "status": "DELETE_IN_PROGRESS" }, "requestID": "abcdef01234567890", "eventID": "abcdef01234567890", "readOnly": false, "eventType": "AwsApiCall", "managementEvent": true, "recipientAccountId": "abcdef01234567890", "eventCategory": "Management" }