Class Function


  • public class Function
    extends com.pulumi.resources.CustomResource
    Provides a Lambda Function resource. Lambda allows you to trigger execution of code in response to events in AWS, enabling serverless backend solutions. The Lambda Function itself includes source code and runtime configuration. For information about Lambda and how to use it, see [What is AWS Lambda?](https://docs.aws.amazon.com/lambda/latest/dg/welcome.html) > **NOTE:** Due to [AWS Lambda improved VPC networking changes that began deploying in September 2019](https://aws.amazon.com/blogs/compute/announcing-improved-vpc-networking-for-aws-lambda-functions/), EC2 subnets and security groups associated with Lambda Functions can take up to 45 minutes to successfully delete. > **NOTE:** If you get a `KMSAccessDeniedException: Lambda was unable to decrypt the environment variables because KMS access was denied` error when invoking an `aws.lambda.Function` with environment variables, the IAM role associated with the function may have been deleted and recreated _after_ the function was created. You can fix the problem two ways: 1) updating the function's role to another role and then updating it back again to the recreated role, or 2) by using Pulumi to `taint` the function and `apply` your configuration again to recreate the function. (When you create a function, Lambda grants permissions on the KMS key to the function's IAM role. If the IAM role is recreated, the grant is no longer valid. Changing the function's role or recreating the function causes Lambda to update the grant.) > To give an external source (like an EventBridge Rule, SNS, or S3) permission to access the Lambda function, use the `aws.lambda.Permission` resource. See [Lambda Permission Model](https://docs.aws.amazon.com/lambda/latest/dg/intro-permission-model.html) for more details. On the other hand, the `role` argument of this resource is the function's execution role for identity and access to AWS services and resources. ## Example Usage ### Basic Example ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.aws.iam.IamFunctions; import com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs; import com.pulumi.aws.iam.Role; import com.pulumi.aws.iam.RoleArgs; import com.pulumi.archive.ArchiveFunctions; import com.pulumi.archive.inputs.GetFileArgs; import com.pulumi.aws.lambda.Function; import com.pulumi.aws.lambda.FunctionArgs; import com.pulumi.aws.lambda.inputs.FunctionEnvironmentArgs; import com.pulumi.asset.FileArchive; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.io.File; import java.nio.file.Files; import java.nio.file.Paths; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { final var assumeRole = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder() .statements(GetPolicyDocumentStatementArgs.builder() .effect("Allow") .principals(GetPolicyDocumentStatementPrincipalArgs.builder() .type("Service") .identifiers("lambda.amazonaws.com") .build()) .actions("sts:AssumeRole") .build()) .build()); var iamForLambda = new Role("iamForLambda", RoleArgs.builder() .assumeRolePolicy(assumeRole.applyValue(getPolicyDocumentResult -> getPolicyDocumentResult.json())) .build()); final var lambda = ArchiveFunctions.getFile(GetFileArgs.builder() .type("zip") .sourceFile("lambda.js") .outputPath("lambda_function_payload.zip") .build()); var testLambda = new Function("testLambda", FunctionArgs.builder() .code(new FileArchive("lambda_function_payload.zip")) .role(iamForLambda.arn()) .handler("index.test") .runtime("nodejs18.x") .environment(FunctionEnvironmentArgs.builder() .variables(Map.of("foo", "bar")) .build()) .build()); } } ``` ### Lambda Layers ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.aws.lambda.LayerVersion; import com.pulumi.aws.lambda.Function; import com.pulumi.aws.lambda.FunctionArgs; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.io.File; import java.nio.file.Files; import java.nio.file.Paths; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { var exampleLayerVersion = new LayerVersion("exampleLayerVersion"); var exampleFunction = new Function("exampleFunction", FunctionArgs.builder() .layers(exampleLayerVersion.arn()) .build()); } } ``` ### Lambda Ephemeral Storage Lambda Function Ephemeral Storage(`/tmp`) allows you to configure the storage upto `10` GB. The default value set to `512` MB. ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.aws.iam.IamFunctions; import com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs; import com.pulumi.aws.iam.Role; import com.pulumi.aws.iam.RoleArgs; import com.pulumi.aws.lambda.Function; import com.pulumi.aws.lambda.FunctionArgs; import com.pulumi.aws.lambda.inputs.FunctionEphemeralStorageArgs; import com.pulumi.asset.FileArchive; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.io.File; import java.nio.file.Files; import java.nio.file.Paths; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { final var assumeRole = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder() .statements(GetPolicyDocumentStatementArgs.builder() .effect("Allow") .principals(GetPolicyDocumentStatementPrincipalArgs.builder() .type("Service") .identifiers("lambda.amazonaws.com") .build()) .actions("sts:AssumeRole") .build()) .build()); var iamForLambda = new Role("iamForLambda", RoleArgs.builder() .assumeRolePolicy(assumeRole.applyValue(getPolicyDocumentResult -> getPolicyDocumentResult.json())) .build()); var testLambda = new Function("testLambda", FunctionArgs.builder() .code(new FileArchive("lambda_function_payload.zip")) .role(iamForLambda.arn()) .handler("index.test") .runtime("nodejs18.x") .ephemeralStorage(FunctionEphemeralStorageArgs.builder() .size(10240) .build()) .build()); } } ``` ### Lambda File Systems Lambda File Systems allow you to connect an Amazon Elastic File System (EFS) file system to a Lambda function to share data across function invocations, access existing data including large files, and save function state. ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.aws.efs.FileSystem; import com.pulumi.aws.efs.FileSystemArgs; import com.pulumi.aws.efs.MountTarget; import com.pulumi.aws.efs.MountTargetArgs; import com.pulumi.aws.efs.AccessPoint; import com.pulumi.aws.efs.AccessPointArgs; import com.pulumi.aws.efs.inputs.AccessPointRootDirectoryArgs; import com.pulumi.aws.efs.inputs.AccessPointRootDirectoryCreationInfoArgs; import com.pulumi.aws.efs.inputs.AccessPointPosixUserArgs; import com.pulumi.aws.lambda.Function; import com.pulumi.aws.lambda.FunctionArgs; import com.pulumi.aws.lambda.inputs.FunctionFileSystemConfigArgs; import com.pulumi.aws.lambda.inputs.FunctionVpcConfigArgs; import com.pulumi.resources.CustomResourceOptions; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.io.File; import java.nio.file.Files; import java.nio.file.Paths; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { var efsForLambda = new FileSystem("efsForLambda", FileSystemArgs.builder() .tags(Map.of("Name", "efs_for_lambda")) .build()); var alpha = new MountTarget("alpha", MountTargetArgs.builder() .fileSystemId(efsForLambda.id()) .subnetId(aws_subnet.subnet_for_lambda().id()) .securityGroups(aws_security_group.sg_for_lambda().id()) .build()); var accessPointForLambda = new AccessPoint("accessPointForLambda", AccessPointArgs.builder() .fileSystemId(efsForLambda.id()) .rootDirectory(AccessPointRootDirectoryArgs.builder() .path("/lambda") .creationInfo(AccessPointRootDirectoryCreationInfoArgs.builder() .ownerGid(1000) .ownerUid(1000) .permissions("777") .build()) .build()) .posixUser(AccessPointPosixUserArgs.builder() .gid(1000) .uid(1000) .build()) .build()); var example = new Function("example", FunctionArgs.builder() .fileSystemConfig(FunctionFileSystemConfigArgs.builder() .arn(accessPointForLambda.arn()) .localMountPath("/mnt/efs") .build()) .vpcConfig(FunctionVpcConfigArgs.builder() .subnetIds(aws_subnet.subnet_for_lambda().id()) .securityGroupIds(aws_security_group.sg_for_lambda().id()) .build()) .build(), CustomResourceOptions.builder() .dependsOn(alpha) .build()); } } ``` ### Lambda retries Lambda Functions allow you to configure error handling for asynchronous invocation. The settings that it supports are `Maximum age of event` and `Retry attempts` as stated in [Lambda documentation for Configuring error handling for asynchronous invocation](https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#invocation-async-errors). To configure these settings, refer to the aws.lambda.FunctionEventInvokeConfig resource. ## CloudWatch Logging and Permissions For more information about CloudWatch Logs for Lambda, see the [Lambda User Guide](https://docs.aws.amazon.com/lambda/latest/dg/monitoring-functions-logs.html). ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.aws.cloudwatch.LogGroup; import com.pulumi.aws.cloudwatch.LogGroupArgs; import com.pulumi.aws.iam.IamFunctions; import com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs; import com.pulumi.aws.iam.Policy; import com.pulumi.aws.iam.PolicyArgs; import com.pulumi.aws.iam.RolePolicyAttachment; import com.pulumi.aws.iam.RolePolicyAttachmentArgs; import com.pulumi.aws.lambda.Function; import com.pulumi.aws.lambda.FunctionArgs; import com.pulumi.resources.CustomResourceOptions; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.io.File; import java.nio.file.Files; import java.nio.file.Paths; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { final var config = ctx.config(); final var lambdaFunctionName = config.get("lambdaFunctionName").orElse("lambda_function_name"); var example = new LogGroup("example", LogGroupArgs.builder() .retentionInDays(14) .build()); final var lambdaLoggingPolicyDocument = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder() .statements(GetPolicyDocumentStatementArgs.builder() .effect("Allow") .actions( "logs:CreateLogGroup", "logs:CreateLogStream", "logs:PutLogEvents") .resources("arn:aws:logs:*:*:*") .build()) .build()); var lambdaLoggingPolicy = new Policy("lambdaLoggingPolicy", PolicyArgs.builder() .path("/") .description("IAM policy for logging from a lambda") .policy(lambdaLoggingPolicyDocument.applyValue(getPolicyDocumentResult -> getPolicyDocumentResult.json())) .build()); var lambdaLogs = new RolePolicyAttachment("lambdaLogs", RolePolicyAttachmentArgs.builder() .role(aws_iam_role.iam_for_lambda().name()) .policyArn(lambdaLoggingPolicy.arn()) .build()); var testLambda = new Function("testLambda", FunctionArgs.Empty, CustomResourceOptions.builder() .dependsOn( lambdaLogs, example) .build()); } } ``` ## Specifying the Deployment Package AWS Lambda expects source code to be provided as a deployment package whose structure varies depending on which `runtime` is in use. See [Runtimes](https://docs.aws.amazon.com/lambda/latest/dg/API_CreateFunction.html#SSS-CreateFunction-request-Runtime) for the valid values of `runtime`. The expected structure of the deployment package can be found in [the AWS Lambda documentation for each runtime](https://docs.aws.amazon.com/lambda/latest/dg/deployment-package-v2.html). Once you have created your deployment package you can specify it either directly as a local file (using the `filename` argument) or indirectly via Amazon S3 (using the `s3_bucket`, `s3_key` and `s3_object_version` arguments). When providing the deployment package via S3 it may be useful to use the `aws.s3.BucketObjectv2` resource to upload it. For larger deployment packages it is recommended by Amazon to upload via S3, since the S3 API has better support for uploading large files efficiently. ## Import Using `pulumi import`, import Lambda Functions using the `function_name`. For example: ```sh $ pulumi import aws:lambda/function:Function test_lambda my_test_lambda_function ```
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.pulumi.resources.CustomResource

        com.pulumi.resources.CustomResource.CustomResourceInternal
      • Nested classes/interfaces inherited from class com.pulumi.resources.Resource

        com.pulumi.resources.Resource.LazyField<T extends java.lang.Object>, com.pulumi.resources.Resource.LazyFields, com.pulumi.resources.Resource.ResourceInternal
    • Field Summary

      • Fields inherited from class com.pulumi.resources.Resource

        childResources, remote
    • Constructor Summary

      Constructors 
      Constructor Description
      Function​(java.lang.String name)  
      Function​(java.lang.String name, FunctionArgs args)  
      Function​(java.lang.String name, FunctionArgs args, com.pulumi.resources.CustomResourceOptions options)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.pulumi.core.Output<java.util.List<java.lang.String>> architectures()  
      com.pulumi.core.Output<java.lang.String> arn()  
      com.pulumi.core.Output<java.util.Optional<com.pulumi.asset.Archive>> code()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> codeSigningConfigArn()  
      com.pulumi.core.Output<java.util.Optional<FunctionDeadLetterConfig>> deadLetterConfig()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> description()  
      com.pulumi.core.Output<java.util.Optional<FunctionEnvironment>> environment()  
      com.pulumi.core.Output<FunctionEphemeralStorage> ephemeralStorage()  
      com.pulumi.core.Output<java.util.Optional<FunctionFileSystemConfig>> fileSystemConfig()  
      static Function get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, FunctionState state, com.pulumi.resources.CustomResourceOptions options)
      Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> handler()  
      com.pulumi.core.Output<java.util.Optional<FunctionImageConfig>> imageConfig()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> imageUri()  
      com.pulumi.core.Output<java.lang.String> invokeArn()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> kmsKeyArn()  
      com.pulumi.core.Output<java.lang.String> lastModified()  
      com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>> layers()  
      com.pulumi.core.Output<java.util.Optional<java.lang.Integer>> memorySize()  
      com.pulumi.core.Output<java.lang.String> name()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> packageType()  
      com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> publish()  
      com.pulumi.core.Output<java.lang.String> qualifiedArn()  
      com.pulumi.core.Output<java.lang.String> qualifiedInvokeArn()  
      com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>> replacementSecurityGroupIds()  
      com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> replaceSecurityGroupsOnDestroy()  
      com.pulumi.core.Output<java.util.Optional<java.lang.Integer>> reservedConcurrentExecutions()  
      com.pulumi.core.Output<java.lang.String> role()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> runtime()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> s3Bucket()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> s3Key()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> s3ObjectVersion()  
      com.pulumi.core.Output<java.lang.String> signingJobArn()  
      com.pulumi.core.Output<java.lang.String> signingProfileVersionArn()  
      com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> skipDestroy()  
      com.pulumi.core.Output<java.util.Optional<FunctionSnapStart>> snapStart()  
      com.pulumi.core.Output<java.lang.String> sourceCodeHash()  
      com.pulumi.core.Output<java.lang.Integer> sourceCodeSize()  
      com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,​java.lang.String>>> tags()  
      com.pulumi.core.Output<java.util.Map<java.lang.String,​java.lang.String>> tagsAll()  
      com.pulumi.core.Output<java.util.Optional<java.lang.Integer>> timeout()  
      com.pulumi.core.Output<FunctionTracingConfig> tracingConfig()  
      com.pulumi.core.Output<java.lang.String> version()  
      com.pulumi.core.Output<java.util.Optional<FunctionVpcConfig>> vpcConfig()  
      • Methods inherited from class com.pulumi.resources.CustomResource

        getId, id, idFuture
      • Methods inherited from class com.pulumi.resources.Resource

        getChildResources, getResourceName, getResourceType, getUrn, pulumiChildResources, pulumiResourceName, pulumiResourceType, urn
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Function

        public Function​(java.lang.String name)
        Parameters:
        name - The _unique_ name of the resulting resource.
      • Function

        public Function​(java.lang.String name,
                        FunctionArgs args)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
      • Function

        public Function​(java.lang.String name,
                        FunctionArgs args,
                        @Nullable
                        com.pulumi.resources.CustomResourceOptions options)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
        options - A bag of options that control this resource's behavior.
    • Method Detail

      • architectures

        public com.pulumi.core.Output<java.util.List<java.lang.String>> architectures()
        Returns:
        Instruction set architecture for your Lambda function. Valid values are `["x86_64"]` and `["arm64"]`. Default is `["x86_64"]`. Removing this attribute, function's architecture stay the same.
      • arn

        public com.pulumi.core.Output<java.lang.String> arn()
        Returns:
        Amazon Resource Name (ARN) of the Amazon EFS Access Point that provides access to the file system.
      • code

        public com.pulumi.core.Output<java.util.Optional<com.pulumi.asset.Archive>> code()
        Returns:
        Path to the function's deployment package within the local filesystem. Exactly one of `filename`, `image_uri`, or `s3_bucket` must be specified.
      • codeSigningConfigArn

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> codeSigningConfigArn()
        Returns:
        To enable code signing for this function, specify the ARN of a code-signing configuration. A code-signing configuration includes a set of signing profiles, which define the trusted publishers for this function.
      • deadLetterConfig

        public com.pulumi.core.Output<java.util.Optional<FunctionDeadLetterConfig>> deadLetterConfig()
        Returns:
        Configuration block. Detailed below.
      • description

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> description()
        Returns:
        Description of what your Lambda Function does.
      • environment

        public com.pulumi.core.Output<java.util.Optional<FunctionEnvironment>> environment()
        Returns:
        Configuration block. Detailed below.
      • ephemeralStorage

        public com.pulumi.core.Output<FunctionEphemeralStorage> ephemeralStorage()
        Returns:
        The amount of Ephemeral storage(`/tmp`) to allocate for the Lambda Function in MB. This parameter is used to expand the total amount of Ephemeral storage available, beyond the default amount of `512`MB. Detailed below.
      • fileSystemConfig

        public com.pulumi.core.Output<java.util.Optional<FunctionFileSystemConfig>> fileSystemConfig()
        Returns:
        Configuration block. Detailed below.
      • handler

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> handler()
        Returns:
        Function [entrypoint](https://docs.aws.amazon.com/lambda/latest/dg/walkthrough-custom-events-create-test-function.html) in your code.
      • imageConfig

        public com.pulumi.core.Output<java.util.Optional<FunctionImageConfig>> imageConfig()
        Returns:
        Configuration block. Detailed below.
      • imageUri

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> imageUri()
        Returns:
        ECR image URI containing the function's deployment package. Exactly one of `filename`, `image_uri`, or `s3_bucket` must be specified.
      • invokeArn

        public com.pulumi.core.Output<java.lang.String> invokeArn()
        Returns:
        ARN to be used for invoking Lambda Function from API Gateway - to be used in `aws.apigateway.Integration`'s `uri`.
      • kmsKeyArn

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> kmsKeyArn()
        Returns:
        Amazon Resource Name (ARN) of the AWS Key Management Service (KMS) key that is used to encrypt environment variables. If this configuration is not provided when environment variables are in use, AWS Lambda uses a default service key. If this configuration is provided when environment variables are not in use, the AWS Lambda API does not save this configuration and the provider will show a perpetual difference of adding the key. To fix the perpetual difference, remove this configuration.
      • lastModified

        public com.pulumi.core.Output<java.lang.String> lastModified()
        Returns:
        Date this resource was last modified.
      • layers

        public com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>> layers()
        Returns:
        List of Lambda Layer Version ARNs (maximum of 5) to attach to your Lambda Function. See [Lambda Layers](https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html)
      • memorySize

        public com.pulumi.core.Output<java.util.Optional<java.lang.Integer>> memorySize()
        Returns:
        Amount of memory in MB your Lambda Function can use at runtime. Defaults to `128`. See [Limits](https://docs.aws.amazon.com/lambda/latest/dg/limits.html)
      • name

        public com.pulumi.core.Output<java.lang.String> name()
        Returns:
        Unique name for your Lambda Function.
      • packageType

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> packageType()
        Returns:
        Lambda deployment package type. Valid values are `Zip` and `Image`. Defaults to `Zip`.
      • publish

        public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> publish()
        Returns:
        Whether to publish creation/change as new Lambda Function Version. Defaults to `false`.
      • qualifiedArn

        public com.pulumi.core.Output<java.lang.String> qualifiedArn()
        Returns:
        ARN identifying your Lambda Function Version (if versioning is enabled via `publish = true`).
      • qualifiedInvokeArn

        public com.pulumi.core.Output<java.lang.String> qualifiedInvokeArn()
        Returns:
        Qualified ARN (ARN with lambda version number) to be used for invoking Lambda Function from API Gateway - to be used in `aws.apigateway.Integration`'s `uri`.
      • replaceSecurityGroupsOnDestroy

        public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> replaceSecurityGroupsOnDestroy()
        Returns:
        **AWS no longer supports this operation. This attribute now has no effect and will be removed in a future major version.** Whether to replace the security groups on associated lambda network interfaces upon destruction. Removing these security groups from orphaned network interfaces can speed up security group deletion times by avoiding a dependency on AWS's internal cleanup operations. By default, the ENI security groups will be replaced with the `default` security group in the function's VPC. Set the `replacement_security_group_ids` attribute to use a custom list of security groups for replacement.
      • replacementSecurityGroupIds

        public com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>> replacementSecurityGroupIds()
        Returns:
        List of security group IDs to assign to orphaned Lambda function network interfaces upon destruction. `replace_security_groups_on_destroy` must be set to `true` to use this attribute.
      • reservedConcurrentExecutions

        public com.pulumi.core.Output<java.util.Optional<java.lang.Integer>> reservedConcurrentExecutions()
        Returns:
        Amount of reserved concurrent executions for this lambda function. A value of `0` disables lambda from being triggered and `-1` removes any concurrency limitations. Defaults to Unreserved Concurrency Limits `-1`. See [Managing Concurrency](https://docs.aws.amazon.com/lambda/latest/dg/concurrent-executions.html)
      • role

        public com.pulumi.core.Output<java.lang.String> role()
        Returns:
        Amazon Resource Name (ARN) of the function's execution role. The role provides the function's identity and access to AWS services and resources. The following arguments are optional:
      • runtime

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> runtime()
        Returns:
        Identifier of the function's runtime. See [Runtimes](https://docs.aws.amazon.com/lambda/latest/dg/API_CreateFunction.html#SSS-CreateFunction-request-Runtime) for valid values.
      • s3Bucket

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> s3Bucket()
        Returns:
        S3 bucket location containing the function's deployment package. This bucket must reside in the same AWS region where you are creating the Lambda function. Exactly one of `filename`, `image_uri`, or `s3_bucket` must be specified. When `s3_bucket` is set, `s3_key` is required.
      • s3Key

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> s3Key()
        Returns:
        S3 key of an object containing the function's deployment package. When `s3_bucket` is set, `s3_key` is required.
      • s3ObjectVersion

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> s3ObjectVersion()
        Returns:
        Object version containing the function's deployment package. Conflicts with `filename` and `image_uri`.
      • signingJobArn

        public com.pulumi.core.Output<java.lang.String> signingJobArn()
        Returns:
        ARN of the signing job.
      • signingProfileVersionArn

        public com.pulumi.core.Output<java.lang.String> signingProfileVersionArn()
        Returns:
        ARN of the signing profile version. * `snap_start.optimization_status` - Optimization status of the snap start configuration. Valid values are `On` and `Off`.
      • skipDestroy

        public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> skipDestroy()
        Returns:
        Set to true if you do not wish the function to be deleted at destroy time, and instead just remove the function from the Pulumi state.
      • snapStart

        public com.pulumi.core.Output<java.util.Optional<FunctionSnapStart>> snapStart()
        Returns:
        Snap start settings block. Detailed below.
      • sourceCodeHash

        public com.pulumi.core.Output<java.lang.String> sourceCodeHash()
        Returns:
        Used to trigger updates. Must be set to a base64-encoded SHA256 hash of the package file specified with either `filename` or `s3_key`.
      • sourceCodeSize

        public com.pulumi.core.Output<java.lang.Integer> sourceCodeSize()
        Returns:
        Size in bytes of the function .zip file.
      • tags

        public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,​java.lang.String>>> tags()
        Returns:
        Map of tags to assign to the object. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
      • tagsAll

        public com.pulumi.core.Output<java.util.Map<java.lang.String,​java.lang.String>> tagsAll()
        Returns:
        A map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block.
      • timeout

        public com.pulumi.core.Output<java.util.Optional<java.lang.Integer>> timeout()
        Returns:
        Amount of time your Lambda Function has to run in seconds. Defaults to `3`. See [Limits](https://docs.aws.amazon.com/lambda/latest/dg/limits.html).
      • tracingConfig

        public com.pulumi.core.Output<FunctionTracingConfig> tracingConfig()
        Returns:
        Configuration block. Detailed below.
      • version

        public com.pulumi.core.Output<java.lang.String> version()
        Returns:
        Latest published version of your Lambda Function. * `vpc_config.vpc_id` - ID of the VPC.
      • vpcConfig

        public com.pulumi.core.Output<java.util.Optional<FunctionVpcConfig>> vpcConfig()
        Returns:
        Configuration block. Detailed below.
      • get

        public static Function get​(java.lang.String name,
                                   com.pulumi.core.Output<java.lang.String> id,
                                   @Nullable
                                   FunctionState state,
                                   @Nullable
                                   com.pulumi.resources.CustomResourceOptions options)
        Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
        Parameters:
        name - The _unique_ name of the resulting resource.
        id - The _unique_ provider ID of the resource to lookup.
        state -
        options - Optional settings to control the behavior of the CustomResource.