# CustomResourceConfig

Manages AWS-vended Custom Resources.

This feature is currently experimental.

Obtainable from: CustomResourceConfig.of

- Source: [`custom-resources/lib/custom-resource-config/custom-resource-config.ts`](https://github.com/aws/aws-cdk/blob/v2.277.0/packages/aws-cdk-lib/custom-resources/lib/custom-resource-config/custom-resource-config.ts#L21)
- Type last changed: v2.189.1 · 14 Apr 2025

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { custom_resources } from 'aws-cdk-lib';
const customResourceConfig = custom_resources.CustomResourceConfig.of(this);
```

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 custom_resources

custom_resource_config = custom_resources.CustomResourceConfig.of(self)
```

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

CustomResourceConfig customResourceConfig = CustomResourceConfig.of(this);
```

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.CustomResources;

var customResourceConfig = CustomResourceConfig.Of(this);
```

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"

customResourceConfig := awscdk.Custom_resources.CustomResourceConfig_Of(this)
```

## Methods

- `addLambdaRuntime(lambdaRuntime: Runtime): void` — Set the runtime version on AWS-vended custom resources lambdas.

  This feature is currently experimental.

- `addLogRetentionLifetime(retention: RetentionDays): void` — Set the log retention of AWS-vended custom resource lambdas.

  This feature is currently experimental.

- `addRemovalPolicy(removalPolicy: RemovalPolicy): void` — Set the removal policy of AWS-vended custom resource logGroup.

  This feature is currently experimental.

- `of(scope: IConstruct): CustomResourceConfig // chainable` (static) — Returns the CustomResourceConfig for this scope.
