interface ServiceConnectAccessLogConfiguration
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.ECS.ServiceConnectAccessLogConfiguration |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsecs#ServiceConnectAccessLogConfiguration |
Java | software.amazon.awscdk.services.ecs.ServiceConnectAccessLogConfiguration |
Python | aws_cdk.aws_ecs.ServiceConnectAccessLogConfiguration |
TypeScript (source) | aws-cdk-lib » aws_ecs » ServiceConnectAccessLogConfiguration |
Configuration for Service Connect access logs.
Service Connect access logs provide detailed telemetry about individual requests processed by the Service Connect proxy, including HTTP methods, paths, response codes, and timing information.
Example
declare const cluster: ecs.Cluster;
declare const taskDefinition: ecs.TaskDefinition;
const service = new ecs.FargateService(this, 'Service', {
cluster,
taskDefinition,
serviceConnectConfiguration: {
services: [
{
portMappingName: 'api',
},
],
accessLogConfiguration: {
format: ecs.ServiceConnectAccessLogFormat.JSON,
includeQueryParameters: true,
},
// When configuring access log,
// you also need to configure the log driver accordingly.
logDriver: ecs.LogDrivers.awsLogs({
streamPrefix: 'prefix',
}),
},
});
Properties
| Name | Type | Description |
|---|---|---|
| format | Service | The format for Service Connect access log output. |
| include | boolean | Whether to include query parameters in Service Connect access logs. |
format
Type:
Service
The format for Service Connect access log output.
- TEXT: Human-readable text format
- JSON: Structured JSON format for log analysis tools
includeQueryParameters?
Type:
boolean
(optional, default: undefined - AWS ECS default is false, which means that query parameters are not included in access logs)
Whether to include query parameters in Service Connect access logs.
When enabled, query parameters from HTTP requests are included in the access logs. Consider security and privacy implications as query parameters may contain sensitive information such as request IDs and tokens.

.NET
Go
Java
Python
TypeScript (