Package software.amazon.awscdk.services.s3objectlambda
@Stability(Experimental)
@Deprecated
package software.amazon.awscdk.services.s3objectlambda
Deprecated.
AWS::S3ObjectLambda Construct Library
---
AWS CDK v1 has reached End-of-Support on 2023-06-01. This package is no longer being updated, and users should migrate to AWS CDK v2.
For more information on how to migrate, see the Migrating to AWS CDK v2 guide.
This construct library allows you to define S3 object lambda access points.
import software.amazon.awscdk.services.lambda.*; import software.amazon.awscdk.services.s3.*; import software.amazon.awscdk.services.s3objectlambda.*; import software.amazon.awscdk.core.*; Stack stack = new Stack(); Bucket bucket = new Bucket(stack, "MyBucket"); Function handler = Function.Builder.create(stack, "MyFunction") .runtime(Runtime.NODEJS_14_X) .handler("index.handler") .code(Code.fromAsset("lambda.zip")) .build(); AccessPoint.Builder.create(stack, "MyObjectLambda") .bucket(bucket) .handler(handler) .accessPointName("my-access-point") .payload(Map.of( "prop", "value")) .build();
Handling range and part number requests
Lambdas are currently limited to only transforming GetObject
requests. However, they can additionally support GetObject-Range
and GetObject-PartNumber
requests, which needs to be specified in the access point configuration:
import software.amazon.awscdk.services.lambda.*; import software.amazon.awscdk.services.s3.*; import software.amazon.awscdk.services.s3objectlambda.*; import software.amazon.awscdk.core.*; Stack stack = new Stack(); Bucket bucket = new Bucket(stack, "MyBucket"); Function handler = Function.Builder.create(stack, "MyFunction") .runtime(Runtime.NODEJS_14_X) .handler("index.handler") .code(Code.fromAsset("lambda.zip")) .build(); AccessPoint.Builder.create(stack, "MyObjectLambda") .bucket(bucket) .handler(handler) .accessPointName("my-access-point") .supportsGetObjectRange(true) .supportsGetObjectPartNumber(true) .build();
Pass additional data to Lambda function
You can specify an additional object that provides supplemental data to the Lambda function used to transform objects. The data is delivered as a JSON payload to the Lambda:
Deprecated: AWS CDK v1 has reached End-of-Support on 2023-06-01. This package is no longer being updated, and users should migrate to AWS CDK v2. For more information on how to migrate, see https://docs.aws.amazon.com/cdk/v2/guide/migrating-v2.htmlimport software.amazon.awscdk.services.lambda.*; import software.amazon.awscdk.services.s3.*; import software.amazon.awscdk.services.s3objectlambda.*; import software.amazon.awscdk.core.*; Stack stack = new Stack(); Bucket bucket = new Bucket(stack, "MyBucket"); Function handler = Function.Builder.create(stack, "MyFunction") .runtime(Runtime.NODEJS_14_X) .handler("index.handler") .code(Code.fromAsset("lambda.zip")) .build(); AccessPoint.Builder.create(stack, "MyObjectLambda") .bucket(bucket) .handler(handler) .accessPointName("my-access-point") .payload(Map.of( "prop", "value")) .build();
-
ClassDescription(experimental) An S3 object lambda access point for intercepting and transforming
GetObject
requests.(experimental) A fluent builder forAccessPoint
.(experimental) The access point resource attributes.A builder forAccessPointAttributes
An implementation forAccessPointAttributes
(experimental) The S3 object lambda access point configuration.A builder forAccessPointProps
An implementation forAccessPointProps
A CloudFormationAWS::S3ObjectLambda::AccessPoint
.The alias of an Object Lambda Access Point.A builder forCfnAccessPoint.AliasProperty
An implementation forCfnAccessPoint.AliasProperty
Example:A builder forCfnAccessPoint.AwsLambdaProperty
An implementation forCfnAccessPoint.AwsLambdaProperty
A fluent builder forCfnAccessPoint
.Example:A builder forCfnAccessPoint.ContentTransformationProperty
An implementation forCfnAccessPoint.ContentTransformationProperty
A configuration used when creating an Object Lambda Access Point.A builder forCfnAccessPoint.ObjectLambdaConfigurationProperty
An implementation forCfnAccessPoint.ObjectLambdaConfigurationProperty
Indicates whether this access point policy is public.A builder forCfnAccessPoint.PolicyStatusProperty
An implementation forCfnAccessPoint.PolicyStatusProperty
ThePublicAccessBlock
configuration that you want to apply to this Amazon S3 account.A builder forCfnAccessPoint.PublicAccessBlockConfigurationProperty
An implementation forCfnAccessPoint.PublicAccessBlockConfigurationProperty
A configuration used when creating an Object Lambda Access Point transformation.A builder forCfnAccessPoint.TransformationConfigurationProperty
An implementation forCfnAccessPoint.TransformationConfigurationProperty
A CloudFormationAWS::S3ObjectLambda::AccessPointPolicy
.A fluent builder forCfnAccessPointPolicy
.Properties for defining aCfnAccessPointPolicy
.A builder forCfnAccessPointPolicyProps
An implementation forCfnAccessPointPolicyProps
Properties for defining aCfnAccessPoint
.A builder forCfnAccessPointProps
An implementation forCfnAccessPointProps
(experimental) The interface that represents the AccessPoint resource.Internal default implementation forIAccessPoint
.A proxy class which represents a concrete javascript instance of this type.