Interface BucketOptions
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
BucketOptions.Jsii$Proxy
@Generated(value="jsii-pacmak/1.140.0 (build 79fd58c)",
date="2026-09-25T13:53:53.232Z")
@Stability(Stable)
public interface BucketOptions
extends software.amazon.jsii.JsiiSerializable
Optional parameters for creating code using bucket.
Example:
import software.amazon.awscdk.services.kms.Key;
import software.amazon.awscdk.services.s3.*;
Key key;
Bucket bucket = new Bucket(this, "Bucket");
Map<String, Key> options = Map.of(
"sourceKMSKey", key);
Function fnBucket = Function.Builder.create(this, "myFunction2")
.runtime(Runtime.NODEJS_LATEST)
.handler("index.handler")
.code(Code.fromBucketV2(bucket, "python-lambda-handler.zip", options))
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forBucketOptionsstatic final classAn implementation forBucketOptions -
Method Summary
Modifier and TypeMethodDescriptionstatic BucketOptions.Builderbuilder()default StringOptional S3 object version.default S3ObjectStorageModeHow Lambda manages the storage of your code package.default IKeyRefThe KMS key that Lambda uses to encrypt the deployment package in Lambda-managed storage.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getObjectVersion
Optional S3 object version.Required when
s3ObjectStorageModeis set toS3ObjectStorageMode.REFERENCE.Default: - no object version
-
getS3ObjectStorageMode
How Lambda manages the storage of your code package.Default: - Lambda copies the deployment package from your S3 bucket into Lambda-managed storage.
-
getSourceKMSKey
The KMS key that Lambda uses to encrypt the deployment package in Lambda-managed storage.This is not the key used to encrypt the source object in Amazon S3.
Default: - Lambda uses an AWS owned key
-
builder
- Returns:
- a
BucketOptions.BuilderofBucketOptions
-