Class S3CodeV2

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.lambda.Code
software.amazon.awscdk.services.lambda.S3CodeV2
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.106.0 (build e852934)", date="2025-02-06T22:15:56.814Z") @Stability(Stable) public class S3CodeV2 extends Code
Lambda code from an S3 archive.

With option to set KMSKey for encryption.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.kms.*;
 import software.amazon.awscdk.services.lambda.*;
 import software.amazon.awscdk.services.s3.*;
 Bucket bucket;
 Key key;
 S3CodeV2 s3CodeV2 = S3CodeV2.Builder.create(bucket, "key")
         .objectVersion("objectVersion")
         .sourceKMSKey(key)
         .build();
 
  • Constructor Details

    • S3CodeV2

      protected S3CodeV2(software.amazon.jsii.JsiiObjectRef objRef)
    • S3CodeV2

      protected S3CodeV2(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • S3CodeV2

      @Stability(Stable) public S3CodeV2(@NotNull IBucket bucket, @NotNull String key, @Nullable BucketOptions options)
      Parameters:
      bucket - This parameter is required.
      key - This parameter is required.
      options -
    • S3CodeV2

      @Stability(Stable) public S3CodeV2(@NotNull IBucket bucket, @NotNull String key)
      Parameters:
      bucket - This parameter is required.
      key - This parameter is required.
  • Method Details

    • bind

      @Stability(Stable) @NotNull public CodeConfig bind(@NotNull software.constructs.Construct _scope)
      Called when the lambda or layer is initialized to allow this object to bind to the stack, add resources and have fun.

      Specified by:
      bind in class Code
      Parameters:
      _scope - This parameter is required.
    • getIsInline

      @Stability(Stable) @NotNull public Boolean getIsInline()
      Determines whether this Code is inline code or not.