Class TenancyConfig

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

@Generated(value="jsii-pacmak/1.119.0 (build 1634eac)", date="2025-11-20T23:37:24.413Z") @Stability(Stable) public class TenancyConfig extends software.amazon.jsii.JsiiObject
Specify the tenant isolation mode for Lambda functions.

This is incompatible with:

  • SnapStart
  • Provisioned Concurrency
  • Function URLs
  • Most Event sources (only API Gateway is supported)

Example:

 Function fn = Function.Builder.create(this, "MyFunction")
         .runtime(Runtime.NODEJS_18_X)
         .handler("index.handler")
         .code(Code.fromAsset(join(__dirname, "lambda-handler")))
         .tenancyConfig(TenancyConfig.PER_TENANT)
         .build();
 
  • Nested Class Summary

    Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

    software.amazon.jsii.JsiiObject.InitializationMode
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final TenancyConfig
    Each tenant gets a dedicated execution environment.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
     
    protected
    TenancyConfig(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    TenancyConfig(software.amazon.jsii.JsiiObjectRef objRef)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    The CloudFormation property for tenancy configuration.

    Methods inherited from class software.amazon.jsii.JsiiObject

    jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Field Details

    • PER_TENANT

      @Stability(Stable) public static final TenancyConfig PER_TENANT
      Each tenant gets a dedicated execution environment.

      Execution environments are not shared between different tenants, but can be reused for the same tenant to avoid cold starts.

  • Constructor Details

    • TenancyConfig

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

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

      @Stability(Stable) protected TenancyConfig(@NotNull String mode)
      Parameters:
      mode - This parameter is required.
  • Method Details

    • getTenancyConfigProperty

      @Stability(Stable) @NotNull public CfnFunction.TenancyConfigProperty getTenancyConfigProperty()
      The CloudFormation property for tenancy configuration.