# ContainerTaskConfigurationProperty

Configuration for running a custom container image on managed compute.

- Source: Generated at build time
- Type last changed: v2.272.0 · 30 Sep 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_iotsitewise as iotsitewise } from 'aws-cdk-lib';
const containerTaskConfigurationProperty: iotsitewise.CfnTask.ContainerTaskConfigurationProperty = {
  ecrUri: 'ecrUri',
  processingType: 'processingType',
  processingUnit: 'processingUnit',
  taskExecutionRole: 'taskExecutionRole',

  // the properties below are optional
  command: ['command'],
  environmentVariables: {
    environmentVariablesKey: 'environmentVariables',
  },
  ephemeralStorageConfiguration: {
    storageClass: 'storageClass',
    storageSizeInGiB: 123,
  },
  mounts: [{
    name: 'name',
    relativePath: 'relativePath',
    source: {
      s3AccessPoint: {
        accessPointArn: 'accessPointArn',

        // the properties below are optional
        prefix: 'prefix',
      },
    },
    storageType: 'storageType',
  }],
  timeoutSeconds: 123,
};
```

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_iotsitewise as iotsitewise

container_task_configuration_property = iotsitewise.CfnTask.ContainerTaskConfigurationProperty(
    ecr_uri="ecrUri",
    processing_type="processingType",
    processing_unit="processingUnit",
    task_execution_role="taskExecutionRole",

    # the properties below are optional
    command=["command"],
    environment_variables={
        "environment_variables_key": "environmentVariables"
    },
    ephemeral_storage_configuration=iotsitewise.CfnTask.EphemeralStorageConfigurationProperty(
        storage_class="storageClass",
        storage_size_in_gi_b=123
    ),
    mounts=[iotsitewise.CfnTask.MountProperty(
        name="name",
        relative_path="relativePath",
        source=iotsitewise.CfnTask.MountSourceProperty(
            s3_access_point=iotsitewise.CfnTask.S3AccessPointSourceProperty(
                access_point_arn="accessPointArn",

                # the properties below are optional
                prefix="prefix"
            )
        ),
        storage_type="storageType"
    )],
    timeout_seconds=123
)
```

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

ContainerTaskConfigurationProperty containerTaskConfigurationProperty = ContainerTaskConfigurationProperty.builder()
        .ecrUri("ecrUri")
        .processingType("processingType")
        .processingUnit("processingUnit")
        .taskExecutionRole("taskExecutionRole")

        // the properties below are optional
        .command(List.of("command"))
        .environmentVariables(Map.of(
                "environmentVariablesKey", "environmentVariables"))
        .ephemeralStorageConfiguration(EphemeralStorageConfigurationProperty.builder()
                .storageClass("storageClass")
                .storageSizeInGiB(123)
                .build())
        .mounts(List.of(MountProperty.builder()
                .name("name")
                .relativePath("relativePath")
                .source(MountSourceProperty.builder()
                        .s3AccessPoint(S3AccessPointSourceProperty.builder()
                                .accessPointArn("accessPointArn")

                                // the properties below are optional
                                .prefix("prefix")
                                .build())
                        .build())
                .storageType("storageType")
                .build()))
        .timeoutSeconds(123)
        .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.IoTSiteWise;

var containerTaskConfigurationProperty = new ContainerTaskConfigurationProperty {
    EcrUri = "ecrUri",
    ProcessingType = "processingType",
    ProcessingUnit = "processingUnit",
    TaskExecutionRole = "taskExecutionRole",

    // the properties below are optional
    Command = new [] { "command" },
    EnvironmentVariables = new Dictionary<string, string> {
        { "environmentVariablesKey", "environmentVariables" }
    },
    EphemeralStorageConfiguration = new EphemeralStorageConfigurationProperty {
        StorageClass = "storageClass",
        StorageSizeInGiB = 123
    },
    Mounts = new [] { new MountProperty {
        Name = "name",
        RelativePath = "relativePath",
        Source = new MountSourceProperty {
            S3AccessPoint = new S3AccessPointSourceProperty {
                AccessPointArn = "accessPointArn",

                // the properties below are optional
                Prefix = "prefix"
            }
        },
        StorageType = "storageType"
    } },
    TimeoutSeconds = 123
};
```

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"

containerTaskConfigurationProperty := &ContainerTaskConfigurationProperty{
	EcrUri: jsii.String("ecrUri"),
	ProcessingType: jsii.String("processingType"),
	ProcessingUnit: jsii.String("processingUnit"),
	TaskExecutionRole: jsii.String("taskExecutionRole"),

	// the properties below are optional
	Command: []*string{
		jsii.String("command"),
	},
	EnvironmentVariables: map[string]*string{
		"environmentVariablesKey": jsii.String("environmentVariables"),
	},
	EphemeralStorageConfiguration: &EphemeralStorageConfigurationProperty{
		StorageClass: jsii.String("storageClass"),
		StorageSizeInGiB: jsii.Number(123),
	},
	Mounts: []interface{}{
		&MountProperty{
			Name: jsii.String("name"),
			RelativePath: jsii.String("relativePath"),
			Source: &MountSourceProperty{
				S3AccessPoint: &S3AccessPointSourceProperty{
					AccessPointArn: jsii.String("accessPointArn"),

					// the properties below are optional
					Prefix: jsii.String("prefix"),
				},
			},
			StorageType: jsii.String("storageType"),
		},
	},
	TimeoutSeconds: jsii.Number(123),
}
```

## Properties

- `command`: string[] — The command to execute in the container.

- `ecrUri`: string (required) — The Amazon ECR image URI for the task container.

- `environmentVariables`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | { [key: string]: string } — A map of environment variable key-value pairs.

- `ephemeralStorageConfiguration`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnTask.EphemeralStorageConfigurationProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iotsitewise.CfnTask.EphemeralStorageConfigurationProperty.html) — Configuration for ephemeral storage attached to the container task.

- `mounts`: [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) | [CfnTask.MountProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iotsitewise.CfnTask.MountProperty.html)[] — Mounts attached to the container filesystem.

  Each mount exposes an external data source as a local directory inside the container.

- `processingType`: string (required) — The processing type for compute resources.

- `processingUnit`: string (required) — The processing unit allocation that determines vCPU, memory, and GPU resources.

- `taskExecutionRole`: string (required) — The ARN of the IAM role that grants the containerized workload permissions to access AWS resources.

- `timeoutSeconds`: number — The timeout in seconds for task execution.

  Default: 3600 (1 hour).
