S3Destination Class
Use a S3 bucket as a Lambda destination.
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_lambda_destinations as lambda_destinations } from 'aws-cdk-lib';
import { aws_s3 as s3 } from 'aws-cdk-lib';
declare const bucket: s3.Bucket;
const s3Destination = new lambda_destinations.S3Destination(bucket);
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_lambda_destinations as lambda_destinations
from aws_cdk import aws_s3 as s3
# bucket: s3.Bucket
s3_destination = lambda_destinations.S3Destination(bucket)
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.lambda.destinations.*;
import software.amazon.awscdk.services.s3.*;
Bucket bucket;
S3Destination s3Destination = new S3Destination(bucket);
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.Lambda.Destinations;
using Amazon.CDK.AWS.S3;
Bucket bucket;
var s3Destination = new S3Destination(bucket);
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 bucket Bucket
s3Destination := awscdk.Aws_lambda_destinations.NewS3Destination(bucket)
Initializer
Methods
bind(_scope: Construct, fn: IFunction, _options?: DestinationOptions): DestinationConfigdef bind(self, _scope: Construct, fn: IFunction, _options: typing.Optional[DestinationOptions] = None) -> DestinationConfigpublic DestinationConfig bind(Construct _scope, IFunction fn, DestinationOptions _options)public DestinationConfig Bind(Construct _scope, IFunction fn, DestinationOptions? _options = null)func Bind(_scope Construct, Fn IFunction, _options DestinationOptions) DestinationConfig#Returns a destination configuration.