github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/lambda/function.go (about)

     1  // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
     2  // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
     3  
     4  package lambda
     5  
     6  import (
     7  	"context"
     8  	"reflect"
     9  
    10  	"errors"
    11  	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal"
    12  	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    13  )
    14  
    15  // 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.
    16  //
    17  // For information about Lambda and how to use it, see [What is AWS Lambda?](https://docs.aws.amazon.com/lambda/latest/dg/welcome.html)
    18  //
    19  // > **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.
    20  //
    21  // > **NOTE:** If you get a `KMSAccessDeniedException: Lambda was unable to decrypt the environment variables because KMS access was denied` error when invoking an `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.)
    22  //
    23  // > To give an external source (like an EventBridge Rule, SNS, or S3) permission to access the Lambda function, use the `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.
    24  //
    25  // ## Example Usage
    26  //
    27  // ### Basic Example
    28  //
    29  // <!--Start PulumiCodeChooser -->
    30  // ```go
    31  // package main
    32  //
    33  // import (
    34  //
    35  //	"github.com/pulumi/pulumi-archive/sdk/go/archive"
    36  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam"
    37  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lambda"
    38  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    39  //
    40  // )
    41  //
    42  //	func main() {
    43  //		pulumi.Run(func(ctx *pulumi.Context) error {
    44  //			assumeRole, err := iam.GetPolicyDocument(ctx, &iam.GetPolicyDocumentArgs{
    45  //				Statements: []iam.GetPolicyDocumentStatement{
    46  //					{
    47  //						Effect: pulumi.StringRef("Allow"),
    48  //						Principals: []iam.GetPolicyDocumentStatementPrincipal{
    49  //							{
    50  //								Type: "Service",
    51  //								Identifiers: []string{
    52  //									"lambda.amazonaws.com",
    53  //								},
    54  //							},
    55  //						},
    56  //						Actions: []string{
    57  //							"sts:AssumeRole",
    58  //						},
    59  //					},
    60  //				},
    61  //			}, nil)
    62  //			if err != nil {
    63  //				return err
    64  //			}
    65  //			iamForLambda, err := iam.NewRole(ctx, "iam_for_lambda", &iam.RoleArgs{
    66  //				Name:             pulumi.String("iam_for_lambda"),
    67  //				AssumeRolePolicy: pulumi.String(assumeRole.Json),
    68  //			})
    69  //			if err != nil {
    70  //				return err
    71  //			}
    72  //			lambda, err := archive.LookupFile(ctx, &archive.LookupFileArgs{
    73  //				Type:       "zip",
    74  //				SourceFile: pulumi.StringRef("lambda.js"),
    75  //				OutputPath: "lambda_function_payload.zip",
    76  //			}, nil)
    77  //			if err != nil {
    78  //				return err
    79  //			}
    80  //			_, err = lambda.NewFunction(ctx, "test_lambda", &lambda.FunctionArgs{
    81  //				Code:           pulumi.NewFileArchive("lambda_function_payload.zip"),
    82  //				Name:           pulumi.String("lambda_function_name"),
    83  //				Role:           iamForLambda.Arn,
    84  //				Handler:        pulumi.String("index.test"),
    85  //				SourceCodeHash: pulumi.String(lambda.OutputBase64sha256),
    86  //				Runtime:        pulumi.String(lambda.RuntimeNodeJS18dX),
    87  //				Environment: &lambda.FunctionEnvironmentArgs{
    88  //					Variables: pulumi.StringMap{
    89  //						"foo": pulumi.String("bar"),
    90  //					},
    91  //				},
    92  //			})
    93  //			if err != nil {
    94  //				return err
    95  //			}
    96  //			return nil
    97  //		})
    98  //	}
    99  //
   100  // ```
   101  // <!--End PulumiCodeChooser -->
   102  //
   103  // ### Lambda Layers
   104  //
   105  // <!--Start PulumiCodeChooser -->
   106  // ```go
   107  // package main
   108  //
   109  // import (
   110  //
   111  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lambda"
   112  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
   113  //
   114  // )
   115  //
   116  //	func main() {
   117  //		pulumi.Run(func(ctx *pulumi.Context) error {
   118  //			example, err := lambda.NewLayerVersion(ctx, "example", nil)
   119  //			if err != nil {
   120  //				return err
   121  //			}
   122  //			_, err = lambda.NewFunction(ctx, "example", &lambda.FunctionArgs{
   123  //				Layers: pulumi.StringArray{
   124  //					example.Arn,
   125  //				},
   126  //			})
   127  //			if err != nil {
   128  //				return err
   129  //			}
   130  //			return nil
   131  //		})
   132  //	}
   133  //
   134  // ```
   135  // <!--End PulumiCodeChooser -->
   136  //
   137  // ### Lambda Ephemeral Storage
   138  //
   139  // Lambda Function Ephemeral Storage(`/tmp`) allows you to configure the storage upto `10` GB. The default value set to `512` MB.
   140  //
   141  // <!--Start PulumiCodeChooser -->
   142  // ```go
   143  // package main
   144  //
   145  // import (
   146  //
   147  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam"
   148  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lambda"
   149  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
   150  //
   151  // )
   152  //
   153  //	func main() {
   154  //		pulumi.Run(func(ctx *pulumi.Context) error {
   155  //			assumeRole, err := iam.GetPolicyDocument(ctx, &iam.GetPolicyDocumentArgs{
   156  //				Statements: []iam.GetPolicyDocumentStatement{
   157  //					{
   158  //						Effect: pulumi.StringRef("Allow"),
   159  //						Principals: []iam.GetPolicyDocumentStatementPrincipal{
   160  //							{
   161  //								Type: "Service",
   162  //								Identifiers: []string{
   163  //									"lambda.amazonaws.com",
   164  //								},
   165  //							},
   166  //						},
   167  //						Actions: []string{
   168  //							"sts:AssumeRole",
   169  //						},
   170  //					},
   171  //				},
   172  //			}, nil)
   173  //			if err != nil {
   174  //				return err
   175  //			}
   176  //			iamForLambda, err := iam.NewRole(ctx, "iam_for_lambda", &iam.RoleArgs{
   177  //				Name:             pulumi.String("iam_for_lambda"),
   178  //				AssumeRolePolicy: pulumi.String(assumeRole.Json),
   179  //			})
   180  //			if err != nil {
   181  //				return err
   182  //			}
   183  //			_, err = lambda.NewFunction(ctx, "test_lambda", &lambda.FunctionArgs{
   184  //				Code:    pulumi.NewFileArchive("lambda_function_payload.zip"),
   185  //				Name:    pulumi.String("lambda_function_name"),
   186  //				Role:    iamForLambda.Arn,
   187  //				Handler: pulumi.String("index.test"),
   188  //				Runtime: pulumi.String(lambda.RuntimeNodeJS18dX),
   189  //				EphemeralStorage: &lambda.FunctionEphemeralStorageArgs{
   190  //					Size: pulumi.Int(10240),
   191  //				},
   192  //			})
   193  //			if err != nil {
   194  //				return err
   195  //			}
   196  //			return nil
   197  //		})
   198  //	}
   199  //
   200  // ```
   201  // <!--End PulumiCodeChooser -->
   202  //
   203  // ### Lambda File Systems
   204  //
   205  // 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.
   206  //
   207  // <!--Start PulumiCodeChooser -->
   208  // ```go
   209  // package main
   210  //
   211  // import (
   212  //
   213  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/efs"
   214  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lambda"
   215  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
   216  //
   217  // )
   218  //
   219  //	func main() {
   220  //		pulumi.Run(func(ctx *pulumi.Context) error {
   221  //			// EFS file system
   222  //			efsForLambda, err := efs.NewFileSystem(ctx, "efs_for_lambda", &efs.FileSystemArgs{
   223  //				Tags: pulumi.StringMap{
   224  //					"Name": pulumi.String("efs_for_lambda"),
   225  //				},
   226  //			})
   227  //			if err != nil {
   228  //				return err
   229  //			}
   230  //			// Mount target connects the file system to the subnet
   231  //			alpha, err := efs.NewMountTarget(ctx, "alpha", &efs.MountTargetArgs{
   232  //				FileSystemId: efsForLambda.ID(),
   233  //				SubnetId:     pulumi.Any(subnetForLambda.Id),
   234  //				SecurityGroups: pulumi.StringArray{
   235  //					sgForLambda.Id,
   236  //				},
   237  //			})
   238  //			if err != nil {
   239  //				return err
   240  //			}
   241  //			// EFS access point used by lambda file system
   242  //			accessPointForLambda, err := efs.NewAccessPoint(ctx, "access_point_for_lambda", &efs.AccessPointArgs{
   243  //				FileSystemId: efsForLambda.ID(),
   244  //				RootDirectory: &efs.AccessPointRootDirectoryArgs{
   245  //					Path: pulumi.String("/lambda"),
   246  //					CreationInfo: &efs.AccessPointRootDirectoryCreationInfoArgs{
   247  //						OwnerGid:    pulumi.Int(1000),
   248  //						OwnerUid:    pulumi.Int(1000),
   249  //						Permissions: pulumi.String("777"),
   250  //					},
   251  //				},
   252  //				PosixUser: &efs.AccessPointPosixUserArgs{
   253  //					Gid: pulumi.Int(1000),
   254  //					Uid: pulumi.Int(1000),
   255  //				},
   256  //			})
   257  //			if err != nil {
   258  //				return err
   259  //			}
   260  //			// A lambda function connected to an EFS file system
   261  //			_, err = lambda.NewFunction(ctx, "example", &lambda.FunctionArgs{
   262  //				FileSystemConfig: &lambda.FunctionFileSystemConfigArgs{
   263  //					Arn:            accessPointForLambda.Arn,
   264  //					LocalMountPath: pulumi.String("/mnt/efs"),
   265  //				},
   266  //				VpcConfig: &lambda.FunctionVpcConfigArgs{
   267  //					SubnetIds: pulumi.StringArray{
   268  //						subnetForLambda.Id,
   269  //					},
   270  //					SecurityGroupIds: pulumi.StringArray{
   271  //						sgForLambda.Id,
   272  //					},
   273  //				},
   274  //			}, pulumi.DependsOn([]pulumi.Resource{
   275  //				alpha,
   276  //			}))
   277  //			if err != nil {
   278  //				return err
   279  //			}
   280  //			return nil
   281  //		})
   282  //	}
   283  //
   284  // ```
   285  // <!--End PulumiCodeChooser -->
   286  //
   287  // ### Lambda retries
   288  //
   289  // 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 lambda.FunctionEventInvokeConfig resource.
   290  //
   291  // ## CloudWatch Logging and Permissions
   292  //
   293  // 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).
   294  //
   295  // <!--Start PulumiCodeChooser -->
   296  // ```go
   297  // package main
   298  //
   299  // import (
   300  //
   301  //	"fmt"
   302  //
   303  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudwatch"
   304  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam"
   305  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lambda"
   306  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
   307  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
   308  //
   309  // )
   310  //
   311  //	func main() {
   312  //		pulumi.Run(func(ctx *pulumi.Context) error {
   313  //			cfg := config.New(ctx, "")
   314  //			lambdaFunctionName := "lambda_function_name"
   315  //			if param := cfg.Get("lambdaFunctionName"); param != "" {
   316  //				lambdaFunctionName = param
   317  //			}
   318  //			// This is to optionally manage the CloudWatch Log Group for the Lambda Function.
   319  //			// If skipping this resource configuration, also add "logs:CreateLogGroup" to the IAM policy below.
   320  //			example, err := cloudwatch.NewLogGroup(ctx, "example", &cloudwatch.LogGroupArgs{
   321  //				Name:            pulumi.String(fmt.Sprintf("/aws/lambda/%v", lambdaFunctionName)),
   322  //				RetentionInDays: pulumi.Int(14),
   323  //			})
   324  //			if err != nil {
   325  //				return err
   326  //			}
   327  //			// See also the following AWS managed policy: AWSLambdaBasicExecutionRole
   328  //			lambdaLogging, err := iam.GetPolicyDocument(ctx, &iam.GetPolicyDocumentArgs{
   329  //				Statements: []iam.GetPolicyDocumentStatement{
   330  //					{
   331  //						Effect: pulumi.StringRef("Allow"),
   332  //						Actions: []string{
   333  //							"logs:CreateLogGroup",
   334  //							"logs:CreateLogStream",
   335  //							"logs:PutLogEvents",
   336  //						},
   337  //						Resources: []string{
   338  //							"arn:aws:logs:*:*:*",
   339  //						},
   340  //					},
   341  //				},
   342  //			}, nil)
   343  //			if err != nil {
   344  //				return err
   345  //			}
   346  //			lambdaLoggingPolicy, err := iam.NewPolicy(ctx, "lambda_logging", &iam.PolicyArgs{
   347  //				Name:        pulumi.String("lambda_logging"),
   348  //				Path:        pulumi.String("/"),
   349  //				Description: pulumi.String("IAM policy for logging from a lambda"),
   350  //				Policy:      pulumi.String(lambdaLogging.Json),
   351  //			})
   352  //			if err != nil {
   353  //				return err
   354  //			}
   355  //			lambdaLogs, err := iam.NewRolePolicyAttachment(ctx, "lambda_logs", &iam.RolePolicyAttachmentArgs{
   356  //				Role:      pulumi.Any(iamForLambda.Name),
   357  //				PolicyArn: lambdaLoggingPolicy.Arn,
   358  //			})
   359  //			if err != nil {
   360  //				return err
   361  //			}
   362  //			_, err = lambda.NewFunction(ctx, "test_lambda", &lambda.FunctionArgs{
   363  //				Name: pulumi.String(lambdaFunctionName),
   364  //				LoggingConfig: &lambda.FunctionLoggingConfigArgs{
   365  //					LogFormat: pulumi.String("Text"),
   366  //				},
   367  //			}, pulumi.DependsOn([]pulumi.Resource{
   368  //				lambdaLogs,
   369  //				example,
   370  //			}))
   371  //			if err != nil {
   372  //				return err
   373  //			}
   374  //			return nil
   375  //		})
   376  //	}
   377  //
   378  // ```
   379  // <!--End PulumiCodeChooser -->
   380  //
   381  // ## Specifying the Deployment Package
   382  //
   383  // 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).
   384  //
   385  // 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 `s3Bucket`, `s3Key` and `s3ObjectVersion` arguments). When providing the deployment package via S3 it may be useful to use the `s3.BucketObjectv2` resource to upload it.
   386  //
   387  // 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.
   388  //
   389  // ## Import
   390  //
   391  // Using `pulumi import`, import Lambda Functions using the `function_name`. For example:
   392  //
   393  // ```sh
   394  // $ pulumi import aws:lambda/function:Function test_lambda my_test_lambda_function
   395  // ```
   396  type Function struct {
   397  	pulumi.CustomResourceState
   398  
   399  	// Instruction set architecture for your Lambda function. Valid values are `["x8664"]` and `["arm64"]`. Default is `["x8664"]`. Removing this attribute, function's architecture stay the same.
   400  	Architectures pulumi.StringArrayOutput `pulumi:"architectures"`
   401  	// Amazon Resource Name (ARN) of the Amazon EFS Access Point that provides access to the file system.
   402  	Arn pulumi.StringOutput `pulumi:"arn"`
   403  	// Path to the function's deployment package within the local filesystem. Exactly one of `filename`, `imageUri`, or `s3Bucket` must be specified.
   404  	Code pulumi.ArchiveOutput `pulumi:"code"`
   405  	// 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.
   406  	CodeSigningConfigArn pulumi.StringPtrOutput `pulumi:"codeSigningConfigArn"`
   407  	// Configuration block. Detailed below.
   408  	DeadLetterConfig FunctionDeadLetterConfigPtrOutput `pulumi:"deadLetterConfig"`
   409  	// Description of what your Lambda Function does.
   410  	Description pulumi.StringPtrOutput `pulumi:"description"`
   411  	// Configuration block. Detailed below.
   412  	Environment FunctionEnvironmentPtrOutput `pulumi:"environment"`
   413  	// 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.
   414  	EphemeralStorage FunctionEphemeralStorageOutput `pulumi:"ephemeralStorage"`
   415  	// Configuration block. Detailed below.
   416  	FileSystemConfig FunctionFileSystemConfigPtrOutput `pulumi:"fileSystemConfig"`
   417  	// Function [entrypoint](https://docs.aws.amazon.com/lambda/latest/dg/walkthrough-custom-events-create-test-function.html) in your code.
   418  	Handler pulumi.StringPtrOutput `pulumi:"handler"`
   419  	// Configuration block. Detailed below.
   420  	ImageConfig FunctionImageConfigPtrOutput `pulumi:"imageConfig"`
   421  	// ECR image URI containing the function's deployment package. Exactly one of `filename`, `imageUri`,  or `s3Bucket` must be specified.
   422  	ImageUri pulumi.StringPtrOutput `pulumi:"imageUri"`
   423  	// ARN to be used for invoking Lambda Function from API Gateway - to be used in `apigateway.Integration`'s `uri`.
   424  	InvokeArn pulumi.StringOutput `pulumi:"invokeArn"`
   425  	// 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.
   426  	KmsKeyArn pulumi.StringPtrOutput `pulumi:"kmsKeyArn"`
   427  	// Date this resource was last modified.
   428  	LastModified pulumi.StringOutput `pulumi:"lastModified"`
   429  	// 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)
   430  	Layers pulumi.StringArrayOutput `pulumi:"layers"`
   431  	// Configuration block used to specify advanced logging settings. Detailed below.
   432  	LoggingConfig FunctionLoggingConfigOutput `pulumi:"loggingConfig"`
   433  	// 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)
   434  	MemorySize pulumi.IntPtrOutput `pulumi:"memorySize"`
   435  	// Unique name for your Lambda Function.
   436  	Name pulumi.StringOutput `pulumi:"name"`
   437  	// Lambda deployment package type. Valid values are `Zip` and `Image`. Defaults to `Zip`.
   438  	PackageType pulumi.StringPtrOutput `pulumi:"packageType"`
   439  	// Whether to publish creation/change as new Lambda Function Version. Defaults to `false`.
   440  	Publish pulumi.BoolPtrOutput `pulumi:"publish"`
   441  	// ARN identifying your Lambda Function Version (if versioning is enabled via `publish = true`).
   442  	QualifiedArn pulumi.StringOutput `pulumi:"qualifiedArn"`
   443  	// Qualified ARN (ARN with lambda version number) to be used for invoking Lambda Function from API Gateway - to be used in `apigateway.Integration`'s `uri`.
   444  	QualifiedInvokeArn pulumi.StringOutput `pulumi:"qualifiedInvokeArn"`
   445  	// **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 `replacementSecurityGroupIds` attribute to use a custom list of security groups for replacement.
   446  	//
   447  	// Deprecated: AWS no longer supports this operation. This attribute now has no effect and will be removed in a future major version.
   448  	ReplaceSecurityGroupsOnDestroy pulumi.BoolPtrOutput `pulumi:"replaceSecurityGroupsOnDestroy"`
   449  	// List of security group IDs to assign to orphaned Lambda function network interfaces upon destruction. `replaceSecurityGroupsOnDestroy` must be set to `true` to use this attribute.
   450  	//
   451  	// Deprecated: AWS no longer supports this operation. This attribute now has no effect and will be removed in a future major version.
   452  	ReplacementSecurityGroupIds pulumi.StringArrayOutput `pulumi:"replacementSecurityGroupIds"`
   453  	// 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)
   454  	ReservedConcurrentExecutions pulumi.IntPtrOutput `pulumi:"reservedConcurrentExecutions"`
   455  	// Amazon Resource Name (ARN) of the function's execution role. The role provides the function's identity and access to AWS services and resources.
   456  	//
   457  	// The following arguments are optional:
   458  	Role pulumi.StringOutput `pulumi:"role"`
   459  	// 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.
   460  	Runtime pulumi.StringPtrOutput `pulumi:"runtime"`
   461  	// 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`, `imageUri`, or `s3Bucket` must be specified. When `s3Bucket` is set, `s3Key` is required.
   462  	S3Bucket pulumi.StringPtrOutput `pulumi:"s3Bucket"`
   463  	// S3 key of an object containing the function's deployment package. When `s3Bucket` is set, `s3Key` is required.
   464  	S3Key pulumi.StringPtrOutput `pulumi:"s3Key"`
   465  	// Object version containing the function's deployment package. Conflicts with `filename` and `imageUri`.
   466  	S3ObjectVersion pulumi.StringPtrOutput `pulumi:"s3ObjectVersion"`
   467  	// ARN of the signing job.
   468  	SigningJobArn pulumi.StringOutput `pulumi:"signingJobArn"`
   469  	// ARN of the signing profile version.
   470  	SigningProfileVersionArn pulumi.StringOutput `pulumi:"signingProfileVersionArn"`
   471  	// 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.
   472  	SkipDestroy pulumi.BoolPtrOutput `pulumi:"skipDestroy"`
   473  	// Snap start settings block. Detailed below.
   474  	SnapStart FunctionSnapStartPtrOutput `pulumi:"snapStart"`
   475  	// Used to trigger updates. Must be set to a base64-encoded SHA256 hash of the package file specified with either `filename` or `s3Key`.
   476  	SourceCodeHash pulumi.StringOutput `pulumi:"sourceCodeHash"`
   477  	// Size in bytes of the function .zip file.
   478  	SourceCodeSize pulumi.IntOutput `pulumi:"sourceCodeSize"`
   479  	// Map of tags to assign to the object. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   480  	Tags pulumi.StringMapOutput `pulumi:"tags"`
   481  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   482  	//
   483  	// Deprecated: Please use `tags` instead.
   484  	TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
   485  	// 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).
   486  	Timeout pulumi.IntPtrOutput `pulumi:"timeout"`
   487  	// Configuration block. Detailed below.
   488  	TracingConfig FunctionTracingConfigOutput `pulumi:"tracingConfig"`
   489  	// Latest published version of your Lambda Function.
   490  	Version pulumi.StringOutput `pulumi:"version"`
   491  	// Configuration block. Detailed below.
   492  	VpcConfig FunctionVpcConfigPtrOutput `pulumi:"vpcConfig"`
   493  }
   494  
   495  // NewFunction registers a new resource with the given unique name, arguments, and options.
   496  func NewFunction(ctx *pulumi.Context,
   497  	name string, args *FunctionArgs, opts ...pulumi.ResourceOption) (*Function, error) {
   498  	if args == nil {
   499  		return nil, errors.New("missing one or more required arguments")
   500  	}
   501  
   502  	if args.Role == nil {
   503  		return nil, errors.New("invalid value for required argument 'Role'")
   504  	}
   505  	opts = internal.PkgResourceDefaultOpts(opts)
   506  	var resource Function
   507  	err := ctx.RegisterResource("aws:lambda/function:Function", name, args, &resource, opts...)
   508  	if err != nil {
   509  		return nil, err
   510  	}
   511  	return &resource, nil
   512  }
   513  
   514  // GetFunction gets an existing Function resource's state with the given name, ID, and optional
   515  // state properties that are used to uniquely qualify the lookup (nil if not required).
   516  func GetFunction(ctx *pulumi.Context,
   517  	name string, id pulumi.IDInput, state *FunctionState, opts ...pulumi.ResourceOption) (*Function, error) {
   518  	var resource Function
   519  	err := ctx.ReadResource("aws:lambda/function:Function", name, id, state, &resource, opts...)
   520  	if err != nil {
   521  		return nil, err
   522  	}
   523  	return &resource, nil
   524  }
   525  
   526  // Input properties used for looking up and filtering Function resources.
   527  type functionState struct {
   528  	// Instruction set architecture for your Lambda function. Valid values are `["x8664"]` and `["arm64"]`. Default is `["x8664"]`. Removing this attribute, function's architecture stay the same.
   529  	Architectures []string `pulumi:"architectures"`
   530  	// Amazon Resource Name (ARN) of the Amazon EFS Access Point that provides access to the file system.
   531  	Arn *string `pulumi:"arn"`
   532  	// Path to the function's deployment package within the local filesystem. Exactly one of `filename`, `imageUri`, or `s3Bucket` must be specified.
   533  	Code pulumi.Archive `pulumi:"code"`
   534  	// 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.
   535  	CodeSigningConfigArn *string `pulumi:"codeSigningConfigArn"`
   536  	// Configuration block. Detailed below.
   537  	DeadLetterConfig *FunctionDeadLetterConfig `pulumi:"deadLetterConfig"`
   538  	// Description of what your Lambda Function does.
   539  	Description *string `pulumi:"description"`
   540  	// Configuration block. Detailed below.
   541  	Environment *FunctionEnvironment `pulumi:"environment"`
   542  	// 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.
   543  	EphemeralStorage *FunctionEphemeralStorage `pulumi:"ephemeralStorage"`
   544  	// Configuration block. Detailed below.
   545  	FileSystemConfig *FunctionFileSystemConfig `pulumi:"fileSystemConfig"`
   546  	// Function [entrypoint](https://docs.aws.amazon.com/lambda/latest/dg/walkthrough-custom-events-create-test-function.html) in your code.
   547  	Handler *string `pulumi:"handler"`
   548  	// Configuration block. Detailed below.
   549  	ImageConfig *FunctionImageConfig `pulumi:"imageConfig"`
   550  	// ECR image URI containing the function's deployment package. Exactly one of `filename`, `imageUri`,  or `s3Bucket` must be specified.
   551  	ImageUri *string `pulumi:"imageUri"`
   552  	// ARN to be used for invoking Lambda Function from API Gateway - to be used in `apigateway.Integration`'s `uri`.
   553  	InvokeArn *string `pulumi:"invokeArn"`
   554  	// 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.
   555  	KmsKeyArn *string `pulumi:"kmsKeyArn"`
   556  	// Date this resource was last modified.
   557  	LastModified *string `pulumi:"lastModified"`
   558  	// 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)
   559  	Layers []string `pulumi:"layers"`
   560  	// Configuration block used to specify advanced logging settings. Detailed below.
   561  	LoggingConfig *FunctionLoggingConfig `pulumi:"loggingConfig"`
   562  	// 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)
   563  	MemorySize *int `pulumi:"memorySize"`
   564  	// Unique name for your Lambda Function.
   565  	Name *string `pulumi:"name"`
   566  	// Lambda deployment package type. Valid values are `Zip` and `Image`. Defaults to `Zip`.
   567  	PackageType *string `pulumi:"packageType"`
   568  	// Whether to publish creation/change as new Lambda Function Version. Defaults to `false`.
   569  	Publish *bool `pulumi:"publish"`
   570  	// ARN identifying your Lambda Function Version (if versioning is enabled via `publish = true`).
   571  	QualifiedArn *string `pulumi:"qualifiedArn"`
   572  	// Qualified ARN (ARN with lambda version number) to be used for invoking Lambda Function from API Gateway - to be used in `apigateway.Integration`'s `uri`.
   573  	QualifiedInvokeArn *string `pulumi:"qualifiedInvokeArn"`
   574  	// **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 `replacementSecurityGroupIds` attribute to use a custom list of security groups for replacement.
   575  	//
   576  	// Deprecated: AWS no longer supports this operation. This attribute now has no effect and will be removed in a future major version.
   577  	ReplaceSecurityGroupsOnDestroy *bool `pulumi:"replaceSecurityGroupsOnDestroy"`
   578  	// List of security group IDs to assign to orphaned Lambda function network interfaces upon destruction. `replaceSecurityGroupsOnDestroy` must be set to `true` to use this attribute.
   579  	//
   580  	// Deprecated: AWS no longer supports this operation. This attribute now has no effect and will be removed in a future major version.
   581  	ReplacementSecurityGroupIds []string `pulumi:"replacementSecurityGroupIds"`
   582  	// 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)
   583  	ReservedConcurrentExecutions *int `pulumi:"reservedConcurrentExecutions"`
   584  	// Amazon Resource Name (ARN) of the function's execution role. The role provides the function's identity and access to AWS services and resources.
   585  	//
   586  	// The following arguments are optional:
   587  	Role *string `pulumi:"role"`
   588  	// 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.
   589  	Runtime *string `pulumi:"runtime"`
   590  	// 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`, `imageUri`, or `s3Bucket` must be specified. When `s3Bucket` is set, `s3Key` is required.
   591  	S3Bucket *string `pulumi:"s3Bucket"`
   592  	// S3 key of an object containing the function's deployment package. When `s3Bucket` is set, `s3Key` is required.
   593  	S3Key *string `pulumi:"s3Key"`
   594  	// Object version containing the function's deployment package. Conflicts with `filename` and `imageUri`.
   595  	S3ObjectVersion *string `pulumi:"s3ObjectVersion"`
   596  	// ARN of the signing job.
   597  	SigningJobArn *string `pulumi:"signingJobArn"`
   598  	// ARN of the signing profile version.
   599  	SigningProfileVersionArn *string `pulumi:"signingProfileVersionArn"`
   600  	// 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.
   601  	SkipDestroy *bool `pulumi:"skipDestroy"`
   602  	// Snap start settings block. Detailed below.
   603  	SnapStart *FunctionSnapStart `pulumi:"snapStart"`
   604  	// Used to trigger updates. Must be set to a base64-encoded SHA256 hash of the package file specified with either `filename` or `s3Key`.
   605  	SourceCodeHash *string `pulumi:"sourceCodeHash"`
   606  	// Size in bytes of the function .zip file.
   607  	SourceCodeSize *int `pulumi:"sourceCodeSize"`
   608  	// Map of tags to assign to the object. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   609  	Tags map[string]string `pulumi:"tags"`
   610  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   611  	//
   612  	// Deprecated: Please use `tags` instead.
   613  	TagsAll map[string]string `pulumi:"tagsAll"`
   614  	// 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).
   615  	Timeout *int `pulumi:"timeout"`
   616  	// Configuration block. Detailed below.
   617  	TracingConfig *FunctionTracingConfig `pulumi:"tracingConfig"`
   618  	// Latest published version of your Lambda Function.
   619  	Version *string `pulumi:"version"`
   620  	// Configuration block. Detailed below.
   621  	VpcConfig *FunctionVpcConfig `pulumi:"vpcConfig"`
   622  }
   623  
   624  type FunctionState struct {
   625  	// Instruction set architecture for your Lambda function. Valid values are `["x8664"]` and `["arm64"]`. Default is `["x8664"]`. Removing this attribute, function's architecture stay the same.
   626  	Architectures pulumi.StringArrayInput
   627  	// Amazon Resource Name (ARN) of the Amazon EFS Access Point that provides access to the file system.
   628  	Arn pulumi.StringPtrInput
   629  	// Path to the function's deployment package within the local filesystem. Exactly one of `filename`, `imageUri`, or `s3Bucket` must be specified.
   630  	Code pulumi.ArchiveInput
   631  	// 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.
   632  	CodeSigningConfigArn pulumi.StringPtrInput
   633  	// Configuration block. Detailed below.
   634  	DeadLetterConfig FunctionDeadLetterConfigPtrInput
   635  	// Description of what your Lambda Function does.
   636  	Description pulumi.StringPtrInput
   637  	// Configuration block. Detailed below.
   638  	Environment FunctionEnvironmentPtrInput
   639  	// 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.
   640  	EphemeralStorage FunctionEphemeralStoragePtrInput
   641  	// Configuration block. Detailed below.
   642  	FileSystemConfig FunctionFileSystemConfigPtrInput
   643  	// Function [entrypoint](https://docs.aws.amazon.com/lambda/latest/dg/walkthrough-custom-events-create-test-function.html) in your code.
   644  	Handler pulumi.StringPtrInput
   645  	// Configuration block. Detailed below.
   646  	ImageConfig FunctionImageConfigPtrInput
   647  	// ECR image URI containing the function's deployment package. Exactly one of `filename`, `imageUri`,  or `s3Bucket` must be specified.
   648  	ImageUri pulumi.StringPtrInput
   649  	// ARN to be used for invoking Lambda Function from API Gateway - to be used in `apigateway.Integration`'s `uri`.
   650  	InvokeArn pulumi.StringPtrInput
   651  	// 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.
   652  	KmsKeyArn pulumi.StringPtrInput
   653  	// Date this resource was last modified.
   654  	LastModified pulumi.StringPtrInput
   655  	// 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)
   656  	Layers pulumi.StringArrayInput
   657  	// Configuration block used to specify advanced logging settings. Detailed below.
   658  	LoggingConfig FunctionLoggingConfigPtrInput
   659  	// 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)
   660  	MemorySize pulumi.IntPtrInput
   661  	// Unique name for your Lambda Function.
   662  	Name pulumi.StringPtrInput
   663  	// Lambda deployment package type. Valid values are `Zip` and `Image`. Defaults to `Zip`.
   664  	PackageType pulumi.StringPtrInput
   665  	// Whether to publish creation/change as new Lambda Function Version. Defaults to `false`.
   666  	Publish pulumi.BoolPtrInput
   667  	// ARN identifying your Lambda Function Version (if versioning is enabled via `publish = true`).
   668  	QualifiedArn pulumi.StringPtrInput
   669  	// Qualified ARN (ARN with lambda version number) to be used for invoking Lambda Function from API Gateway - to be used in `apigateway.Integration`'s `uri`.
   670  	QualifiedInvokeArn pulumi.StringPtrInput
   671  	// **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 `replacementSecurityGroupIds` attribute to use a custom list of security groups for replacement.
   672  	//
   673  	// Deprecated: AWS no longer supports this operation. This attribute now has no effect and will be removed in a future major version.
   674  	ReplaceSecurityGroupsOnDestroy pulumi.BoolPtrInput
   675  	// List of security group IDs to assign to orphaned Lambda function network interfaces upon destruction. `replaceSecurityGroupsOnDestroy` must be set to `true` to use this attribute.
   676  	//
   677  	// Deprecated: AWS no longer supports this operation. This attribute now has no effect and will be removed in a future major version.
   678  	ReplacementSecurityGroupIds pulumi.StringArrayInput
   679  	// 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)
   680  	ReservedConcurrentExecutions pulumi.IntPtrInput
   681  	// Amazon Resource Name (ARN) of the function's execution role. The role provides the function's identity and access to AWS services and resources.
   682  	//
   683  	// The following arguments are optional:
   684  	Role pulumi.StringPtrInput
   685  	// 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.
   686  	Runtime pulumi.StringPtrInput
   687  	// 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`, `imageUri`, or `s3Bucket` must be specified. When `s3Bucket` is set, `s3Key` is required.
   688  	S3Bucket pulumi.StringPtrInput
   689  	// S3 key of an object containing the function's deployment package. When `s3Bucket` is set, `s3Key` is required.
   690  	S3Key pulumi.StringPtrInput
   691  	// Object version containing the function's deployment package. Conflicts with `filename` and `imageUri`.
   692  	S3ObjectVersion pulumi.StringPtrInput
   693  	// ARN of the signing job.
   694  	SigningJobArn pulumi.StringPtrInput
   695  	// ARN of the signing profile version.
   696  	SigningProfileVersionArn pulumi.StringPtrInput
   697  	// 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.
   698  	SkipDestroy pulumi.BoolPtrInput
   699  	// Snap start settings block. Detailed below.
   700  	SnapStart FunctionSnapStartPtrInput
   701  	// Used to trigger updates. Must be set to a base64-encoded SHA256 hash of the package file specified with either `filename` or `s3Key`.
   702  	SourceCodeHash pulumi.StringPtrInput
   703  	// Size in bytes of the function .zip file.
   704  	SourceCodeSize pulumi.IntPtrInput
   705  	// Map of tags to assign to the object. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   706  	Tags pulumi.StringMapInput
   707  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   708  	//
   709  	// Deprecated: Please use `tags` instead.
   710  	TagsAll pulumi.StringMapInput
   711  	// 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).
   712  	Timeout pulumi.IntPtrInput
   713  	// Configuration block. Detailed below.
   714  	TracingConfig FunctionTracingConfigPtrInput
   715  	// Latest published version of your Lambda Function.
   716  	Version pulumi.StringPtrInput
   717  	// Configuration block. Detailed below.
   718  	VpcConfig FunctionVpcConfigPtrInput
   719  }
   720  
   721  func (FunctionState) ElementType() reflect.Type {
   722  	return reflect.TypeOf((*functionState)(nil)).Elem()
   723  }
   724  
   725  type functionArgs struct {
   726  	// Instruction set architecture for your Lambda function. Valid values are `["x8664"]` and `["arm64"]`. Default is `["x8664"]`. Removing this attribute, function's architecture stay the same.
   727  	Architectures []string `pulumi:"architectures"`
   728  	// Path to the function's deployment package within the local filesystem. Exactly one of `filename`, `imageUri`, or `s3Bucket` must be specified.
   729  	Code pulumi.Archive `pulumi:"code"`
   730  	// 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.
   731  	CodeSigningConfigArn *string `pulumi:"codeSigningConfigArn"`
   732  	// Configuration block. Detailed below.
   733  	DeadLetterConfig *FunctionDeadLetterConfig `pulumi:"deadLetterConfig"`
   734  	// Description of what your Lambda Function does.
   735  	Description *string `pulumi:"description"`
   736  	// Configuration block. Detailed below.
   737  	Environment *FunctionEnvironment `pulumi:"environment"`
   738  	// 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.
   739  	EphemeralStorage *FunctionEphemeralStorage `pulumi:"ephemeralStorage"`
   740  	// Configuration block. Detailed below.
   741  	FileSystemConfig *FunctionFileSystemConfig `pulumi:"fileSystemConfig"`
   742  	// Function [entrypoint](https://docs.aws.amazon.com/lambda/latest/dg/walkthrough-custom-events-create-test-function.html) in your code.
   743  	Handler *string `pulumi:"handler"`
   744  	// Configuration block. Detailed below.
   745  	ImageConfig *FunctionImageConfig `pulumi:"imageConfig"`
   746  	// ECR image URI containing the function's deployment package. Exactly one of `filename`, `imageUri`,  or `s3Bucket` must be specified.
   747  	ImageUri *string `pulumi:"imageUri"`
   748  	// 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.
   749  	KmsKeyArn *string `pulumi:"kmsKeyArn"`
   750  	// 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)
   751  	Layers []string `pulumi:"layers"`
   752  	// Configuration block used to specify advanced logging settings. Detailed below.
   753  	LoggingConfig *FunctionLoggingConfig `pulumi:"loggingConfig"`
   754  	// 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)
   755  	MemorySize *int `pulumi:"memorySize"`
   756  	// Unique name for your Lambda Function.
   757  	Name *string `pulumi:"name"`
   758  	// Lambda deployment package type. Valid values are `Zip` and `Image`. Defaults to `Zip`.
   759  	PackageType *string `pulumi:"packageType"`
   760  	// Whether to publish creation/change as new Lambda Function Version. Defaults to `false`.
   761  	Publish *bool `pulumi:"publish"`
   762  	// **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 `replacementSecurityGroupIds` attribute to use a custom list of security groups for replacement.
   763  	//
   764  	// Deprecated: AWS no longer supports this operation. This attribute now has no effect and will be removed in a future major version.
   765  	ReplaceSecurityGroupsOnDestroy *bool `pulumi:"replaceSecurityGroupsOnDestroy"`
   766  	// List of security group IDs to assign to orphaned Lambda function network interfaces upon destruction. `replaceSecurityGroupsOnDestroy` must be set to `true` to use this attribute.
   767  	//
   768  	// Deprecated: AWS no longer supports this operation. This attribute now has no effect and will be removed in a future major version.
   769  	ReplacementSecurityGroupIds []string `pulumi:"replacementSecurityGroupIds"`
   770  	// 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)
   771  	ReservedConcurrentExecutions *int `pulumi:"reservedConcurrentExecutions"`
   772  	// Amazon Resource Name (ARN) of the function's execution role. The role provides the function's identity and access to AWS services and resources.
   773  	//
   774  	// The following arguments are optional:
   775  	Role string `pulumi:"role"`
   776  	// 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.
   777  	Runtime *string `pulumi:"runtime"`
   778  	// 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`, `imageUri`, or `s3Bucket` must be specified. When `s3Bucket` is set, `s3Key` is required.
   779  	S3Bucket *string `pulumi:"s3Bucket"`
   780  	// S3 key of an object containing the function's deployment package. When `s3Bucket` is set, `s3Key` is required.
   781  	S3Key *string `pulumi:"s3Key"`
   782  	// Object version containing the function's deployment package. Conflicts with `filename` and `imageUri`.
   783  	S3ObjectVersion *string `pulumi:"s3ObjectVersion"`
   784  	// 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.
   785  	SkipDestroy *bool `pulumi:"skipDestroy"`
   786  	// Snap start settings block. Detailed below.
   787  	SnapStart *FunctionSnapStart `pulumi:"snapStart"`
   788  	// Used to trigger updates. Must be set to a base64-encoded SHA256 hash of the package file specified with either `filename` or `s3Key`.
   789  	SourceCodeHash *string `pulumi:"sourceCodeHash"`
   790  	// Map of tags to assign to the object. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   791  	Tags map[string]string `pulumi:"tags"`
   792  	// 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).
   793  	Timeout *int `pulumi:"timeout"`
   794  	// Configuration block. Detailed below.
   795  	TracingConfig *FunctionTracingConfig `pulumi:"tracingConfig"`
   796  	// Configuration block. Detailed below.
   797  	VpcConfig *FunctionVpcConfig `pulumi:"vpcConfig"`
   798  }
   799  
   800  // The set of arguments for constructing a Function resource.
   801  type FunctionArgs struct {
   802  	// Instruction set architecture for your Lambda function. Valid values are `["x8664"]` and `["arm64"]`. Default is `["x8664"]`. Removing this attribute, function's architecture stay the same.
   803  	Architectures pulumi.StringArrayInput
   804  	// Path to the function's deployment package within the local filesystem. Exactly one of `filename`, `imageUri`, or `s3Bucket` must be specified.
   805  	Code pulumi.ArchiveInput
   806  	// 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.
   807  	CodeSigningConfigArn pulumi.StringPtrInput
   808  	// Configuration block. Detailed below.
   809  	DeadLetterConfig FunctionDeadLetterConfigPtrInput
   810  	// Description of what your Lambda Function does.
   811  	Description pulumi.StringPtrInput
   812  	// Configuration block. Detailed below.
   813  	Environment FunctionEnvironmentPtrInput
   814  	// 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.
   815  	EphemeralStorage FunctionEphemeralStoragePtrInput
   816  	// Configuration block. Detailed below.
   817  	FileSystemConfig FunctionFileSystemConfigPtrInput
   818  	// Function [entrypoint](https://docs.aws.amazon.com/lambda/latest/dg/walkthrough-custom-events-create-test-function.html) in your code.
   819  	Handler pulumi.StringPtrInput
   820  	// Configuration block. Detailed below.
   821  	ImageConfig FunctionImageConfigPtrInput
   822  	// ECR image URI containing the function's deployment package. Exactly one of `filename`, `imageUri`,  or `s3Bucket` must be specified.
   823  	ImageUri pulumi.StringPtrInput
   824  	// 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.
   825  	KmsKeyArn pulumi.StringPtrInput
   826  	// 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)
   827  	Layers pulumi.StringArrayInput
   828  	// Configuration block used to specify advanced logging settings. Detailed below.
   829  	LoggingConfig FunctionLoggingConfigPtrInput
   830  	// 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)
   831  	MemorySize pulumi.IntPtrInput
   832  	// Unique name for your Lambda Function.
   833  	Name pulumi.StringPtrInput
   834  	// Lambda deployment package type. Valid values are `Zip` and `Image`. Defaults to `Zip`.
   835  	PackageType pulumi.StringPtrInput
   836  	// Whether to publish creation/change as new Lambda Function Version. Defaults to `false`.
   837  	Publish pulumi.BoolPtrInput
   838  	// **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 `replacementSecurityGroupIds` attribute to use a custom list of security groups for replacement.
   839  	//
   840  	// Deprecated: AWS no longer supports this operation. This attribute now has no effect and will be removed in a future major version.
   841  	ReplaceSecurityGroupsOnDestroy pulumi.BoolPtrInput
   842  	// List of security group IDs to assign to orphaned Lambda function network interfaces upon destruction. `replaceSecurityGroupsOnDestroy` must be set to `true` to use this attribute.
   843  	//
   844  	// Deprecated: AWS no longer supports this operation. This attribute now has no effect and will be removed in a future major version.
   845  	ReplacementSecurityGroupIds pulumi.StringArrayInput
   846  	// 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)
   847  	ReservedConcurrentExecutions pulumi.IntPtrInput
   848  	// Amazon Resource Name (ARN) of the function's execution role. The role provides the function's identity and access to AWS services and resources.
   849  	//
   850  	// The following arguments are optional:
   851  	Role pulumi.StringInput
   852  	// 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.
   853  	Runtime pulumi.StringPtrInput
   854  	// 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`, `imageUri`, or `s3Bucket` must be specified. When `s3Bucket` is set, `s3Key` is required.
   855  	S3Bucket pulumi.StringPtrInput
   856  	// S3 key of an object containing the function's deployment package. When `s3Bucket` is set, `s3Key` is required.
   857  	S3Key pulumi.StringPtrInput
   858  	// Object version containing the function's deployment package. Conflicts with `filename` and `imageUri`.
   859  	S3ObjectVersion pulumi.StringPtrInput
   860  	// 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.
   861  	SkipDestroy pulumi.BoolPtrInput
   862  	// Snap start settings block. Detailed below.
   863  	SnapStart FunctionSnapStartPtrInput
   864  	// Used to trigger updates. Must be set to a base64-encoded SHA256 hash of the package file specified with either `filename` or `s3Key`.
   865  	SourceCodeHash pulumi.StringPtrInput
   866  	// Map of tags to assign to the object. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   867  	Tags pulumi.StringMapInput
   868  	// 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).
   869  	Timeout pulumi.IntPtrInput
   870  	// Configuration block. Detailed below.
   871  	TracingConfig FunctionTracingConfigPtrInput
   872  	// Configuration block. Detailed below.
   873  	VpcConfig FunctionVpcConfigPtrInput
   874  }
   875  
   876  func (FunctionArgs) ElementType() reflect.Type {
   877  	return reflect.TypeOf((*functionArgs)(nil)).Elem()
   878  }
   879  
   880  type FunctionInput interface {
   881  	pulumi.Input
   882  
   883  	ToFunctionOutput() FunctionOutput
   884  	ToFunctionOutputWithContext(ctx context.Context) FunctionOutput
   885  }
   886  
   887  func (*Function) ElementType() reflect.Type {
   888  	return reflect.TypeOf((**Function)(nil)).Elem()
   889  }
   890  
   891  func (i *Function) ToFunctionOutput() FunctionOutput {
   892  	return i.ToFunctionOutputWithContext(context.Background())
   893  }
   894  
   895  func (i *Function) ToFunctionOutputWithContext(ctx context.Context) FunctionOutput {
   896  	return pulumi.ToOutputWithContext(ctx, i).(FunctionOutput)
   897  }
   898  
   899  // FunctionArrayInput is an input type that accepts FunctionArray and FunctionArrayOutput values.
   900  // You can construct a concrete instance of `FunctionArrayInput` via:
   901  //
   902  //	FunctionArray{ FunctionArgs{...} }
   903  type FunctionArrayInput interface {
   904  	pulumi.Input
   905  
   906  	ToFunctionArrayOutput() FunctionArrayOutput
   907  	ToFunctionArrayOutputWithContext(context.Context) FunctionArrayOutput
   908  }
   909  
   910  type FunctionArray []FunctionInput
   911  
   912  func (FunctionArray) ElementType() reflect.Type {
   913  	return reflect.TypeOf((*[]*Function)(nil)).Elem()
   914  }
   915  
   916  func (i FunctionArray) ToFunctionArrayOutput() FunctionArrayOutput {
   917  	return i.ToFunctionArrayOutputWithContext(context.Background())
   918  }
   919  
   920  func (i FunctionArray) ToFunctionArrayOutputWithContext(ctx context.Context) FunctionArrayOutput {
   921  	return pulumi.ToOutputWithContext(ctx, i).(FunctionArrayOutput)
   922  }
   923  
   924  // FunctionMapInput is an input type that accepts FunctionMap and FunctionMapOutput values.
   925  // You can construct a concrete instance of `FunctionMapInput` via:
   926  //
   927  //	FunctionMap{ "key": FunctionArgs{...} }
   928  type FunctionMapInput interface {
   929  	pulumi.Input
   930  
   931  	ToFunctionMapOutput() FunctionMapOutput
   932  	ToFunctionMapOutputWithContext(context.Context) FunctionMapOutput
   933  }
   934  
   935  type FunctionMap map[string]FunctionInput
   936  
   937  func (FunctionMap) ElementType() reflect.Type {
   938  	return reflect.TypeOf((*map[string]*Function)(nil)).Elem()
   939  }
   940  
   941  func (i FunctionMap) ToFunctionMapOutput() FunctionMapOutput {
   942  	return i.ToFunctionMapOutputWithContext(context.Background())
   943  }
   944  
   945  func (i FunctionMap) ToFunctionMapOutputWithContext(ctx context.Context) FunctionMapOutput {
   946  	return pulumi.ToOutputWithContext(ctx, i).(FunctionMapOutput)
   947  }
   948  
   949  type FunctionOutput struct{ *pulumi.OutputState }
   950  
   951  func (FunctionOutput) ElementType() reflect.Type {
   952  	return reflect.TypeOf((**Function)(nil)).Elem()
   953  }
   954  
   955  func (o FunctionOutput) ToFunctionOutput() FunctionOutput {
   956  	return o
   957  }
   958  
   959  func (o FunctionOutput) ToFunctionOutputWithContext(ctx context.Context) FunctionOutput {
   960  	return o
   961  }
   962  
   963  // Instruction set architecture for your Lambda function. Valid values are `["x8664"]` and `["arm64"]`. Default is `["x8664"]`. Removing this attribute, function's architecture stay the same.
   964  func (o FunctionOutput) Architectures() pulumi.StringArrayOutput {
   965  	return o.ApplyT(func(v *Function) pulumi.StringArrayOutput { return v.Architectures }).(pulumi.StringArrayOutput)
   966  }
   967  
   968  // Amazon Resource Name (ARN) of the Amazon EFS Access Point that provides access to the file system.
   969  func (o FunctionOutput) Arn() pulumi.StringOutput {
   970  	return o.ApplyT(func(v *Function) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
   971  }
   972  
   973  // Path to the function's deployment package within the local filesystem. Exactly one of `filename`, `imageUri`, or `s3Bucket` must be specified.
   974  func (o FunctionOutput) Code() pulumi.ArchiveOutput {
   975  	return o.ApplyT(func(v *Function) pulumi.ArchiveOutput { return v.Code }).(pulumi.ArchiveOutput)
   976  }
   977  
   978  // 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.
   979  func (o FunctionOutput) CodeSigningConfigArn() pulumi.StringPtrOutput {
   980  	return o.ApplyT(func(v *Function) pulumi.StringPtrOutput { return v.CodeSigningConfigArn }).(pulumi.StringPtrOutput)
   981  }
   982  
   983  // Configuration block. Detailed below.
   984  func (o FunctionOutput) DeadLetterConfig() FunctionDeadLetterConfigPtrOutput {
   985  	return o.ApplyT(func(v *Function) FunctionDeadLetterConfigPtrOutput { return v.DeadLetterConfig }).(FunctionDeadLetterConfigPtrOutput)
   986  }
   987  
   988  // Description of what your Lambda Function does.
   989  func (o FunctionOutput) Description() pulumi.StringPtrOutput {
   990  	return o.ApplyT(func(v *Function) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
   991  }
   992  
   993  // Configuration block. Detailed below.
   994  func (o FunctionOutput) Environment() FunctionEnvironmentPtrOutput {
   995  	return o.ApplyT(func(v *Function) FunctionEnvironmentPtrOutput { return v.Environment }).(FunctionEnvironmentPtrOutput)
   996  }
   997  
   998  // 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.
   999  func (o FunctionOutput) EphemeralStorage() FunctionEphemeralStorageOutput {
  1000  	return o.ApplyT(func(v *Function) FunctionEphemeralStorageOutput { return v.EphemeralStorage }).(FunctionEphemeralStorageOutput)
  1001  }
  1002  
  1003  // Configuration block. Detailed below.
  1004  func (o FunctionOutput) FileSystemConfig() FunctionFileSystemConfigPtrOutput {
  1005  	return o.ApplyT(func(v *Function) FunctionFileSystemConfigPtrOutput { return v.FileSystemConfig }).(FunctionFileSystemConfigPtrOutput)
  1006  }
  1007  
  1008  // Function [entrypoint](https://docs.aws.amazon.com/lambda/latest/dg/walkthrough-custom-events-create-test-function.html) in your code.
  1009  func (o FunctionOutput) Handler() pulumi.StringPtrOutput {
  1010  	return o.ApplyT(func(v *Function) pulumi.StringPtrOutput { return v.Handler }).(pulumi.StringPtrOutput)
  1011  }
  1012  
  1013  // Configuration block. Detailed below.
  1014  func (o FunctionOutput) ImageConfig() FunctionImageConfigPtrOutput {
  1015  	return o.ApplyT(func(v *Function) FunctionImageConfigPtrOutput { return v.ImageConfig }).(FunctionImageConfigPtrOutput)
  1016  }
  1017  
  1018  // ECR image URI containing the function's deployment package. Exactly one of `filename`, `imageUri`,  or `s3Bucket` must be specified.
  1019  func (o FunctionOutput) ImageUri() pulumi.StringPtrOutput {
  1020  	return o.ApplyT(func(v *Function) pulumi.StringPtrOutput { return v.ImageUri }).(pulumi.StringPtrOutput)
  1021  }
  1022  
  1023  // ARN to be used for invoking Lambda Function from API Gateway - to be used in `apigateway.Integration`'s `uri`.
  1024  func (o FunctionOutput) InvokeArn() pulumi.StringOutput {
  1025  	return o.ApplyT(func(v *Function) pulumi.StringOutput { return v.InvokeArn }).(pulumi.StringOutput)
  1026  }
  1027  
  1028  // 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.
  1029  func (o FunctionOutput) KmsKeyArn() pulumi.StringPtrOutput {
  1030  	return o.ApplyT(func(v *Function) pulumi.StringPtrOutput { return v.KmsKeyArn }).(pulumi.StringPtrOutput)
  1031  }
  1032  
  1033  // Date this resource was last modified.
  1034  func (o FunctionOutput) LastModified() pulumi.StringOutput {
  1035  	return o.ApplyT(func(v *Function) pulumi.StringOutput { return v.LastModified }).(pulumi.StringOutput)
  1036  }
  1037  
  1038  // 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)
  1039  func (o FunctionOutput) Layers() pulumi.StringArrayOutput {
  1040  	return o.ApplyT(func(v *Function) pulumi.StringArrayOutput { return v.Layers }).(pulumi.StringArrayOutput)
  1041  }
  1042  
  1043  // Configuration block used to specify advanced logging settings. Detailed below.
  1044  func (o FunctionOutput) LoggingConfig() FunctionLoggingConfigOutput {
  1045  	return o.ApplyT(func(v *Function) FunctionLoggingConfigOutput { return v.LoggingConfig }).(FunctionLoggingConfigOutput)
  1046  }
  1047  
  1048  // 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)
  1049  func (o FunctionOutput) MemorySize() pulumi.IntPtrOutput {
  1050  	return o.ApplyT(func(v *Function) pulumi.IntPtrOutput { return v.MemorySize }).(pulumi.IntPtrOutput)
  1051  }
  1052  
  1053  // Unique name for your Lambda Function.
  1054  func (o FunctionOutput) Name() pulumi.StringOutput {
  1055  	return o.ApplyT(func(v *Function) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
  1056  }
  1057  
  1058  // Lambda deployment package type. Valid values are `Zip` and `Image`. Defaults to `Zip`.
  1059  func (o FunctionOutput) PackageType() pulumi.StringPtrOutput {
  1060  	return o.ApplyT(func(v *Function) pulumi.StringPtrOutput { return v.PackageType }).(pulumi.StringPtrOutput)
  1061  }
  1062  
  1063  // Whether to publish creation/change as new Lambda Function Version. Defaults to `false`.
  1064  func (o FunctionOutput) Publish() pulumi.BoolPtrOutput {
  1065  	return o.ApplyT(func(v *Function) pulumi.BoolPtrOutput { return v.Publish }).(pulumi.BoolPtrOutput)
  1066  }
  1067  
  1068  // ARN identifying your Lambda Function Version (if versioning is enabled via `publish = true`).
  1069  func (o FunctionOutput) QualifiedArn() pulumi.StringOutput {
  1070  	return o.ApplyT(func(v *Function) pulumi.StringOutput { return v.QualifiedArn }).(pulumi.StringOutput)
  1071  }
  1072  
  1073  // Qualified ARN (ARN with lambda version number) to be used for invoking Lambda Function from API Gateway - to be used in `apigateway.Integration`'s `uri`.
  1074  func (o FunctionOutput) QualifiedInvokeArn() pulumi.StringOutput {
  1075  	return o.ApplyT(func(v *Function) pulumi.StringOutput { return v.QualifiedInvokeArn }).(pulumi.StringOutput)
  1076  }
  1077  
  1078  // **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 `replacementSecurityGroupIds` attribute to use a custom list of security groups for replacement.
  1079  //
  1080  // Deprecated: AWS no longer supports this operation. This attribute now has no effect and will be removed in a future major version.
  1081  func (o FunctionOutput) ReplaceSecurityGroupsOnDestroy() pulumi.BoolPtrOutput {
  1082  	return o.ApplyT(func(v *Function) pulumi.BoolPtrOutput { return v.ReplaceSecurityGroupsOnDestroy }).(pulumi.BoolPtrOutput)
  1083  }
  1084  
  1085  // List of security group IDs to assign to orphaned Lambda function network interfaces upon destruction. `replaceSecurityGroupsOnDestroy` must be set to `true` to use this attribute.
  1086  //
  1087  // Deprecated: AWS no longer supports this operation. This attribute now has no effect and will be removed in a future major version.
  1088  func (o FunctionOutput) ReplacementSecurityGroupIds() pulumi.StringArrayOutput {
  1089  	return o.ApplyT(func(v *Function) pulumi.StringArrayOutput { return v.ReplacementSecurityGroupIds }).(pulumi.StringArrayOutput)
  1090  }
  1091  
  1092  // 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)
  1093  func (o FunctionOutput) ReservedConcurrentExecutions() pulumi.IntPtrOutput {
  1094  	return o.ApplyT(func(v *Function) pulumi.IntPtrOutput { return v.ReservedConcurrentExecutions }).(pulumi.IntPtrOutput)
  1095  }
  1096  
  1097  // Amazon Resource Name (ARN) of the function's execution role. The role provides the function's identity and access to AWS services and resources.
  1098  //
  1099  // The following arguments are optional:
  1100  func (o FunctionOutput) Role() pulumi.StringOutput {
  1101  	return o.ApplyT(func(v *Function) pulumi.StringOutput { return v.Role }).(pulumi.StringOutput)
  1102  }
  1103  
  1104  // 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.
  1105  func (o FunctionOutput) Runtime() pulumi.StringPtrOutput {
  1106  	return o.ApplyT(func(v *Function) pulumi.StringPtrOutput { return v.Runtime }).(pulumi.StringPtrOutput)
  1107  }
  1108  
  1109  // 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`, `imageUri`, or `s3Bucket` must be specified. When `s3Bucket` is set, `s3Key` is required.
  1110  func (o FunctionOutput) S3Bucket() pulumi.StringPtrOutput {
  1111  	return o.ApplyT(func(v *Function) pulumi.StringPtrOutput { return v.S3Bucket }).(pulumi.StringPtrOutput)
  1112  }
  1113  
  1114  // S3 key of an object containing the function's deployment package. When `s3Bucket` is set, `s3Key` is required.
  1115  func (o FunctionOutput) S3Key() pulumi.StringPtrOutput {
  1116  	return o.ApplyT(func(v *Function) pulumi.StringPtrOutput { return v.S3Key }).(pulumi.StringPtrOutput)
  1117  }
  1118  
  1119  // Object version containing the function's deployment package. Conflicts with `filename` and `imageUri`.
  1120  func (o FunctionOutput) S3ObjectVersion() pulumi.StringPtrOutput {
  1121  	return o.ApplyT(func(v *Function) pulumi.StringPtrOutput { return v.S3ObjectVersion }).(pulumi.StringPtrOutput)
  1122  }
  1123  
  1124  // ARN of the signing job.
  1125  func (o FunctionOutput) SigningJobArn() pulumi.StringOutput {
  1126  	return o.ApplyT(func(v *Function) pulumi.StringOutput { return v.SigningJobArn }).(pulumi.StringOutput)
  1127  }
  1128  
  1129  // ARN of the signing profile version.
  1130  func (o FunctionOutput) SigningProfileVersionArn() pulumi.StringOutput {
  1131  	return o.ApplyT(func(v *Function) pulumi.StringOutput { return v.SigningProfileVersionArn }).(pulumi.StringOutput)
  1132  }
  1133  
  1134  // 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.
  1135  func (o FunctionOutput) SkipDestroy() pulumi.BoolPtrOutput {
  1136  	return o.ApplyT(func(v *Function) pulumi.BoolPtrOutput { return v.SkipDestroy }).(pulumi.BoolPtrOutput)
  1137  }
  1138  
  1139  // Snap start settings block. Detailed below.
  1140  func (o FunctionOutput) SnapStart() FunctionSnapStartPtrOutput {
  1141  	return o.ApplyT(func(v *Function) FunctionSnapStartPtrOutput { return v.SnapStart }).(FunctionSnapStartPtrOutput)
  1142  }
  1143  
  1144  // Used to trigger updates. Must be set to a base64-encoded SHA256 hash of the package file specified with either `filename` or `s3Key`.
  1145  func (o FunctionOutput) SourceCodeHash() pulumi.StringOutput {
  1146  	return o.ApplyT(func(v *Function) pulumi.StringOutput { return v.SourceCodeHash }).(pulumi.StringOutput)
  1147  }
  1148  
  1149  // Size in bytes of the function .zip file.
  1150  func (o FunctionOutput) SourceCodeSize() pulumi.IntOutput {
  1151  	return o.ApplyT(func(v *Function) pulumi.IntOutput { return v.SourceCodeSize }).(pulumi.IntOutput)
  1152  }
  1153  
  1154  // Map of tags to assign to the object. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
  1155  func (o FunctionOutput) Tags() pulumi.StringMapOutput {
  1156  	return o.ApplyT(func(v *Function) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
  1157  }
  1158  
  1159  // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
  1160  //
  1161  // Deprecated: Please use `tags` instead.
  1162  func (o FunctionOutput) TagsAll() pulumi.StringMapOutput {
  1163  	return o.ApplyT(func(v *Function) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput)
  1164  }
  1165  
  1166  // 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).
  1167  func (o FunctionOutput) Timeout() pulumi.IntPtrOutput {
  1168  	return o.ApplyT(func(v *Function) pulumi.IntPtrOutput { return v.Timeout }).(pulumi.IntPtrOutput)
  1169  }
  1170  
  1171  // Configuration block. Detailed below.
  1172  func (o FunctionOutput) TracingConfig() FunctionTracingConfigOutput {
  1173  	return o.ApplyT(func(v *Function) FunctionTracingConfigOutput { return v.TracingConfig }).(FunctionTracingConfigOutput)
  1174  }
  1175  
  1176  // Latest published version of your Lambda Function.
  1177  func (o FunctionOutput) Version() pulumi.StringOutput {
  1178  	return o.ApplyT(func(v *Function) pulumi.StringOutput { return v.Version }).(pulumi.StringOutput)
  1179  }
  1180  
  1181  // Configuration block. Detailed below.
  1182  func (o FunctionOutput) VpcConfig() FunctionVpcConfigPtrOutput {
  1183  	return o.ApplyT(func(v *Function) FunctionVpcConfigPtrOutput { return v.VpcConfig }).(FunctionVpcConfigPtrOutput)
  1184  }
  1185  
  1186  type FunctionArrayOutput struct{ *pulumi.OutputState }
  1187  
  1188  func (FunctionArrayOutput) ElementType() reflect.Type {
  1189  	return reflect.TypeOf((*[]*Function)(nil)).Elem()
  1190  }
  1191  
  1192  func (o FunctionArrayOutput) ToFunctionArrayOutput() FunctionArrayOutput {
  1193  	return o
  1194  }
  1195  
  1196  func (o FunctionArrayOutput) ToFunctionArrayOutputWithContext(ctx context.Context) FunctionArrayOutput {
  1197  	return o
  1198  }
  1199  
  1200  func (o FunctionArrayOutput) Index(i pulumi.IntInput) FunctionOutput {
  1201  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Function {
  1202  		return vs[0].([]*Function)[vs[1].(int)]
  1203  	}).(FunctionOutput)
  1204  }
  1205  
  1206  type FunctionMapOutput struct{ *pulumi.OutputState }
  1207  
  1208  func (FunctionMapOutput) ElementType() reflect.Type {
  1209  	return reflect.TypeOf((*map[string]*Function)(nil)).Elem()
  1210  }
  1211  
  1212  func (o FunctionMapOutput) ToFunctionMapOutput() FunctionMapOutput {
  1213  	return o
  1214  }
  1215  
  1216  func (o FunctionMapOutput) ToFunctionMapOutputWithContext(ctx context.Context) FunctionMapOutput {
  1217  	return o
  1218  }
  1219  
  1220  func (o FunctionMapOutput) MapIndex(k pulumi.StringInput) FunctionOutput {
  1221  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Function {
  1222  		return vs[0].(map[string]*Function)[vs[1].(string)]
  1223  	}).(FunctionOutput)
  1224  }
  1225  
  1226  func init() {
  1227  	pulumi.RegisterInputType(reflect.TypeOf((*FunctionInput)(nil)).Elem(), &Function{})
  1228  	pulumi.RegisterInputType(reflect.TypeOf((*FunctionArrayInput)(nil)).Elem(), FunctionArray{})
  1229  	pulumi.RegisterInputType(reflect.TypeOf((*FunctionMapInput)(nil)).Elem(), FunctionMap{})
  1230  	pulumi.RegisterOutputType(FunctionOutput{})
  1231  	pulumi.RegisterOutputType(FunctionArrayOutput{})
  1232  	pulumi.RegisterOutputType(FunctionMapOutput{})
  1233  }