# MarkersConfig

A configuration for markers substitution strategy.

Extends: [SourceDataOptions](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_s3_deployment.SourceDataOptions.html)

- Source: [`aws-s3-deployment/lib/source.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-s3-deployment/lib/source.ts#L71)
- Type last changed: v2.276.0 · 10 Nov 2026

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_s3_deployment as s3_deployment } from 'aws-cdk-lib';
const markersConfig: s3_deployment.MarkersConfig = {
  jsonEscape: false,
  markerEncodings: {
    markerEncodingsKey: s3_deployment.MarkerEncoding.LITERAL,
  },
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_s3_deployment as s3_deployment

markers_config = s3_deployment.MarkersConfig(
    json_escape=False,
    marker_encodings={
        "marker_encodings_key": s3_deployment.MarkerEncoding.LITERAL
    }
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.s3.deployment.*;

MarkersConfig markersConfig = MarkersConfig.builder()
        .jsonEscape(false)
        .markerEncodings(Map.of(
                "markerEncodingsKey", MarkerEncoding.LITERAL))
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.S3.Deployment;

var markersConfig = new MarkersConfig {
    JsonEscape = false,
    MarkerEncodings = new Dictionary<string, MarkerEncoding> {
        { "markerEncodingsKey", MarkerEncoding.LITERAL }
    }
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

markersConfig := &MarkersConfig{
	JsonEscape: jsii.Boolean(false),
	MarkerEncodings: map[string]MarkerEncoding{
		"markerEncodingsKey": awscdk.aws_s3_deployment.MarkerEncoding_LITERAL,
	},
}
```

## Properties

- `jsonEscape`: boolean = false — Default marker encoding for markers that don't have a `markerEncodings` entry.

  - If `false` (default), the default marker encoding is `MarkerEncoding.LITERAL`.
  - If `true`, the default marker encoding is `MarkerEncoding.UNQUOTED_JSON_VALUE`.

  See `Source.data()` for a full description of the effect of this setting.

  Unless you need fine-grained control over marker encoding, you should
  use `Source.jsonData()` or `Source.yamlData()`.

- `markerEncodings`: { [key: string]: [MarkerEncoding](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_s3_deployment.MarkerEncoding.html) } — For every marker specified in the `markers` property, this defines how the marker value should be encoded.

  **Default:** markers with no entry use the default encoding derived from jsonEscape

  The key is the marker name and the value is the encoding to use for that marker.
