# CustomTransformationConfigurationProperty

Settings for customizing steps in the data source content ingestion pipeline.

You can configure the data source to process documents with a Lambda function after they are parsed and converted into chunks. When you add a post-chunking transformation, the service stores chunked documents in an S3 bucket and invokes a Lambda function to process them.

To process chunked documents with a Lambda function, define an S3 bucket path for input and output objects, and a transformation that specifies the Lambda function to invoke. You can use the Lambda function to customize how chunks are split, and the metadata for each chunk.

- Source: Generated at build time
- Type last changed: v2.154.0 · 22 Aug 2024

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_bedrock as bedrock } from 'aws-cdk-lib';
const customTransformationConfigurationProperty: bedrock.CfnDataSource.CustomTransformationConfigurationProperty = {
  intermediateStorage: {
    s3Location: {
      uri: 'uri',
    },
  },
  transformations: [{
    stepToApply: 'stepToApply',
    transformationFunction: {
      transformationLambdaConfiguration: {
        lambdaArn: 'lambdaArn',
      },
    },
  }],
};
```

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_bedrock as bedrock

custom_transformation_configuration_property = bedrock.CfnDataSource.CustomTransformationConfigurationProperty(
    intermediate_storage=bedrock.CfnDataSource.IntermediateStorageProperty(
        s3_location=bedrock.CfnDataSource.S3LocationProperty(
            uri="uri"
        )
    ),
    transformations=[bedrock.CfnDataSource.TransformationProperty(
        step_to_apply="stepToApply",
        transformation_function=bedrock.CfnDataSource.TransformationFunctionProperty(
            transformation_lambda_configuration=bedrock.CfnDataSource.TransformationLambdaConfigurationProperty(
                lambda_arn="lambdaArn"
            )
        )
    )]
)
```

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.bedrock.*;

CustomTransformationConfigurationProperty customTransformationConfigurationProperty = CustomTransformationConfigurationProperty.builder()
        .intermediateStorage(IntermediateStorageProperty.builder()
                .s3Location(S3LocationProperty.builder()
                        .uri("uri")
                        .build())
                .build())
        .transformations(List.of(TransformationProperty.builder()
                .stepToApply("stepToApply")
                .transformationFunction(TransformationFunctionProperty.builder()
                        .transformationLambdaConfiguration(TransformationLambdaConfigurationProperty.builder()
                                .lambdaArn("lambdaArn")
                                .build())
                        .build())
                .build()))
        .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.Bedrock;

var customTransformationConfigurationProperty = new CustomTransformationConfigurationProperty {
    IntermediateStorage = new IntermediateStorageProperty {
        S3Location = new S3LocationProperty {
            Uri = "uri"
        }
    },
    Transformations = new [] { new TransformationProperty {
        StepToApply = "stepToApply",
        TransformationFunction = new TransformationFunctionProperty {
            TransformationLambdaConfiguration = new TransformationLambdaConfigurationProperty {
                LambdaArn = "lambdaArn"
            }
        }
    } }
};
```

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"

customTransformationConfigurationProperty := &CustomTransformationConfigurationProperty{
	IntermediateStorage: &IntermediateStorageProperty{
		S3Location: &S3LocationProperty{
			Uri: jsii.String("uri"),
		},
	},
	Transformations: []interface{}{
		&TransformationProperty{
			StepToApply: jsii.String("stepToApply"),
			TransformationFunction: &TransformationFunctionProperty{
				TransformationLambdaConfiguration: &TransformationLambdaConfigurationProperty{
					LambdaArn: jsii.String("lambdaArn"),
				},
			},
		},
	},
}
```

## Properties

- `intermediateStorage`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnDataSource.IntermediateStorageProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_bedrock.CfnDataSource.IntermediateStorageProperty.html) (required) — An S3 bucket path for input and output objects.

- `transformations`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnDataSource.TransformationProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_bedrock.CfnDataSource.TransformationProperty.html)[] (required) — A Lambda function that processes documents.
