# DeploymentSourceContext

Bind context for ISources.

Used as argument in: [ISource.bind](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_s3_deployment.ISource.html#bind)

- 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#L106)

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_iam as iam } from 'aws-cdk-lib';
import { aws_s3_deployment as s3_deployment } from 'aws-cdk-lib';

declare const role: iam.Role;
const deploymentSourceContext: s3_deployment.DeploymentSourceContext = {
  handlerRole: role,
};
```

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_iam as iam
from aws_cdk import aws_s3_deployment as s3_deployment

# role: iam.Role

deployment_source_context = s3_deployment.DeploymentSourceContext(
    handler_role=role
)
```

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.iam.*;
import software.amazon.awscdk.services.s3.deployment.*;

Role role;

DeploymentSourceContext deploymentSourceContext = DeploymentSourceContext.builder()
        .handlerRole(role)
        .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.IAM;
using Amazon.CDK.AWS.S3.Deployment;

Role role;

var deploymentSourceContext = new DeploymentSourceContext {
    HandlerRole = role
};
```

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"
import "github.com/aws/aws-cdk-go/awscdk"

var role Role

deploymentSourceContext := &DeploymentSourceContext{
	HandlerRole: role,
}
```

## Properties

- `handlerRole`: [IRole](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iam.IRole.html) (required) — The role for the handler.
