See: Description
| Interface | Description |
|---|---|
| AccessPointAttributes |
(experimental) The access point resource attributes.
|
| AccessPointProps |
(experimental) The S3 object lambda access point configuration.
|
| CfnAccessPoint.ObjectLambdaConfigurationProperty |
A configuration used when creating an Object Lambda Access Point.
|
| CfnAccessPoint.TransformationConfigurationProperty |
A configuration used when creating an Object Lambda Access Point transformation.
|
| CfnAccessPointPolicyProps |
Properties for defining a `CfnAccessPointPolicy`.
|
| CfnAccessPointProps |
Properties for defining a `CfnAccessPoint`.
|
| IAccessPoint |
(experimental) The interface that represents the AccessPoint resource.
|
| IAccessPoint.Jsii$Default |
Internal default implementation for
IAccessPoint. |
This construct library allows you to define S3 object lambda access points.
// Example automatically generated from non-compiling source. May contain errors.
import software.amazon.awscdk.core.*;
import software.amazon.awscdk.core.*;
import software.amazon.awscdk.core.*;
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();
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:
// Example automatically generated from non-compiling source. May contain errors.
import software.amazon.awscdk.core.*;
import software.amazon.awscdk.core.*;
import software.amazon.awscdk.core.*;
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();
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:
// Example automatically generated from non-compiling source. May contain errors.
import software.amazon.awscdk.core.*;
import software.amazon.awscdk.core.*;
import software.amazon.awscdk.core.*;
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();
Copyright © 2022. All rights reserved.