// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`submodules without an explicit name csharp 1`] = ` "# API Reference ## Constructs ### EdgeFunction - *Implements:* Amazon.CDK.AWS.Lambda.IVersion A Lambda@Edge function. Convenience resource for requesting a Lambda function in the 'us-east-1' region for use with Lambda@Edge. Implements several restrictions enforced by Lambda@Edge. Note that this construct requires that the 'us-east-1' region has been bootstrapped. See https://docs.aws.amazon.com/cdk/latest/guide/bootstrapping.html or 'cdk bootstrap --help' for options. #### Initializers \`\`\`csharp using Amazon.CDK.AWS.CloudFront; new EdgeFunction(Construct Scope, string Id, EdgeFunctionProps Props); \`\`\` | **Name** | **Type** | **Description** | | --- | --- | --- | | Scope | Constructs.Construct | *No description.* | | Id | string | *No description.* | | Props | EdgeFunctionProps | *No description.* | --- ##### \`Scope\`Required - *Type:* Constructs.Construct --- ##### \`Id\`Required - *Type:* string --- ##### \`Props\`Required - *Type:* EdgeFunctionProps --- #### Methods | **Name** | **Description** | | --- | --- | | ToString | Returns a string representation of this construct. | | ApplyRemovalPolicy | Apply the given removal policy to this resource. | | AddAlias | Defines an alias for this version. | | AddEventSource | Adds an event source to this function. | | AddEventSourceMapping | Adds an event source that maps to this AWS Lambda function. | | AddPermission | Adds a permission to the Lambda resource policy. | | AddToRolePolicy | Adds a statement to the IAM role assumed by the instance. | | ConfigureAsyncInvoke | Configures options for asynchronous invocation. | | GrantInvoke | Grant the given identity permissions to invoke this Lambda. | | Metric | Return the given named metric for this Lambda Return the given named metric for this Function. | | MetricDuration | Metric for the Duration of this Lambda How long execution of this Lambda takes. | | MetricErrors | How many invocations of this Lambda fail. | | MetricInvocations | Metric for the number of invocations of this Lambda How often this Lambda is invoked. | | MetricThrottles | Metric for the number of throttled invocations of this Lambda How often this Lambda is throttled. | --- ##### \`ToString\` \`\`\`csharp private string ToString() \`\`\` Returns a string representation of this construct. ##### \`ApplyRemovalPolicy\` \`\`\`csharp private void ApplyRemovalPolicy(RemovalPolicy Policy) \`\`\` Apply the given removal policy to this resource. The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced. The resource can be deleted (\`RemovalPolicy.DESTROY\`), or left in your AWS account for data recovery and cleanup later (\`RemovalPolicy.RETAIN\`). ###### \`Policy\`Required - *Type:* Amazon.CDK.RemovalPolicy --- ##### \`AddAlias\` \`\`\`csharp private Alias AddAlias(string AliasName, AliasOptions Options = null) \`\`\` Defines an alias for this version. ###### \`AliasName\`Required - *Type:* string --- ###### \`Options\`Optional - *Type:* Amazon.CDK.AWS.Lambda.AliasOptions --- ##### \`AddEventSource\` \`\`\`csharp private void AddEventSource(IEventSource Source) \`\`\` Adds an event source to this function. ###### \`Source\`Required - *Type:* Amazon.CDK.AWS.Lambda.IEventSource --- ##### \`AddEventSourceMapping\` \`\`\`csharp private EventSourceMapping AddEventSourceMapping(string Id, EventSourceMappingOptions Options) \`\`\` Adds an event source that maps to this AWS Lambda function. ###### \`Id\`Required - *Type:* string --- ###### \`Options\`Required - *Type:* Amazon.CDK.AWS.Lambda.EventSourceMappingOptions --- ##### \`AddPermission\` \`\`\`csharp private void AddPermission(string Id, Permission Permission) \`\`\` Adds a permission to the Lambda resource policy. ###### \`Id\`Required - *Type:* string --- ###### \`Permission\`Required - *Type:* Amazon.CDK.AWS.Lambda.Permission --- ##### \`AddToRolePolicy\` \`\`\`csharp private void AddToRolePolicy(PolicyStatement Statement) \`\`\` Adds a statement to the IAM role assumed by the instance. ###### \`Statement\`Required - *Type:* Amazon.CDK.AWS.IAM.PolicyStatement --- ##### \`ConfigureAsyncInvoke\` \`\`\`csharp private void ConfigureAsyncInvoke(EventInvokeConfigOptions Options) \`\`\` Configures options for asynchronous invocation. ###### \`Options\`Required - *Type:* Amazon.CDK.AWS.Lambda.EventInvokeConfigOptions --- ##### \`GrantInvoke\` \`\`\`csharp private Grant GrantInvoke(IGrantable Identity) \`\`\` Grant the given identity permissions to invoke this Lambda. ###### \`Identity\`Required - *Type:* Amazon.CDK.AWS.IAM.IGrantable --- ##### \`Metric\` \`\`\`csharp private Metric Metric(string MetricName, MetricOptions Props = null) \`\`\` Return the given named metric for this Lambda Return the given named metric for this Function. Return the given named metric for this Lambda Return the given named metric for this Function. ###### \`MetricName\`Required - *Type:* string --- ###### \`Props\`Optional - *Type:* Amazon.CDK.AWS.CloudWatch.MetricOptions --- ##### \`MetricDuration\` \`\`\`csharp private Metric MetricDuration(MetricOptions Props = null) \`\`\` Metric for the Duration of this Lambda How long execution of this Lambda takes. Average over 5 minutes Metric for the Duration of this Lambda How long execution of this Lambda takes. Average over 5 minutes ###### \`Props\`Optional - *Type:* Amazon.CDK.AWS.CloudWatch.MetricOptions --- ##### \`MetricErrors\` \`\`\`csharp private Metric MetricErrors(MetricOptions Props = null) \`\`\` How many invocations of this Lambda fail. Sum over 5 minutes ###### \`Props\`Optional - *Type:* Amazon.CDK.AWS.CloudWatch.MetricOptions --- ##### \`MetricInvocations\` \`\`\`csharp private Metric MetricInvocations(MetricOptions Props = null) \`\`\` Metric for the number of invocations of this Lambda How often this Lambda is invoked. Sum over 5 minutes Metric for the number of invocations of this Lambda How often this Lambda is invoked. Sum over 5 minutes ###### \`Props\`Optional - *Type:* Amazon.CDK.AWS.CloudWatch.MetricOptions --- ##### \`MetricThrottles\` \`\`\`csharp private Metric MetricThrottles(MetricOptions Props = null) \`\`\` Metric for the number of throttled invocations of this Lambda How often this Lambda is throttled. Sum over 5 minutes Metric for the number of throttled invocations of this Lambda How often this Lambda is throttled. Sum over 5 minutes ###### \`Props\`Optional - *Type:* Amazon.CDK.AWS.CloudWatch.MetricOptions --- #### Static Functions | **Name** | **Description** | | --- | --- | | IsConstruct | Return whether the given object is a Construct. | | IsResource | Check whether the given construct is a Resource. | --- ##### \`IsConstruct\` \`\`\`csharp using Amazon.CDK.AWS.CloudFront; EdgeFunction.IsConstruct(object X); \`\`\` Return whether the given object is a Construct. ###### \`X\`Required - *Type:* object --- ##### \`IsResource\` \`\`\`csharp using Amazon.CDK.AWS.CloudFront; EdgeFunction.IsResource(IConstruct Construct); \`\`\` Check whether the given construct is a Resource. ###### \`Construct\`Required - *Type:* Amazon.CDK.IConstruct --- #### Properties | **Name** | **Type** | **Description** | | --- | --- | --- | | Node | Amazon.CDK.ConstructNode | The construct tree node associated with this construct. | | Env | Amazon.CDK.ResourceEnvironment | The environment this resource belongs to. | | Stack | Amazon.CDK.Stack | The stack in which this resource is defined. | | Connections | Amazon.CDK.AWS.EC2.Connections | Not supported. | | CurrentVersion | Amazon.CDK.AWS.Lambda.IVersion | Convenience method to make \`EdgeFunction\` conform to the same interface as \`Function\`. | | EdgeArn | string | The ARN of the version for Lambda@Edge. | | FunctionArn | string | The ARN of the function. | | FunctionName | string | The name of the function. | | GrantPrincipal | Amazon.CDK.AWS.IAM.IPrincipal | The principal to grant permissions to. | | IsBoundToVpc | bool | Whether or not this Lambda function was bound to a VPC. | | Lambda | Amazon.CDK.AWS.Lambda.IFunction | The underlying AWS Lambda function. | | LatestVersion | Amazon.CDK.AWS.Lambda.IVersion | The \`$LATEST\` version of this function. | | PermissionsNode | Amazon.CDK.ConstructNode | The construct node where permissions are attached. | | Version | string | The most recently deployed version of this function. | | Role | Amazon.CDK.AWS.IAM.IRole | The IAM role associated with this function. | --- ##### \`Node\`Required \`\`\`csharp public ConstructNode Node { get; } \`\`\` - *Type:* Amazon.CDK.ConstructNode The construct tree node associated with this construct. --- ##### \`Env\`Required \`\`\`csharp public ResourceEnvironment Env { get; } \`\`\` - *Type:* Amazon.CDK.ResourceEnvironment The environment this resource belongs to. For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into. --- ##### \`Stack\`Required \`\`\`csharp public Stack Stack { get; } \`\`\` - *Type:* Amazon.CDK.Stack The stack in which this resource is defined. --- ##### \`Connections\`Required \`\`\`csharp public Connections Connections { get; } \`\`\` - *Type:* Amazon.CDK.AWS.EC2.Connections Not supported. Connections are only applicable to VPC-enabled functions. --- ##### \`CurrentVersion\`Required \`\`\`csharp public IVersion CurrentVersion { get; } \`\`\` - *Type:* Amazon.CDK.AWS.Lambda.IVersion Convenience method to make \`EdgeFunction\` conform to the same interface as \`Function\`. --- ##### \`EdgeArn\`Required \`\`\`csharp public string EdgeArn { get; } \`\`\` - *Type:* string The ARN of the version for Lambda@Edge. --- ##### \`FunctionArn\`Required \`\`\`csharp public string FunctionArn { get; } \`\`\` - *Type:* string The ARN of the function. --- ##### \`FunctionName\`Required \`\`\`csharp public string FunctionName { get; } \`\`\` - *Type:* string The name of the function. --- ##### \`GrantPrincipal\`Required \`\`\`csharp public IPrincipal GrantPrincipal { get; } \`\`\` - *Type:* Amazon.CDK.AWS.IAM.IPrincipal The principal to grant permissions to. --- ##### \`IsBoundToVpc\`Required \`\`\`csharp public bool IsBoundToVpc { get; } \`\`\` - *Type:* bool Whether or not this Lambda function was bound to a VPC. If this is is \`false\`, trying to access the \`connections\` object will fail. --- ##### \`Lambda\`Required \`\`\`csharp public IFunction Lambda { get; } \`\`\` - *Type:* Amazon.CDK.AWS.Lambda.IFunction The underlying AWS Lambda function. --- ##### \`LatestVersion\`Required \`\`\`csharp public IVersion LatestVersion { get; } \`\`\` - *Type:* Amazon.CDK.AWS.Lambda.IVersion The \`$LATEST\` version of this function. Note that this is reference to a non-specific AWS Lambda version, which means the function this version refers to can return different results in different invocations. To obtain a reference to an explicit version which references the current function configuration, use \`lambdaFunction.currentVersion\` instead. --- ##### \`PermissionsNode\`Required \`\`\`csharp public ConstructNode PermissionsNode { get; } \`\`\` - *Type:* Amazon.CDK.ConstructNode The construct node where permissions are attached. --- ##### \`Version\`Required \`\`\`csharp public string Version { get; } \`\`\` - *Type:* string The most recently deployed version of this function. --- ##### \`Role\`Optional \`\`\`csharp public IRole Role { get; } \`\`\` - *Type:* Amazon.CDK.AWS.IAM.IRole The IAM role associated with this function. --- ## Structs ### EdgeFunctionProps Properties for creating a Lambda@Edge function. #### Initializer \`\`\`csharp using Amazon.CDK.AWS.CloudFront; new EdgeFunctionProps { Duration MaxEventAge = null, IDestination OnFailure = null, IDestination OnSuccess = null, double RetryAttempts = null, bool AllowAllOutbound = null, bool AllowPublicSubnet = null, Architecture[] Architectures = null, ICodeSigningConfig CodeSigningConfig = null, VersionOptions CurrentVersionOptions = null, IQueue DeadLetterQueue = null, bool DeadLetterQueueEnabled = null, string Description = null, System.Collections.Generic.IDictionary Environment = null, IKey EnvironmentEncryption = null, IEventSource[] Events = null, FileSystem Filesystem = null, string FunctionName = null, PolicyStatement[] InitialPolicy = null, LambdaInsightsVersion InsightsVersion = null, ILayerVersion[] Layers = null, RetentionDays LogRetention = null, LogRetentionRetryOptions LogRetentionRetryOptions = null, IRole LogRetentionRole = null, double MemorySize = null, bool Profiling = null, IProfilingGroup ProfilingGroup = null, double ReservedConcurrentExecutions = null, IRole Role = null, ISecurityGroup SecurityGroup = null, ISecurityGroup[] SecurityGroups = null, Duration Timeout = null, Tracing Tracing = null, IVpc Vpc = null, SubnetSelection VpcSubnets = null, Code Code, string Handler, Runtime Runtime, string StackId = null }; \`\`\` #### Properties | **Name** | **Type** | **Description** | | --- | --- | --- | | MaxEventAge | Amazon.CDK.Duration | The maximum age of a request that Lambda sends to a function for processing. | | OnFailure | Amazon.CDK.AWS.Lambda.IDestination | The destination for failed invocations. | | OnSuccess | Amazon.CDK.AWS.Lambda.IDestination | The destination for successful invocations. | | RetryAttempts | double | The maximum number of times to retry when the function returns an error. | | AllowAllOutbound | bool | Whether to allow the Lambda to send all network traffic. | | AllowPublicSubnet | bool | Lambda Functions in a public subnet can NOT access the internet. | | Architectures | Amazon.CDK.AWS.Lambda.Architecture[] | The system architectures compatible with this lambda function. | | CodeSigningConfig | Amazon.CDK.AWS.Lambda.ICodeSigningConfig | Code signing config associated with this function. | | CurrentVersionOptions | Amazon.CDK.AWS.Lambda.VersionOptions | Options for the \`lambda.Version\` resource automatically created by the \`fn.currentVersion\` method. | | DeadLetterQueue | Amazon.CDK.AWS.SQS.IQueue | The SQS queue to use if DLQ is enabled. | | DeadLetterQueueEnabled | bool | Enabled DLQ. | | Description | string | A description of the function. | | Environment | System.Collections.Generic.IDictionary | Key-value pairs that Lambda caches and makes available for your Lambda functions. | | EnvironmentEncryption | Amazon.CDK.AWS.KMS.IKey | The AWS KMS key that's used to encrypt your function's environment variables. | | Events | Amazon.CDK.AWS.Lambda.IEventSource[] | Event sources for this function. | | Filesystem | Amazon.CDK.AWS.Lambda.FileSystem | The filesystem configuration for the lambda function. | | FunctionName | string | A name for the function. | | InitialPolicy | Amazon.CDK.AWS.IAM.PolicyStatement[] | Initial policy statements to add to the created Lambda Role. | | InsightsVersion | Amazon.CDK.AWS.Lambda.LambdaInsightsVersion | Specify the version of CloudWatch Lambda insights to use for monitoring. | | Layers | Amazon.CDK.AWS.Lambda.ILayerVersion[] | A list of layers to add to the function's execution environment. | | LogRetention | Amazon.CDK.AWS.Logs.RetentionDays | The number of days log events are kept in CloudWatch Logs. | | LogRetentionRetryOptions | Amazon.CDK.AWS.Lambda.LogRetentionRetryOptions | When log retention is specified, a custom resource attempts to create the CloudWatch log group. | | LogRetentionRole | Amazon.CDK.AWS.IAM.IRole | The IAM role for the Lambda function associated with the custom resource that sets the retention policy. | | MemorySize | double | The amount of memory, in MB, that is allocated to your Lambda function. | | Profiling | bool | Enable profiling. | | ProfilingGroup | Amazon.CDK.AWS.CodeGuruProfiler.IProfilingGroup | Profiling Group. | | ReservedConcurrentExecutions | double | The maximum of concurrent executions you want to reserve for the function. | | Role | Amazon.CDK.AWS.IAM.IRole | Lambda execution role. | | SecurityGroup | Amazon.CDK.AWS.EC2.ISecurityGroup | What security group to associate with the Lambda's network interfaces. This property is being deprecated, consider using securityGroups instead. | | SecurityGroups | Amazon.CDK.AWS.EC2.ISecurityGroup[] | The list of security groups to associate with the Lambda's network interfaces. | | Timeout | Amazon.CDK.Duration | The function execution time (in seconds) after which Lambda terminates the function. | | Tracing | Amazon.CDK.AWS.Lambda.Tracing | Enable AWS X-Ray Tracing for Lambda Function. | | Vpc | Amazon.CDK.AWS.EC2.IVpc | VPC network to place Lambda network interfaces. | | VpcSubnets | Amazon.CDK.AWS.EC2.SubnetSelection | Where to place the network interfaces within the VPC. | | Code | Amazon.CDK.AWS.Lambda.Code | The source code of your Lambda function. | | Handler | string | The name of the method within your code that Lambda calls to execute your function. | | Runtime | Amazon.CDK.AWS.Lambda.Runtime | The runtime environment for the Lambda function that you are uploading. | | StackId | string | The stack ID of Lambda@Edge function. | --- ##### \`MaxEventAge\`Optional \`\`\`csharp public Duration MaxEventAge { get; set; } \`\`\` - *Type:* Amazon.CDK.Duration - *Default:* Duration.hours(6) The maximum age of a request that Lambda sends to a function for processing. Minimum: 60 seconds Maximum: 6 hours --- ##### \`OnFailure\`Optional \`\`\`csharp public IDestination OnFailure { get; set; } \`\`\` - *Type:* Amazon.CDK.AWS.Lambda.IDestination - *Default:* no destination The destination for failed invocations. --- ##### \`OnSuccess\`Optional \`\`\`csharp public IDestination OnSuccess { get; set; } \`\`\` - *Type:* Amazon.CDK.AWS.Lambda.IDestination - *Default:* no destination The destination for successful invocations. --- ##### \`RetryAttempts\`Optional \`\`\`csharp public double RetryAttempts { get; set; } \`\`\` - *Type:* double - *Default:* 2 The maximum number of times to retry when the function returns an error. Minimum: 0 Maximum: 2 --- ##### \`AllowAllOutbound\`Optional \`\`\`csharp public bool AllowAllOutbound { get; set; } \`\`\` - *Type:* bool - *Default:* true Whether to allow the Lambda to send all network traffic. If set to false, you must individually add traffic rules to allow the Lambda to connect to network targets. --- ##### \`AllowPublicSubnet\`Optional \`\`\`csharp public bool AllowPublicSubnet { get; set; } \`\`\` - *Type:* bool - *Default:* false Lambda Functions in a public subnet can NOT access the internet. Use this property to acknowledge this limitation and still place the function in a public subnet. > [https://stackoverflow.com/questions/52992085/why-cant-an-aws-lambda-function-inside-a-public-subnet-in-a-vpc-connect-to-the/52994841#52994841](https://stackoverflow.com/questions/52992085/why-cant-an-aws-lambda-function-inside-a-public-subnet-in-a-vpc-connect-to-the/52994841#52994841) --- ##### \`Architectures\`Optional \`\`\`csharp public Architecture[] Architectures { get; set; } \`\`\` - *Type:* Amazon.CDK.AWS.Lambda.Architecture[] - *Default:* [Architecture.X86_64] The system architectures compatible with this lambda function. --- ##### \`CodeSigningConfig\`Optional \`\`\`csharp public ICodeSigningConfig CodeSigningConfig { get; set; } \`\`\` - *Type:* Amazon.CDK.AWS.Lambda.ICodeSigningConfig - *Default:* Not Sign the Code Code signing config associated with this function. --- ##### \`CurrentVersionOptions\`Optional \`\`\`csharp public VersionOptions CurrentVersionOptions { get; set; } \`\`\` - *Type:* Amazon.CDK.AWS.Lambda.VersionOptions - *Default:* default options as described in \`VersionOptions\` Options for the \`lambda.Version\` resource automatically created by the \`fn.currentVersion\` method. --- ##### \`DeadLetterQueue\`Optional \`\`\`csharp public IQueue DeadLetterQueue { get; set; } \`\`\` - *Type:* Amazon.CDK.AWS.SQS.IQueue - *Default:* SQS queue with 14 day retention period if \`deadLetterQueueEnabled\` is \`true\` The SQS queue to use if DLQ is enabled. --- ##### \`DeadLetterQueueEnabled\`Optional \`\`\`csharp public bool DeadLetterQueueEnabled { get; set; } \`\`\` - *Type:* bool - *Default:* false unless \`deadLetterQueue\` is set, which implies DLQ is enabled. Enabled DLQ. If \`deadLetterQueue\` is undefined, an SQS queue with default options will be defined for your Function. --- ##### \`Description\`Optional \`\`\`csharp public string Description { get; set; } \`\`\` - *Type:* string - *Default:* No description. A description of the function. --- ##### \`Environment\`Optional \`\`\`csharp public System.Collections.Generic.IDictionary Environment { get; set; } \`\`\` - *Type:* System.Collections.Generic.IDictionary - *Default:* No environment variables. Key-value pairs that Lambda caches and makes available for your Lambda functions. Use environment variables to apply configuration changes, such as test and production environment configurations, without changing your Lambda function source code. --- ##### \`EnvironmentEncryption\`Optional \`\`\`csharp public IKey EnvironmentEncryption { get; set; } \`\`\` - *Type:* Amazon.CDK.AWS.KMS.IKey - *Default:* AWS Lambda creates and uses an AWS managed customer master key (CMK). The AWS KMS key that's used to encrypt your function's environment variables. --- ##### \`Events\`Optional \`\`\`csharp public IEventSource[] Events { get; set; } \`\`\` - *Type:* Amazon.CDK.AWS.Lambda.IEventSource[] - *Default:* No event sources. Event sources for this function. You can also add event sources using \`addEventSource\`. --- ##### \`Filesystem\`Optional \`\`\`csharp public FileSystem Filesystem { get; set; } \`\`\` - *Type:* Amazon.CDK.AWS.Lambda.FileSystem - *Default:* will not mount any filesystem The filesystem configuration for the lambda function. --- ##### \`FunctionName\`Optional \`\`\`csharp public string FunctionName { get; set; } \`\`\` - *Type:* string - *Default:* AWS CloudFormation generates a unique physical ID and uses that ID for the function's name. For more information, see Name Type. A name for the function. --- ##### \`InitialPolicy\`Optional \`\`\`csharp public PolicyStatement[] InitialPolicy { get; set; } \`\`\` - *Type:* Amazon.CDK.AWS.IAM.PolicyStatement[] - *Default:* No policy statements are added to the created Lambda role. Initial policy statements to add to the created Lambda Role. You can call \`addToRolePolicy\` to the created lambda to add statements post creation. --- ##### \`InsightsVersion\`Optional \`\`\`csharp public LambdaInsightsVersion InsightsVersion { get; set; } \`\`\` - *Type:* Amazon.CDK.AWS.Lambda.LambdaInsightsVersion - *Default:* No Lambda Insights Specify the version of CloudWatch Lambda insights to use for monitoring. > [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Lambda-Insights.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Lambda-Insights.html) --- ##### \`Layers\`Optional \`\`\`csharp public ILayerVersion[] Layers { get; set; } \`\`\` - *Type:* Amazon.CDK.AWS.Lambda.ILayerVersion[] - *Default:* No layers. A list of layers to add to the function's execution environment. You can configure your Lambda function to pull in additional code during initialization in the form of layers. Layers are packages of libraries or other dependencies that can be used by multiple functions. --- ##### \`LogRetention\`Optional \`\`\`csharp public RetentionDays LogRetention { get; set; } \`\`\` - *Type:* Amazon.CDK.AWS.Logs.RetentionDays - *Default:* logs.RetentionDays.INFINITE The number of days log events are kept in CloudWatch Logs. When updating this property, unsetting it doesn't remove the log retention policy. To remove the retention policy, set the value to \`INFINITE\`. --- ##### \`LogRetentionRetryOptions\`Optional \`\`\`csharp public LogRetentionRetryOptions LogRetentionRetryOptions { get; set; } \`\`\` - *Type:* Amazon.CDK.AWS.Lambda.LogRetentionRetryOptions - *Default:* Default AWS SDK retry options. When log retention is specified, a custom resource attempts to create the CloudWatch log group. These options control the retry policy when interacting with CloudWatch APIs. --- ##### \`LogRetentionRole\`Optional \`\`\`csharp public IRole LogRetentionRole { get; set; } \`\`\` - *Type:* Amazon.CDK.AWS.IAM.IRole - *Default:* A new role is created. The IAM role for the Lambda function associated with the custom resource that sets the retention policy. --- ##### \`MemorySize\`Optional \`\`\`csharp public double MemorySize { get; set; } \`\`\` - *Type:* double - *Default:* 128 The amount of memory, in MB, that is allocated to your Lambda function. Lambda uses this value to proportionally allocate the amount of CPU power. For more information, see Resource Model in the AWS Lambda Developer Guide. --- ##### \`Profiling\`Optional \`\`\`csharp public bool Profiling { get; set; } \`\`\` - *Type:* bool - *Default:* No profiling. Enable profiling. > [https://docs.aws.amazon.com/codeguru/latest/profiler-ug/setting-up-lambda.html](https://docs.aws.amazon.com/codeguru/latest/profiler-ug/setting-up-lambda.html) --- ##### \`ProfilingGroup\`Optional \`\`\`csharp public IProfilingGroup ProfilingGroup { get; set; } \`\`\` - *Type:* Amazon.CDK.AWS.CodeGuruProfiler.IProfilingGroup - *Default:* A new profiling group will be created if \`profiling\` is set. Profiling Group. > [https://docs.aws.amazon.com/codeguru/latest/profiler-ug/setting-up-lambda.html](https://docs.aws.amazon.com/codeguru/latest/profiler-ug/setting-up-lambda.html) --- ##### \`ReservedConcurrentExecutions\`Optional \`\`\`csharp public double ReservedConcurrentExecutions { get; set; } \`\`\` - *Type:* double - *Default:* No specific limit - account limit. The maximum of concurrent executions you want to reserve for the function. > [https://docs.aws.amazon.com/lambda/latest/dg/concurrent-executions.html](https://docs.aws.amazon.com/lambda/latest/dg/concurrent-executions.html) --- ##### \`Role\`Optional \`\`\`csharp public IRole Role { get; set; } \`\`\` - *Type:* Amazon.CDK.AWS.IAM.IRole - *Default:* A unique role will be generated for this lambda function. Both supplied and generated roles can always be changed by calling \`addToRolePolicy\`. Lambda execution role. This is the role that will be assumed by the function upon execution. It controls the permissions that the function will have. The Role must be assumable by the 'lambda.amazonaws.com' service principal. The default Role automatically has permissions granted for Lambda execution. If you provide a Role, you must add the relevant AWS managed policies yourself. The relevant managed policies are "service-role/AWSLambdaBasicExecutionRole" and "service-role/AWSLambdaVPCAccessExecutionRole". --- ##### ~~\`SecurityGroup\`~~Optional - *Deprecated:* - This property is deprecated, use securityGroups instead \`\`\`csharp public ISecurityGroup SecurityGroup { get; set; } \`\`\` - *Type:* Amazon.CDK.AWS.EC2.ISecurityGroup - *Default:* If the function is placed within a VPC and a security group is not specified, either by this or securityGroups prop, a dedicated security group will be created for this function. What security group to associate with the Lambda's network interfaces. This property is being deprecated, consider using securityGroups instead. Only used if 'vpc' is supplied. Use securityGroups property instead. Function constructor will throw an error if both are specified. --- ##### \`SecurityGroups\`Optional \`\`\`csharp public ISecurityGroup[] SecurityGroups { get; set; } \`\`\` - *Type:* Amazon.CDK.AWS.EC2.ISecurityGroup[] - *Default:* If the function is placed within a VPC and a security group is not specified, either by this or securityGroup prop, a dedicated security group will be created for this function. The list of security groups to associate with the Lambda's network interfaces. Only used if 'vpc' is supplied. --- ##### \`Timeout\`Optional \`\`\`csharp public Duration Timeout { get; set; } \`\`\` - *Type:* Amazon.CDK.Duration - *Default:* Duration.seconds(3) The function execution time (in seconds) after which Lambda terminates the function. Because the execution time affects cost, set this value based on the function's expected execution time. --- ##### \`Tracing\`Optional \`\`\`csharp public Tracing Tracing { get; set; } \`\`\` - *Type:* Amazon.CDK.AWS.Lambda.Tracing - *Default:* Tracing.Disabled Enable AWS X-Ray Tracing for Lambda Function. --- ##### \`Vpc\`Optional \`\`\`csharp public IVpc Vpc { get; set; } \`\`\` - *Type:* Amazon.CDK.AWS.EC2.IVpc - *Default:* Function is not placed within a VPC. VPC network to place Lambda network interfaces. Specify this if the Lambda function needs to access resources in a VPC. --- ##### \`VpcSubnets\`Optional \`\`\`csharp public SubnetSelection VpcSubnets { get; set; } \`\`\` - *Type:* Amazon.CDK.AWS.EC2.SubnetSelection - *Default:* the Vpc default strategy if not specified Where to place the network interfaces within the VPC. Only used if 'vpc' is supplied. Note: internet access for Lambdas requires a NAT gateway, so picking Public subnets is not allowed. --- ##### \`Code\`Required \`\`\`csharp public Code Code { get; set; } \`\`\` - *Type:* Amazon.CDK.AWS.Lambda.Code The source code of your Lambda function. You can point to a file in an Amazon Simple Storage Service (Amazon S3) bucket or specify your source code as inline text. --- ##### \`Handler\`Required \`\`\`csharp public string Handler { get; set; } \`\`\` - *Type:* string The name of the method within your code that Lambda calls to execute your function. The format includes the file name. It can also include namespaces and other qualifiers, depending on the runtime. For more information, see https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-features.html#gettingstarted-features-programmingmodel. Use \`Handler.FROM_IMAGE\` when defining a function from a Docker image. NOTE: If you specify your source code as inline text by specifying the ZipFile property within the Code property, specify index.function_name as the handler. --- ##### \`Runtime\`Required \`\`\`csharp public Runtime Runtime { get; set; } \`\`\` - *Type:* Amazon.CDK.AWS.Lambda.Runtime The runtime environment for the Lambda function that you are uploading. For valid values, see the Runtime property in the AWS Lambda Developer Guide. Use \`Runtime.FROM_IMAGE\` when when defining a function from a Docker image. --- ##### \`StackId\`Optional \`\`\`csharp public string StackId { get; set; } \`\`\` - *Type:* string - *Default:* \`edge-lambda-stack-\${region}\` The stack ID of Lambda@Edge function. --- " `; exports[`submodules without an explicit name go 1`] = ` "# AWS Region-Specific Information Directory --- ![cdk-constructs: Stable](https://img.shields.io/badge/cdk--constructs-stable-success.svg?style=for-the-badge) --- ## Usage Some information used in CDK Applications differs from one AWS region to another, such as service principals used in IAM policies, S3 static website endpoints, ... ### The \`RegionInfo\` class The library offers a simple interface to obtain region specific information in the form of the \`RegionInfo\` class. This is the preferred way to interact with the regional information database: \`\`\`ts import { RegionInfo } from 'aws-cdk-lib/region-info'; // Get the information for "eu-west-1": const region = RegionInfo.get('eu-west-1'); // Access attributes: region.s3StaticWebsiteEndpoint; // s3-website-eu-west-1.amazonaws.com region.servicePrincipal('logs.amazonaws.com'); // logs.eu-west-1.amazonaws.com \`\`\` The \`RegionInfo\` layer is built on top of the Low-Level API, which is described below and can be used to register additional data, including user-defined facts that are not available through the \`RegionInfo\` interface. ### Low-Level API This library offers a primitive database of such information so that CDK constructs can easily access regional information. The \`FactName\` class provides a list of known fact names, which can then be used with the \`RegionInfo\` to retrieve a particular value: \`\`\`ts import { region_info as regionInfo } from 'aws-cdk-lib'; const codeDeployPrincipal = regionInfo.Fact.find('us-east-1', regionInfo.FactName.servicePrincipal('codedeploy.amazonaws.com')); // => codedeploy.us-east-1.amazonaws.com const staticWebsite = regionInfo.Fact.find('ap-northeast-1', regionInfo.FactName.S3_STATIC_WEBSITE_ENDPOINT); // => s3-website-ap-northeast-1.amazonaws.com \`\`\` ## Supplying new or missing information As new regions are released, it might happen that a particular fact you need is missing from the library. In such cases, the \`Fact.register\` method can be used to inject FactName into the database: \`\`\`ts regionInfo.Fact.register({ region: 'bermuda-triangle-1', name: regionInfo.FactName.servicePrincipal('s3.amazonaws.com'), value: 's3-website.bermuda-triangle-1.nowhere.com', }); \`\`\` ## Overriding incorrect information In the event information provided by the library is incorrect, it can be overridden using the same \`Fact.register\` method demonstrated above, simply adding an extra boolean argument: \`\`\`ts regionInfo.Fact.register({ region: 'us-east-1', name: regionInfo.FactName.servicePrincipal('service.amazonaws.com'), value: 'the-correct-principal.amazonaws.com', }, true /* Allow overriding information */); \`\`\` If you happen to have stumbled upon incorrect data built into this library, it is always a good idea to report your findings in a [GitHub issue], so we can fix it for everyone else! [GitHub issue]: https://github.com/aws/aws-cdk/issues --- This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. # API Reference ## Classes ### Default Provides default values for certain regional information points. #### Static Functions | **Name** | **Description** | | --- | --- | | ServicePrincipal | Computes a "standard" AWS Service principal for a given service, region and suffix. | --- ##### \`ServicePrincipal\` \`\`\`go import "github.com/aws/aws-cdk-go/awscdk/v2/regioninfo" regioninfo.Default_ServicePrincipal(service *string, region *string, urlSuffix *string) *string \`\`\` Computes a "standard" AWS Service principal for a given service, region and suffix. This is useful for example when you need to compute a service principal name, but you do not have a synthesize-time region literal available (so all you have is \`{ "Ref": "AWS::Region" }\`). This way you get the same defaulting behavior that is normally used for built-in data. ###### \`service\`Required - *Type:* *string the name of the service (s3, s3.amazonaws.com, ...). --- ###### \`region\`Required - *Type:* *string the region in which the service principal is needed. --- ###### \`urlSuffix\`Required - *Type:* *string the URL suffix for the partition in which the region is located. --- #### Constants | **Name** | **Type** | **Description** | | --- | --- | --- | | VpcEndpointServiceNamePrefix | *string | The default value for a VPC Endpoint Service name prefix, useful if you do not have a synthesize-time region literal available (all you have is \`{ "Ref": "AWS::Region" }\`). | --- ##### \`VpcEndpointServiceNamePrefix\`Required \`\`\`go func VpcEndpointServiceNamePrefix() *string \`\`\` - *Type:* *string The default value for a VPC Endpoint Service name prefix, useful if you do not have a synthesize-time region literal available (all you have is \`{ "Ref": "AWS::Region" }\`). --- ### Fact A database of regional information. #### Static Functions | **Name** | **Description** | | --- | --- | | Find | Retrieves a fact from this Fact database. | | Register | Registers a new fact in this Fact database. | | RequireFact | Retrieve a fact from the Fact database. | | Unregister | Removes a fact from the database. | --- ##### \`Find\` \`\`\`go import "github.com/aws/aws-cdk-go/awscdk/v2/regioninfo" regioninfo.Fact_Find(region *string, name *string) *string \`\`\` Retrieves a fact from this Fact database. ###### \`region\`Required - *Type:* *string the name of the region (e.g: \`us-east-1\`). --- ###### \`name\`Required - *Type:* *string the name of the fact being looked up (see the \`FactName\` class for details). --- ##### \`Register\` \`\`\`go import "github.com/aws/aws-cdk-go/awscdk/v2/regioninfo" regioninfo.Fact_Register(fact IFact, allowReplacing *bool) \`\`\` Registers a new fact in this Fact database. ###### \`fact\`Required - *Type:* IFact the new fact to be registered. --- ###### \`allowReplacing\`Optional - *Type:* *bool whether new facts can replace existing facts or not. --- ##### \`RequireFact\` \`\`\`go import "github.com/aws/aws-cdk-go/awscdk/v2/regioninfo" regioninfo.Fact_RequireFact(region *string, name *string) *string \`\`\` Retrieve a fact from the Fact database. (retrieval will fail if the specified region or fact name does not exist.) ###### \`region\`Required - *Type:* *string the name of the region (e.g: \`us-east-1\`). --- ###### \`name\`Required - *Type:* *string the name of the fact being looked up (see the \`FactName\` class for details). --- ##### \`Unregister\` \`\`\`go import "github.com/aws/aws-cdk-go/awscdk/v2/regioninfo" regioninfo.Fact_Unregister(region *string, name *string, value *string) \`\`\` Removes a fact from the database. ###### \`region\`Required - *Type:* *string the region for which the fact is to be removed. --- ###### \`name\`Required - *Type:* *string the name of the fact to remove. --- ###### \`value\`Optional - *Type:* *string the value that should be removed (removal will fail if the value is specified, but does not match the current stored value). --- #### Properties | **Name** | **Type** | **Description** | | --- | --- | --- | | Regions | *[]*string | *No description.* | --- ##### \`Regions\`Required \`\`\`go func Regions() *[]*string \`\`\` - *Type:* *[]*string --- ### FactName All standardized fact names. #### Initializers \`\`\`go import "github.com/aws/aws-cdk-go/awscdk/v2/regioninfo" regioninfo.NewFactName() FactName \`\`\` | **Name** | **Type** | **Description** | | --- | --- | --- | --- #### Static Functions | **Name** | **Description** | | --- | --- | | ServicePrincipal | The name of the regional service principal for a given service. | --- ##### \`ServicePrincipal\` \`\`\`go import "github.com/aws/aws-cdk-go/awscdk/v2/regioninfo" regioninfo.FactName_ServicePrincipal(service *string) *string \`\`\` The name of the regional service principal for a given service. ###### \`service\`Required - *Type:* *string the service name, either simple (e.g: \`s3\`, \`codedeploy\`) or qualified (e.g: \`s3.amazonaws.com\`). The \`.amazonaws.com\` and \`.amazonaws.com.cn\` domains are stripped from service names, so they are canonicalized in that respect. --- #### Constants | **Name** | **Type** | **Description** | | --- | --- | --- | | AppmeshEcrAccount | *string | The ID of the AWS account that owns the public ECR repository that contains the AWS App Mesh Envoy Proxy images in a given region. | | CdkMetadataResourceAvailable | *string | Whether the AWS::CDK::Metadata CloudFormation Resource is available in-region or not. | | DlcRepositoryAccount | *string | The ID of the AWS account that owns the public ECR repository that contains the AWS Deep Learning Containers images in a given region. | | DomainSuffix | *string | The domain suffix for a region (e.g: 'amazonaws.com\`). | | Elbv2Account | *string | The account for ELBv2 in this region. | | Partition | *string | The name of the partition for a region (e.g: 'aws', 'aws-cn', ...). | | S3StaticWebsiteEndpoint | *string | The endpoint used for hosting S3 static websites. | | S3StaticWebsiteZone53HostedZoneId | *string | The endpoint used for aliasing S3 static websites in Route 53. | | VpcEndpointServiceNamePrefix | *string | The prefix for VPC Endpoint Service names, cn.com.amazonaws.vpce for China regions, com.amazonaws.vpce otherwise. | --- ##### \`AppmeshEcrAccount\`Required \`\`\`go func AppmeshEcrAccount() *string \`\`\` - *Type:* *string The ID of the AWS account that owns the public ECR repository that contains the AWS App Mesh Envoy Proxy images in a given region. --- ##### \`CdkMetadataResourceAvailable\`Required \`\`\`go func CdkMetadataResourceAvailable() *string \`\`\` - *Type:* *string Whether the AWS::CDK::Metadata CloudFormation Resource is available in-region or not. The value is a boolean modelled as \`YES\` or \`NO\`. --- ##### \`DlcRepositoryAccount\`Required \`\`\`go func DlcRepositoryAccount() *string \`\`\` - *Type:* *string The ID of the AWS account that owns the public ECR repository that contains the AWS Deep Learning Containers images in a given region. --- ##### \`DomainSuffix\`Required \`\`\`go func DomainSuffix() *string \`\`\` - *Type:* *string The domain suffix for a region (e.g: 'amazonaws.com\`). --- ##### \`Elbv2Account\`Required \`\`\`go func Elbv2Account() *string \`\`\` - *Type:* *string The account for ELBv2 in this region. --- ##### \`Partition\`Required \`\`\`go func Partition() *string \`\`\` - *Type:* *string The name of the partition for a region (e.g: 'aws', 'aws-cn', ...). --- ##### \`S3StaticWebsiteEndpoint\`Required \`\`\`go func S3StaticWebsiteEndpoint() *string \`\`\` - *Type:* *string The endpoint used for hosting S3 static websites. --- ##### \`S3StaticWebsiteZone53HostedZoneId\`Required \`\`\`go func S3StaticWebsiteZone53HostedZoneId() *string \`\`\` - *Type:* *string The endpoint used for aliasing S3 static websites in Route 53. --- ##### \`VpcEndpointServiceNamePrefix\`Required \`\`\`go func VpcEndpointServiceNamePrefix() *string \`\`\` - *Type:* *string The prefix for VPC Endpoint Service names, cn.com.amazonaws.vpce for China regions, com.amazonaws.vpce otherwise. --- ### RegionInfo Information pertaining to an AWS region. #### Methods | **Name** | **Description** | | --- | --- | | ServicePrincipal | The name of the service principal for a given service in this region. | --- ##### \`ServicePrincipal\` \`\`\`go func ServicePrincipal(service *string) *string \`\`\` The name of the service principal for a given service in this region. ###### \`service\`Required - *Type:* *string the service name (e.g: s3.amazonaws.com). --- #### Static Functions | **Name** | **Description** | | --- | --- | | Get | Obtain region info for a given region name. | | RegionMap | Retrieves a collection of all fact values for all regions that fact is defined in. | --- ##### \`Get\` \`\`\`go import "github.com/aws/aws-cdk-go/awscdk/v2/regioninfo" regioninfo.RegionInfo_Get(name *string) RegionInfo \`\`\` Obtain region info for a given region name. ###### \`name\`Required - *Type:* *string the name of the region (e.g: us-east-1). --- ##### \`RegionMap\` \`\`\`go import "github.com/aws/aws-cdk-go/awscdk/v2/regioninfo" regioninfo.RegionInfo_RegionMap(factName *string) *map[string]*string \`\`\` Retrieves a collection of all fact values for all regions that fact is defined in. ###### \`factName\`Required - *Type:* *string the name of the fact to retrieve values for. For a list of common fact names, see the FactName class --- #### Properties | **Name** | **Type** | **Description** | | --- | --- | --- | | Regions | *[]RegionInfo | *No description.* | | CdkMetadataResourceAvailable | *bool | Whether the \`AWS::CDK::Metadata\` CloudFormation Resource is available in this region or not. | | Name | *string | *No description.* | | AppMeshRepositoryAccount | *string | The ID of the AWS account that owns the public ECR repository that contains the AWS App Mesh Envoy Proxy images in a given region. | | DlcRepositoryAccount | *string | The ID of the AWS account that owns the public ECR repository containing the AWS Deep Learning Containers images in this region. | | DomainSuffix | *string | The domain name suffix (e.g: amazonaws.com) for this region. | | Elbv2Account | *string | The account ID for ELBv2 in this region. | | Partition | *string | The name of the ARN partition for this region (e.g: aws). | | S3StaticWebsiteEndpoint | *string | The endpoint used by S3 static website hosting in this region (e.g: s3-static-website-us-east-1.amazonaws.com). | | S3StaticWebsiteHostedZoneId | *string | The hosted zone ID used by Route 53 to alias a S3 static website in this region (e.g: Z2O1EMRO9K5GLX). | | VpcEndpointServiceNamePrefix | *string | The prefix for VPC Endpoint Service names, cn.com.amazonaws.vpce for China regions, com.amazonaws.vpce otherwise. | --- ##### \`Regions\`Required \`\`\`go func Regions() *[]RegionInfo \`\`\` - *Type:* *[]RegionInfo --- ##### \`CdkMetadataResourceAvailable\`Required \`\`\`go func CdkMetadataResourceAvailable() *bool \`\`\` - *Type:* *bool Whether the \`AWS::CDK::Metadata\` CloudFormation Resource is available in this region or not. --- ##### \`Name\`Required \`\`\`go func Name() *string \`\`\` - *Type:* *string --- ##### \`AppMeshRepositoryAccount\`Optional \`\`\`go func AppMeshRepositoryAccount() *string \`\`\` - *Type:* *string The ID of the AWS account that owns the public ECR repository that contains the AWS App Mesh Envoy Proxy images in a given region. --- ##### \`DlcRepositoryAccount\`Optional \`\`\`go func DlcRepositoryAccount() *string \`\`\` - *Type:* *string The ID of the AWS account that owns the public ECR repository containing the AWS Deep Learning Containers images in this region. --- ##### \`DomainSuffix\`Optional \`\`\`go func DomainSuffix() *string \`\`\` - *Type:* *string The domain name suffix (e.g: amazonaws.com) for this region. --- ##### \`Elbv2Account\`Optional \`\`\`go func Elbv2Account() *string \`\`\` - *Type:* *string The account ID for ELBv2 in this region. --- ##### \`Partition\`Optional \`\`\`go func Partition() *string \`\`\` - *Type:* *string The name of the ARN partition for this region (e.g: aws). --- ##### \`S3StaticWebsiteEndpoint\`Optional \`\`\`go func S3StaticWebsiteEndpoint() *string \`\`\` - *Type:* *string The endpoint used by S3 static website hosting in this region (e.g: s3-static-website-us-east-1.amazonaws.com). --- ##### \`S3StaticWebsiteHostedZoneId\`Optional \`\`\`go func S3StaticWebsiteHostedZoneId() *string \`\`\` - *Type:* *string The hosted zone ID used by Route 53 to alias a S3 static website in this region (e.g: Z2O1EMRO9K5GLX). --- ##### \`VpcEndpointServiceNamePrefix\`Optional \`\`\`go func VpcEndpointServiceNamePrefix() *string \`\`\` - *Type:* *string The prefix for VPC Endpoint Service names, cn.com.amazonaws.vpce for China regions, com.amazonaws.vpce otherwise. --- ## Protocols ### IFact - *Implemented By:* IFact A fact that can be registered about a particular region. #### Properties | **Name** | **Type** | **Description** | | --- | --- | --- | | Name | *string | The name of this fact. | | Region | *string | The region for which this fact applies. | | Value | *string | The value of this fact. | --- ##### \`Name\`Required \`\`\`go func Name() *string \`\`\` - *Type:* *string The name of this fact. Standardized values are provided by the \`Facts\` class. --- ##### \`Region\`Required \`\`\`go func Region() *string \`\`\` - *Type:* *string The region for which this fact applies. --- ##### \`Value\`Optional \`\`\`go func Value() *string \`\`\` - *Type:* *string The value of this fact. --- " `; exports[`submodules without an explicit name java 1`] = ` "# API Reference ## Constructs ### EdgeFunction - *Implements:* software.amazon.awscdk.services.lambda.IVersion A Lambda@Edge function. Convenience resource for requesting a Lambda function in the 'us-east-1' region for use with Lambda@Edge. Implements several restrictions enforced by Lambda@Edge. Note that this construct requires that the 'us-east-1' region has been bootstrapped. See https://docs.aws.amazon.com/cdk/latest/guide/bootstrapping.html or 'cdk bootstrap --help' for options. #### Initializers \`\`\`java import software.amazon.awscdk.services.cloudfront.experimental.EdgeFunction; EdgeFunction.Builder.create(Construct scope, java.lang.String id) // .maxEventAge(Duration) // .onFailure(IDestination) // .onSuccess(IDestination) // .retryAttempts(java.lang.Number) // .allowAllOutbound(java.lang.Boolean) // .allowPublicSubnet(java.lang.Boolean) // .architectures(java.util.List) // .codeSigningConfig(ICodeSigningConfig) // .currentVersionOptions(VersionOptions) // .deadLetterQueue(IQueue) // .deadLetterQueueEnabled(java.lang.Boolean) // .description(java.lang.String) // .environment(java.util.Map) // .environmentEncryption(IKey) // .events(java.util.List) // .filesystem(FileSystem) // .functionName(java.lang.String) // .initialPolicy(java.util.List) // .insightsVersion(LambdaInsightsVersion) // .layers(java.util.List) // .logRetention(RetentionDays) // .logRetentionRetryOptions(LogRetentionRetryOptions) // .logRetentionRole(IRole) // .memorySize(java.lang.Number) // .profiling(java.lang.Boolean) // .profilingGroup(IProfilingGroup) // .reservedConcurrentExecutions(java.lang.Number) // .role(IRole) // .securityGroup(ISecurityGroup) // .securityGroups(java.util.List) // .timeout(Duration) // .tracing(Tracing) // .vpc(IVpc) // .vpcSubnets(SubnetSelection) .code(Code) .handler(java.lang.String) .runtime(Runtime) // .stackId(java.lang.String) .build(); \`\`\` | **Name** | **Type** | **Description** | | --- | --- | --- | | scope | software.constructs.Construct | *No description.* | | id | java.lang.String | *No description.* | | maxEventAge | software.amazon.awscdk.core.Duration | The maximum age of a request that Lambda sends to a function for processing. | | onFailure | software.amazon.awscdk.services.lambda.IDestination | The destination for failed invocations. | | onSuccess | software.amazon.awscdk.services.lambda.IDestination | The destination for successful invocations. | | retryAttempts | java.lang.Number | The maximum number of times to retry when the function returns an error. | | allowAllOutbound | java.lang.Boolean | Whether to allow the Lambda to send all network traffic. | | allowPublicSubnet | java.lang.Boolean | Lambda Functions in a public subnet can NOT access the internet. | | architectures | java.util.List | The system architectures compatible with this lambda function. | | codeSigningConfig | software.amazon.awscdk.services.lambda.ICodeSigningConfig | Code signing config associated with this function. | | currentVersionOptions | software.amazon.awscdk.services.lambda.VersionOptions | Options for the \`lambda.Version\` resource automatically created by the \`fn.currentVersion\` method. | | deadLetterQueue | software.amazon.awscdk.services.sqs.IQueue | The SQS queue to use if DLQ is enabled. | | deadLetterQueueEnabled | java.lang.Boolean | Enabled DLQ. | | description | java.lang.String | A description of the function. | | environment | java.util.Map | Key-value pairs that Lambda caches and makes available for your Lambda functions. | | environmentEncryption | software.amazon.awscdk.services.kms.IKey | The AWS KMS key that's used to encrypt your function's environment variables. | | events | java.util.List | Event sources for this function. | | filesystem | software.amazon.awscdk.services.lambda.FileSystem | The filesystem configuration for the lambda function. | | functionName | java.lang.String | A name for the function. | | initialPolicy | java.util.List | Initial policy statements to add to the created Lambda Role. | | insightsVersion | software.amazon.awscdk.services.lambda.LambdaInsightsVersion | Specify the version of CloudWatch Lambda insights to use for monitoring. | | layers | java.util.List | A list of layers to add to the function's execution environment. | | logRetention | software.amazon.awscdk.services.logs.RetentionDays | The number of days log events are kept in CloudWatch Logs. | | logRetentionRetryOptions | software.amazon.awscdk.services.lambda.LogRetentionRetryOptions | When log retention is specified, a custom resource attempts to create the CloudWatch log group. | | logRetentionRole | software.amazon.awscdk.services.iam.IRole | The IAM role for the Lambda function associated with the custom resource that sets the retention policy. | | memorySize | java.lang.Number | The amount of memory, in MB, that is allocated to your Lambda function. | | profiling | java.lang.Boolean | Enable profiling. | | profilingGroup | software.amazon.awscdk.services.codeguruprofiler.IProfilingGroup | Profiling Group. | | reservedConcurrentExecutions | java.lang.Number | The maximum of concurrent executions you want to reserve for the function. | | role | software.amazon.awscdk.services.iam.IRole | Lambda execution role. | | securityGroup | software.amazon.awscdk.services.ec2.ISecurityGroup | What security group to associate with the Lambda's network interfaces. This property is being deprecated, consider using securityGroups instead. | | securityGroups | java.util.List | The list of security groups to associate with the Lambda's network interfaces. | | timeout | software.amazon.awscdk.core.Duration | The function execution time (in seconds) after which Lambda terminates the function. | | tracing | software.amazon.awscdk.services.lambda.Tracing | Enable AWS X-Ray Tracing for Lambda Function. | | vpc | software.amazon.awscdk.services.ec2.IVpc | VPC network to place Lambda network interfaces. | | vpcSubnets | software.amazon.awscdk.services.ec2.SubnetSelection | Where to place the network interfaces within the VPC. | | code | software.amazon.awscdk.services.lambda.Code | The source code of your Lambda function. | | handler | java.lang.String | The name of the method within your code that Lambda calls to execute your function. | | runtime | software.amazon.awscdk.services.lambda.Runtime | The runtime environment for the Lambda function that you are uploading. | | stackId | java.lang.String | The stack ID of Lambda@Edge function. | --- ##### \`scope\`Required - *Type:* software.constructs.Construct --- ##### \`id\`Required - *Type:* java.lang.String --- ##### \`maxEventAge\`Optional - *Type:* software.amazon.awscdk.core.Duration - *Default:* Duration.hours(6) The maximum age of a request that Lambda sends to a function for processing. Minimum: 60 seconds Maximum: 6 hours --- ##### \`onFailure\`Optional - *Type:* software.amazon.awscdk.services.lambda.IDestination - *Default:* no destination The destination for failed invocations. --- ##### \`onSuccess\`Optional - *Type:* software.amazon.awscdk.services.lambda.IDestination - *Default:* no destination The destination for successful invocations. --- ##### \`retryAttempts\`Optional - *Type:* java.lang.Number - *Default:* 2 The maximum number of times to retry when the function returns an error. Minimum: 0 Maximum: 2 --- ##### \`allowAllOutbound\`Optional - *Type:* java.lang.Boolean - *Default:* true Whether to allow the Lambda to send all network traffic. If set to false, you must individually add traffic rules to allow the Lambda to connect to network targets. --- ##### \`allowPublicSubnet\`Optional - *Type:* java.lang.Boolean - *Default:* false Lambda Functions in a public subnet can NOT access the internet. Use this property to acknowledge this limitation and still place the function in a public subnet. > [https://stackoverflow.com/questions/52992085/why-cant-an-aws-lambda-function-inside-a-public-subnet-in-a-vpc-connect-to-the/52994841#52994841](https://stackoverflow.com/questions/52992085/why-cant-an-aws-lambda-function-inside-a-public-subnet-in-a-vpc-connect-to-the/52994841#52994841) --- ##### \`architectures\`Optional - *Type:* java.util.List - *Default:* [Architecture.X86_64] The system architectures compatible with this lambda function. --- ##### \`codeSigningConfig\`Optional - *Type:* software.amazon.awscdk.services.lambda.ICodeSigningConfig - *Default:* Not Sign the Code Code signing config associated with this function. --- ##### \`currentVersionOptions\`Optional - *Type:* software.amazon.awscdk.services.lambda.VersionOptions - *Default:* default options as described in \`VersionOptions\` Options for the \`lambda.Version\` resource automatically created by the \`fn.currentVersion\` method. --- ##### \`deadLetterQueue\`Optional - *Type:* software.amazon.awscdk.services.sqs.IQueue - *Default:* SQS queue with 14 day retention period if \`deadLetterQueueEnabled\` is \`true\` The SQS queue to use if DLQ is enabled. --- ##### \`deadLetterQueueEnabled\`Optional - *Type:* java.lang.Boolean - *Default:* false unless \`deadLetterQueue\` is set, which implies DLQ is enabled. Enabled DLQ. If \`deadLetterQueue\` is undefined, an SQS queue with default options will be defined for your Function. --- ##### \`description\`Optional - *Type:* java.lang.String - *Default:* No description. A description of the function. --- ##### \`environment\`Optional - *Type:* java.util.Map - *Default:* No environment variables. Key-value pairs that Lambda caches and makes available for your Lambda functions. Use environment variables to apply configuration changes, such as test and production environment configurations, without changing your Lambda function source code. --- ##### \`environmentEncryption\`Optional - *Type:* software.amazon.awscdk.services.kms.IKey - *Default:* AWS Lambda creates and uses an AWS managed customer master key (CMK). The AWS KMS key that's used to encrypt your function's environment variables. --- ##### \`events\`Optional - *Type:* java.util.List - *Default:* No event sources. Event sources for this function. You can also add event sources using \`addEventSource\`. --- ##### \`filesystem\`Optional - *Type:* software.amazon.awscdk.services.lambda.FileSystem - *Default:* will not mount any filesystem The filesystem configuration for the lambda function. --- ##### \`functionName\`Optional - *Type:* java.lang.String - *Default:* AWS CloudFormation generates a unique physical ID and uses that ID for the function's name. For more information, see Name Type. A name for the function. --- ##### \`initialPolicy\`Optional - *Type:* java.util.List - *Default:* No policy statements are added to the created Lambda role. Initial policy statements to add to the created Lambda Role. You can call \`addToRolePolicy\` to the created lambda to add statements post creation. --- ##### \`insightsVersion\`Optional - *Type:* software.amazon.awscdk.services.lambda.LambdaInsightsVersion - *Default:* No Lambda Insights Specify the version of CloudWatch Lambda insights to use for monitoring. > [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Lambda-Insights.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Lambda-Insights.html) --- ##### \`layers\`Optional - *Type:* java.util.List - *Default:* No layers. A list of layers to add to the function's execution environment. You can configure your Lambda function to pull in additional code during initialization in the form of layers. Layers are packages of libraries or other dependencies that can be used by multiple functions. --- ##### \`logRetention\`Optional - *Type:* software.amazon.awscdk.services.logs.RetentionDays - *Default:* logs.RetentionDays.INFINITE The number of days log events are kept in CloudWatch Logs. When updating this property, unsetting it doesn't remove the log retention policy. To remove the retention policy, set the value to \`INFINITE\`. --- ##### \`logRetentionRetryOptions\`Optional - *Type:* software.amazon.awscdk.services.lambda.LogRetentionRetryOptions - *Default:* Default AWS SDK retry options. When log retention is specified, a custom resource attempts to create the CloudWatch log group. These options control the retry policy when interacting with CloudWatch APIs. --- ##### \`logRetentionRole\`Optional - *Type:* software.amazon.awscdk.services.iam.IRole - *Default:* A new role is created. The IAM role for the Lambda function associated with the custom resource that sets the retention policy. --- ##### \`memorySize\`Optional - *Type:* java.lang.Number - *Default:* 128 The amount of memory, in MB, that is allocated to your Lambda function. Lambda uses this value to proportionally allocate the amount of CPU power. For more information, see Resource Model in the AWS Lambda Developer Guide. --- ##### \`profiling\`Optional - *Type:* java.lang.Boolean - *Default:* No profiling. Enable profiling. > [https://docs.aws.amazon.com/codeguru/latest/profiler-ug/setting-up-lambda.html](https://docs.aws.amazon.com/codeguru/latest/profiler-ug/setting-up-lambda.html) --- ##### \`profilingGroup\`Optional - *Type:* software.amazon.awscdk.services.codeguruprofiler.IProfilingGroup - *Default:* A new profiling group will be created if \`profiling\` is set. Profiling Group. > [https://docs.aws.amazon.com/codeguru/latest/profiler-ug/setting-up-lambda.html](https://docs.aws.amazon.com/codeguru/latest/profiler-ug/setting-up-lambda.html) --- ##### \`reservedConcurrentExecutions\`Optional - *Type:* java.lang.Number - *Default:* No specific limit - account limit. The maximum of concurrent executions you want to reserve for the function. > [https://docs.aws.amazon.com/lambda/latest/dg/concurrent-executions.html](https://docs.aws.amazon.com/lambda/latest/dg/concurrent-executions.html) --- ##### \`role\`Optional - *Type:* software.amazon.awscdk.services.iam.IRole - *Default:* A unique role will be generated for this lambda function. Both supplied and generated roles can always be changed by calling \`addToRolePolicy\`. Lambda execution role. This is the role that will be assumed by the function upon execution. It controls the permissions that the function will have. The Role must be assumable by the 'lambda.amazonaws.com' service principal. The default Role automatically has permissions granted for Lambda execution. If you provide a Role, you must add the relevant AWS managed policies yourself. The relevant managed policies are "service-role/AWSLambdaBasicExecutionRole" and "service-role/AWSLambdaVPCAccessExecutionRole". --- ##### ~~\`securityGroup\`~~Optional - *Deprecated:* - This property is deprecated, use securityGroups instead - *Type:* software.amazon.awscdk.services.ec2.ISecurityGroup - *Default:* If the function is placed within a VPC and a security group is not specified, either by this or securityGroups prop, a dedicated security group will be created for this function. What security group to associate with the Lambda's network interfaces. This property is being deprecated, consider using securityGroups instead. Only used if 'vpc' is supplied. Use securityGroups property instead. Function constructor will throw an error if both are specified. --- ##### \`securityGroups\`Optional - *Type:* java.util.List - *Default:* If the function is placed within a VPC and a security group is not specified, either by this or securityGroup prop, a dedicated security group will be created for this function. The list of security groups to associate with the Lambda's network interfaces. Only used if 'vpc' is supplied. --- ##### \`timeout\`Optional - *Type:* software.amazon.awscdk.core.Duration - *Default:* Duration.seconds(3) The function execution time (in seconds) after which Lambda terminates the function. Because the execution time affects cost, set this value based on the function's expected execution time. --- ##### \`tracing\`Optional - *Type:* software.amazon.awscdk.services.lambda.Tracing - *Default:* Tracing.Disabled Enable AWS X-Ray Tracing for Lambda Function. --- ##### \`vpc\`Optional - *Type:* software.amazon.awscdk.services.ec2.IVpc - *Default:* Function is not placed within a VPC. VPC network to place Lambda network interfaces. Specify this if the Lambda function needs to access resources in a VPC. --- ##### \`vpcSubnets\`Optional - *Type:* software.amazon.awscdk.services.ec2.SubnetSelection - *Default:* the Vpc default strategy if not specified Where to place the network interfaces within the VPC. Only used if 'vpc' is supplied. Note: internet access for Lambdas requires a NAT gateway, so picking Public subnets is not allowed. --- ##### \`code\`Required - *Type:* software.amazon.awscdk.services.lambda.Code The source code of your Lambda function. You can point to a file in an Amazon Simple Storage Service (Amazon S3) bucket or specify your source code as inline text. --- ##### \`handler\`Required - *Type:* java.lang.String The name of the method within your code that Lambda calls to execute your function. The format includes the file name. It can also include namespaces and other qualifiers, depending on the runtime. For more information, see https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-features.html#gettingstarted-features-programmingmodel. Use \`Handler.FROM_IMAGE\` when defining a function from a Docker image. NOTE: If you specify your source code as inline text by specifying the ZipFile property within the Code property, specify index.function_name as the handler. --- ##### \`runtime\`Required - *Type:* software.amazon.awscdk.services.lambda.Runtime The runtime environment for the Lambda function that you are uploading. For valid values, see the Runtime property in the AWS Lambda Developer Guide. Use \`Runtime.FROM_IMAGE\` when when defining a function from a Docker image. --- ##### \`stackId\`Optional - *Type:* java.lang.String - *Default:* \`edge-lambda-stack-\${region}\` The stack ID of Lambda@Edge function. --- #### Methods | **Name** | **Description** | | --- | --- | | toString | Returns a string representation of this construct. | | applyRemovalPolicy | Apply the given removal policy to this resource. | | addAlias | Defines an alias for this version. | | addEventSource | Adds an event source to this function. | | addEventSourceMapping | Adds an event source that maps to this AWS Lambda function. | | addPermission | Adds a permission to the Lambda resource policy. | | addToRolePolicy | Adds a statement to the IAM role assumed by the instance. | | configureAsyncInvoke | Configures options for asynchronous invocation. | | grantInvoke | Grant the given identity permissions to invoke this Lambda. | | metric | Return the given named metric for this Lambda Return the given named metric for this Function. | | metricDuration | Metric for the Duration of this Lambda How long execution of this Lambda takes. | | metricErrors | How many invocations of this Lambda fail. | | metricInvocations | Metric for the number of invocations of this Lambda How often this Lambda is invoked. | | metricThrottles | Metric for the number of throttled invocations of this Lambda How often this Lambda is throttled. | --- ##### \`toString\` \`\`\`java public java.lang.String toString() \`\`\` Returns a string representation of this construct. ##### \`applyRemovalPolicy\` \`\`\`java public void applyRemovalPolicy(RemovalPolicy policy) \`\`\` Apply the given removal policy to this resource. The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced. The resource can be deleted (\`RemovalPolicy.DESTROY\`), or left in your AWS account for data recovery and cleanup later (\`RemovalPolicy.RETAIN\`). ###### \`policy\`Required - *Type:* software.amazon.awscdk.core.RemovalPolicy --- ##### \`addAlias\` \`\`\`java public Alias addAlias(java.lang.String aliasName) public Alias addAlias(java.lang.String aliasName, AliasOptions options) \`\`\` Defines an alias for this version. ###### \`aliasName\`Required - *Type:* java.lang.String --- ###### \`options\`Optional - *Type:* software.amazon.awscdk.services.lambda.AliasOptions --- ##### \`addEventSource\` \`\`\`java public void addEventSource(IEventSource source) \`\`\` Adds an event source to this function. ###### \`source\`Required - *Type:* software.amazon.awscdk.services.lambda.IEventSource --- ##### \`addEventSourceMapping\` \`\`\`java public EventSourceMapping addEventSourceMapping(java.lang.String id, EventSourceMappingOptions options) \`\`\` Adds an event source that maps to this AWS Lambda function. ###### \`id\`Required - *Type:* java.lang.String --- ###### \`options\`Required - *Type:* software.amazon.awscdk.services.lambda.EventSourceMappingOptions --- ##### \`addPermission\` \`\`\`java public void addPermission(java.lang.String id, Permission permission) \`\`\` Adds a permission to the Lambda resource policy. ###### \`id\`Required - *Type:* java.lang.String --- ###### \`permission\`Required - *Type:* software.amazon.awscdk.services.lambda.Permission --- ##### \`addToRolePolicy\` \`\`\`java public void addToRolePolicy(PolicyStatement statement) \`\`\` Adds a statement to the IAM role assumed by the instance. ###### \`statement\`Required - *Type:* software.amazon.awscdk.services.iam.PolicyStatement --- ##### \`configureAsyncInvoke\` \`\`\`java public void configureAsyncInvoke(EventInvokeConfigOptions options) \`\`\` Configures options for asynchronous invocation. ###### \`options\`Required - *Type:* software.amazon.awscdk.services.lambda.EventInvokeConfigOptions --- ##### \`grantInvoke\` \`\`\`java public Grant grantInvoke(IGrantable identity) \`\`\` Grant the given identity permissions to invoke this Lambda. ###### \`identity\`Required - *Type:* software.amazon.awscdk.services.iam.IGrantable --- ##### \`metric\` \`\`\`java public Metric metric(java.lang.String metricName) public Metric metric(java.lang.String metricName, MetricOptions props) \`\`\` Return the given named metric for this Lambda Return the given named metric for this Function. Return the given named metric for this Lambda Return the given named metric for this Function. ###### \`metricName\`Required - *Type:* java.lang.String --- ###### \`props\`Optional - *Type:* software.amazon.awscdk.services.cloudwatch.MetricOptions --- ##### \`metricDuration\` \`\`\`java public Metric metricDuration() public Metric metricDuration(MetricOptions props) \`\`\` Metric for the Duration of this Lambda How long execution of this Lambda takes. Average over 5 minutes Metric for the Duration of this Lambda How long execution of this Lambda takes. Average over 5 minutes ###### \`props\`Optional - *Type:* software.amazon.awscdk.services.cloudwatch.MetricOptions --- ##### \`metricErrors\` \`\`\`java public Metric metricErrors() public Metric metricErrors(MetricOptions props) \`\`\` How many invocations of this Lambda fail. Sum over 5 minutes ###### \`props\`Optional - *Type:* software.amazon.awscdk.services.cloudwatch.MetricOptions --- ##### \`metricInvocations\` \`\`\`java public Metric metricInvocations() public Metric metricInvocations(MetricOptions props) \`\`\` Metric for the number of invocations of this Lambda How often this Lambda is invoked. Sum over 5 minutes Metric for the number of invocations of this Lambda How often this Lambda is invoked. Sum over 5 minutes ###### \`props\`Optional - *Type:* software.amazon.awscdk.services.cloudwatch.MetricOptions --- ##### \`metricThrottles\` \`\`\`java public Metric metricThrottles() public Metric metricThrottles(MetricOptions props) \`\`\` Metric for the number of throttled invocations of this Lambda How often this Lambda is throttled. Sum over 5 minutes Metric for the number of throttled invocations of this Lambda How often this Lambda is throttled. Sum over 5 minutes ###### \`props\`Optional - *Type:* software.amazon.awscdk.services.cloudwatch.MetricOptions --- #### Static Functions | **Name** | **Description** | | --- | --- | | isConstruct | Return whether the given object is a Construct. | | isResource | Check whether the given construct is a Resource. | --- ##### \`isConstruct\` \`\`\`java import software.amazon.awscdk.services.cloudfront.experimental.EdgeFunction; EdgeFunction.isConstruct(java.lang.Object x) \`\`\` Return whether the given object is a Construct. ###### \`x\`Required - *Type:* java.lang.Object --- ##### \`isResource\` \`\`\`java import software.amazon.awscdk.services.cloudfront.experimental.EdgeFunction; EdgeFunction.isResource(IConstruct construct) \`\`\` Check whether the given construct is a Resource. ###### \`construct\`Required - *Type:* software.amazon.awscdk.core.IConstruct --- #### Properties | **Name** | **Type** | **Description** | | --- | --- | --- | | node | software.amazon.awscdk.core.ConstructNode | The construct tree node associated with this construct. | | env | software.amazon.awscdk.core.ResourceEnvironment | The environment this resource belongs to. | | stack | software.amazon.awscdk.core.Stack | The stack in which this resource is defined. | | connections | software.amazon.awscdk.services.ec2.Connections | Not supported. | | currentVersion | software.amazon.awscdk.services.lambda.IVersion | Convenience method to make \`EdgeFunction\` conform to the same interface as \`Function\`. | | edgeArn | java.lang.String | The ARN of the version for Lambda@Edge. | | functionArn | java.lang.String | The ARN of the function. | | functionName | java.lang.String | The name of the function. | | grantPrincipal | software.amazon.awscdk.services.iam.IPrincipal | The principal to grant permissions to. | | isBoundToVpc | java.lang.Boolean | Whether or not this Lambda function was bound to a VPC. | | lambda | software.amazon.awscdk.services.lambda.IFunction | The underlying AWS Lambda function. | | latestVersion | software.amazon.awscdk.services.lambda.IVersion | The \`$LATEST\` version of this function. | | permissionsNode | software.amazon.awscdk.core.ConstructNode | The construct node where permissions are attached. | | version | java.lang.String | The most recently deployed version of this function. | | role | software.amazon.awscdk.services.iam.IRole | The IAM role associated with this function. | --- ##### \`node\`Required \`\`\`java public ConstructNode getNode(); \`\`\` - *Type:* software.amazon.awscdk.core.ConstructNode The construct tree node associated with this construct. --- ##### \`env\`Required \`\`\`java public ResourceEnvironment getEnv(); \`\`\` - *Type:* software.amazon.awscdk.core.ResourceEnvironment The environment this resource belongs to. For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into. --- ##### \`stack\`Required \`\`\`java public Stack getStack(); \`\`\` - *Type:* software.amazon.awscdk.core.Stack The stack in which this resource is defined. --- ##### \`connections\`Required \`\`\`java public Connections getConnections(); \`\`\` - *Type:* software.amazon.awscdk.services.ec2.Connections Not supported. Connections are only applicable to VPC-enabled functions. --- ##### \`currentVersion\`Required \`\`\`java public IVersion getCurrentVersion(); \`\`\` - *Type:* software.amazon.awscdk.services.lambda.IVersion Convenience method to make \`EdgeFunction\` conform to the same interface as \`Function\`. --- ##### \`edgeArn\`Required \`\`\`java public java.lang.String getEdgeArn(); \`\`\` - *Type:* java.lang.String The ARN of the version for Lambda@Edge. --- ##### \`functionArn\`Required \`\`\`java public java.lang.String getFunctionArn(); \`\`\` - *Type:* java.lang.String The ARN of the function. --- ##### \`functionName\`Required \`\`\`java public java.lang.String getFunctionName(); \`\`\` - *Type:* java.lang.String The name of the function. --- ##### \`grantPrincipal\`Required \`\`\`java public IPrincipal getGrantPrincipal(); \`\`\` - *Type:* software.amazon.awscdk.services.iam.IPrincipal The principal to grant permissions to. --- ##### \`isBoundToVpc\`Required \`\`\`java public java.lang.Boolean getIsBoundToVpc(); \`\`\` - *Type:* java.lang.Boolean Whether or not this Lambda function was bound to a VPC. If this is is \`false\`, trying to access the \`connections\` object will fail. --- ##### \`lambda\`Required \`\`\`java public IFunction getLambda(); \`\`\` - *Type:* software.amazon.awscdk.services.lambda.IFunction The underlying AWS Lambda function. --- ##### \`latestVersion\`Required \`\`\`java public IVersion getLatestVersion(); \`\`\` - *Type:* software.amazon.awscdk.services.lambda.IVersion The \`$LATEST\` version of this function. Note that this is reference to a non-specific AWS Lambda version, which means the function this version refers to can return different results in different invocations. To obtain a reference to an explicit version which references the current function configuration, use \`lambdaFunction.currentVersion\` instead. --- ##### \`permissionsNode\`Required \`\`\`java public ConstructNode getPermissionsNode(); \`\`\` - *Type:* software.amazon.awscdk.core.ConstructNode The construct node where permissions are attached. --- ##### \`version\`Required \`\`\`java public java.lang.String getVersion(); \`\`\` - *Type:* java.lang.String The most recently deployed version of this function. --- ##### \`role\`Optional \`\`\`java public IRole getRole(); \`\`\` - *Type:* software.amazon.awscdk.services.iam.IRole The IAM role associated with this function. --- ## Structs ### EdgeFunctionProps Properties for creating a Lambda@Edge function. #### Initializer \`\`\`java import software.amazon.awscdk.services.cloudfront.experimental.EdgeFunctionProps; EdgeFunctionProps.builder() // .maxEventAge(Duration) // .onFailure(IDestination) // .onSuccess(IDestination) // .retryAttempts(java.lang.Number) // .allowAllOutbound(java.lang.Boolean) // .allowPublicSubnet(java.lang.Boolean) // .architectures(java.util.List) // .codeSigningConfig(ICodeSigningConfig) // .currentVersionOptions(VersionOptions) // .deadLetterQueue(IQueue) // .deadLetterQueueEnabled(java.lang.Boolean) // .description(java.lang.String) // .environment(java.util.Map) // .environmentEncryption(IKey) // .events(java.util.List) // .filesystem(FileSystem) // .functionName(java.lang.String) // .initialPolicy(java.util.List) // .insightsVersion(LambdaInsightsVersion) // .layers(java.util.List) // .logRetention(RetentionDays) // .logRetentionRetryOptions(LogRetentionRetryOptions) // .logRetentionRole(IRole) // .memorySize(java.lang.Number) // .profiling(java.lang.Boolean) // .profilingGroup(IProfilingGroup) // .reservedConcurrentExecutions(java.lang.Number) // .role(IRole) // .securityGroup(ISecurityGroup) // .securityGroups(java.util.List) // .timeout(Duration) // .tracing(Tracing) // .vpc(IVpc) // .vpcSubnets(SubnetSelection) .code(Code) .handler(java.lang.String) .runtime(Runtime) // .stackId(java.lang.String) .build(); \`\`\` #### Properties | **Name** | **Type** | **Description** | | --- | --- | --- | | maxEventAge | software.amazon.awscdk.core.Duration | The maximum age of a request that Lambda sends to a function for processing. | | onFailure | software.amazon.awscdk.services.lambda.IDestination | The destination for failed invocations. | | onSuccess | software.amazon.awscdk.services.lambda.IDestination | The destination for successful invocations. | | retryAttempts | java.lang.Number | The maximum number of times to retry when the function returns an error. | | allowAllOutbound | java.lang.Boolean | Whether to allow the Lambda to send all network traffic. | | allowPublicSubnet | java.lang.Boolean | Lambda Functions in a public subnet can NOT access the internet. | | architectures | java.util.List | The system architectures compatible with this lambda function. | | codeSigningConfig | software.amazon.awscdk.services.lambda.ICodeSigningConfig | Code signing config associated with this function. | | currentVersionOptions | software.amazon.awscdk.services.lambda.VersionOptions | Options for the \`lambda.Version\` resource automatically created by the \`fn.currentVersion\` method. | | deadLetterQueue | software.amazon.awscdk.services.sqs.IQueue | The SQS queue to use if DLQ is enabled. | | deadLetterQueueEnabled | java.lang.Boolean | Enabled DLQ. | | description | java.lang.String | A description of the function. | | environment | java.util.Map | Key-value pairs that Lambda caches and makes available for your Lambda functions. | | environmentEncryption | software.amazon.awscdk.services.kms.IKey | The AWS KMS key that's used to encrypt your function's environment variables. | | events | java.util.List | Event sources for this function. | | filesystem | software.amazon.awscdk.services.lambda.FileSystem | The filesystem configuration for the lambda function. | | functionName | java.lang.String | A name for the function. | | initialPolicy | java.util.List | Initial policy statements to add to the created Lambda Role. | | insightsVersion | software.amazon.awscdk.services.lambda.LambdaInsightsVersion | Specify the version of CloudWatch Lambda insights to use for monitoring. | | layers | java.util.List | A list of layers to add to the function's execution environment. | | logRetention | software.amazon.awscdk.services.logs.RetentionDays | The number of days log events are kept in CloudWatch Logs. | | logRetentionRetryOptions | software.amazon.awscdk.services.lambda.LogRetentionRetryOptions | When log retention is specified, a custom resource attempts to create the CloudWatch log group. | | logRetentionRole | software.amazon.awscdk.services.iam.IRole | The IAM role for the Lambda function associated with the custom resource that sets the retention policy. | | memorySize | java.lang.Number | The amount of memory, in MB, that is allocated to your Lambda function. | | profiling | java.lang.Boolean | Enable profiling. | | profilingGroup | software.amazon.awscdk.services.codeguruprofiler.IProfilingGroup | Profiling Group. | | reservedConcurrentExecutions | java.lang.Number | The maximum of concurrent executions you want to reserve for the function. | | role | software.amazon.awscdk.services.iam.IRole | Lambda execution role. | | securityGroup | software.amazon.awscdk.services.ec2.ISecurityGroup | What security group to associate with the Lambda's network interfaces. This property is being deprecated, consider using securityGroups instead. | | securityGroups | java.util.List | The list of security groups to associate with the Lambda's network interfaces. | | timeout | software.amazon.awscdk.core.Duration | The function execution time (in seconds) after which Lambda terminates the function. | | tracing | software.amazon.awscdk.services.lambda.Tracing | Enable AWS X-Ray Tracing for Lambda Function. | | vpc | software.amazon.awscdk.services.ec2.IVpc | VPC network to place Lambda network interfaces. | | vpcSubnets | software.amazon.awscdk.services.ec2.SubnetSelection | Where to place the network interfaces within the VPC. | | code | software.amazon.awscdk.services.lambda.Code | The source code of your Lambda function. | | handler | java.lang.String | The name of the method within your code that Lambda calls to execute your function. | | runtime | software.amazon.awscdk.services.lambda.Runtime | The runtime environment for the Lambda function that you are uploading. | | stackId | java.lang.String | The stack ID of Lambda@Edge function. | --- ##### \`maxEventAge\`Optional \`\`\`java public Duration getMaxEventAge(); \`\`\` - *Type:* software.amazon.awscdk.core.Duration - *Default:* Duration.hours(6) The maximum age of a request that Lambda sends to a function for processing. Minimum: 60 seconds Maximum: 6 hours --- ##### \`onFailure\`Optional \`\`\`java public IDestination getOnFailure(); \`\`\` - *Type:* software.amazon.awscdk.services.lambda.IDestination - *Default:* no destination The destination for failed invocations. --- ##### \`onSuccess\`Optional \`\`\`java public IDestination getOnSuccess(); \`\`\` - *Type:* software.amazon.awscdk.services.lambda.IDestination - *Default:* no destination The destination for successful invocations. --- ##### \`retryAttempts\`Optional \`\`\`java public java.lang.Number getRetryAttempts(); \`\`\` - *Type:* java.lang.Number - *Default:* 2 The maximum number of times to retry when the function returns an error. Minimum: 0 Maximum: 2 --- ##### \`allowAllOutbound\`Optional \`\`\`java public java.lang.Boolean getAllowAllOutbound(); \`\`\` - *Type:* java.lang.Boolean - *Default:* true Whether to allow the Lambda to send all network traffic. If set to false, you must individually add traffic rules to allow the Lambda to connect to network targets. --- ##### \`allowPublicSubnet\`Optional \`\`\`java public java.lang.Boolean getAllowPublicSubnet(); \`\`\` - *Type:* java.lang.Boolean - *Default:* false Lambda Functions in a public subnet can NOT access the internet. Use this property to acknowledge this limitation and still place the function in a public subnet. > [https://stackoverflow.com/questions/52992085/why-cant-an-aws-lambda-function-inside-a-public-subnet-in-a-vpc-connect-to-the/52994841#52994841](https://stackoverflow.com/questions/52992085/why-cant-an-aws-lambda-function-inside-a-public-subnet-in-a-vpc-connect-to-the/52994841#52994841) --- ##### \`architectures\`Optional \`\`\`java public java.util.List getArchitectures(); \`\`\` - *Type:* java.util.List - *Default:* [Architecture.X86_64] The system architectures compatible with this lambda function. --- ##### \`codeSigningConfig\`Optional \`\`\`java public ICodeSigningConfig getCodeSigningConfig(); \`\`\` - *Type:* software.amazon.awscdk.services.lambda.ICodeSigningConfig - *Default:* Not Sign the Code Code signing config associated with this function. --- ##### \`currentVersionOptions\`Optional \`\`\`java public VersionOptions getCurrentVersionOptions(); \`\`\` - *Type:* software.amazon.awscdk.services.lambda.VersionOptions - *Default:* default options as described in \`VersionOptions\` Options for the \`lambda.Version\` resource automatically created by the \`fn.currentVersion\` method. --- ##### \`deadLetterQueue\`Optional \`\`\`java public IQueue getDeadLetterQueue(); \`\`\` - *Type:* software.amazon.awscdk.services.sqs.IQueue - *Default:* SQS queue with 14 day retention period if \`deadLetterQueueEnabled\` is \`true\` The SQS queue to use if DLQ is enabled. --- ##### \`deadLetterQueueEnabled\`Optional \`\`\`java public java.lang.Boolean getDeadLetterQueueEnabled(); \`\`\` - *Type:* java.lang.Boolean - *Default:* false unless \`deadLetterQueue\` is set, which implies DLQ is enabled. Enabled DLQ. If \`deadLetterQueue\` is undefined, an SQS queue with default options will be defined for your Function. --- ##### \`description\`Optional \`\`\`java public java.lang.String getDescription(); \`\`\` - *Type:* java.lang.String - *Default:* No description. A description of the function. --- ##### \`environment\`Optional \`\`\`java public java.util.Map getEnvironment(); \`\`\` - *Type:* java.util.Map - *Default:* No environment variables. Key-value pairs that Lambda caches and makes available for your Lambda functions. Use environment variables to apply configuration changes, such as test and production environment configurations, without changing your Lambda function source code. --- ##### \`environmentEncryption\`Optional \`\`\`java public IKey getEnvironmentEncryption(); \`\`\` - *Type:* software.amazon.awscdk.services.kms.IKey - *Default:* AWS Lambda creates and uses an AWS managed customer master key (CMK). The AWS KMS key that's used to encrypt your function's environment variables. --- ##### \`events\`Optional \`\`\`java public java.util.List getEvents(); \`\`\` - *Type:* java.util.List - *Default:* No event sources. Event sources for this function. You can also add event sources using \`addEventSource\`. --- ##### \`filesystem\`Optional \`\`\`java public FileSystem getFilesystem(); \`\`\` - *Type:* software.amazon.awscdk.services.lambda.FileSystem - *Default:* will not mount any filesystem The filesystem configuration for the lambda function. --- ##### \`functionName\`Optional \`\`\`java public java.lang.String getFunctionName(); \`\`\` - *Type:* java.lang.String - *Default:* AWS CloudFormation generates a unique physical ID and uses that ID for the function's name. For more information, see Name Type. A name for the function. --- ##### \`initialPolicy\`Optional \`\`\`java public java.util.List getInitialPolicy(); \`\`\` - *Type:* java.util.List - *Default:* No policy statements are added to the created Lambda role. Initial policy statements to add to the created Lambda Role. You can call \`addToRolePolicy\` to the created lambda to add statements post creation. --- ##### \`insightsVersion\`Optional \`\`\`java public LambdaInsightsVersion getInsightsVersion(); \`\`\` - *Type:* software.amazon.awscdk.services.lambda.LambdaInsightsVersion - *Default:* No Lambda Insights Specify the version of CloudWatch Lambda insights to use for monitoring. > [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Lambda-Insights.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Lambda-Insights.html) --- ##### \`layers\`Optional \`\`\`java public java.util.List getLayers(); \`\`\` - *Type:* java.util.List - *Default:* No layers. A list of layers to add to the function's execution environment. You can configure your Lambda function to pull in additional code during initialization in the form of layers. Layers are packages of libraries or other dependencies that can be used by multiple functions. --- ##### \`logRetention\`Optional \`\`\`java public RetentionDays getLogRetention(); \`\`\` - *Type:* software.amazon.awscdk.services.logs.RetentionDays - *Default:* logs.RetentionDays.INFINITE The number of days log events are kept in CloudWatch Logs. When updating this property, unsetting it doesn't remove the log retention policy. To remove the retention policy, set the value to \`INFINITE\`. --- ##### \`logRetentionRetryOptions\`Optional \`\`\`java public LogRetentionRetryOptions getLogRetentionRetryOptions(); \`\`\` - *Type:* software.amazon.awscdk.services.lambda.LogRetentionRetryOptions - *Default:* Default AWS SDK retry options. When log retention is specified, a custom resource attempts to create the CloudWatch log group. These options control the retry policy when interacting with CloudWatch APIs. --- ##### \`logRetentionRole\`Optional \`\`\`java public IRole getLogRetentionRole(); \`\`\` - *Type:* software.amazon.awscdk.services.iam.IRole - *Default:* A new role is created. The IAM role for the Lambda function associated with the custom resource that sets the retention policy. --- ##### \`memorySize\`Optional \`\`\`java public java.lang.Number getMemorySize(); \`\`\` - *Type:* java.lang.Number - *Default:* 128 The amount of memory, in MB, that is allocated to your Lambda function. Lambda uses this value to proportionally allocate the amount of CPU power. For more information, see Resource Model in the AWS Lambda Developer Guide. --- ##### \`profiling\`Optional \`\`\`java public java.lang.Boolean getProfiling(); \`\`\` - *Type:* java.lang.Boolean - *Default:* No profiling. Enable profiling. > [https://docs.aws.amazon.com/codeguru/latest/profiler-ug/setting-up-lambda.html](https://docs.aws.amazon.com/codeguru/latest/profiler-ug/setting-up-lambda.html) --- ##### \`profilingGroup\`Optional \`\`\`java public IProfilingGroup getProfilingGroup(); \`\`\` - *Type:* software.amazon.awscdk.services.codeguruprofiler.IProfilingGroup - *Default:* A new profiling group will be created if \`profiling\` is set. Profiling Group. > [https://docs.aws.amazon.com/codeguru/latest/profiler-ug/setting-up-lambda.html](https://docs.aws.amazon.com/codeguru/latest/profiler-ug/setting-up-lambda.html) --- ##### \`reservedConcurrentExecutions\`Optional \`\`\`java public java.lang.Number getReservedConcurrentExecutions(); \`\`\` - *Type:* java.lang.Number - *Default:* No specific limit - account limit. The maximum of concurrent executions you want to reserve for the function. > [https://docs.aws.amazon.com/lambda/latest/dg/concurrent-executions.html](https://docs.aws.amazon.com/lambda/latest/dg/concurrent-executions.html) --- ##### \`role\`Optional \`\`\`java public IRole getRole(); \`\`\` - *Type:* software.amazon.awscdk.services.iam.IRole - *Default:* A unique role will be generated for this lambda function. Both supplied and generated roles can always be changed by calling \`addToRolePolicy\`. Lambda execution role. This is the role that will be assumed by the function upon execution. It controls the permissions that the function will have. The Role must be assumable by the 'lambda.amazonaws.com' service principal. The default Role automatically has permissions granted for Lambda execution. If you provide a Role, you must add the relevant AWS managed policies yourself. The relevant managed policies are "service-role/AWSLambdaBasicExecutionRole" and "service-role/AWSLambdaVPCAccessExecutionRole". --- ##### ~~\`securityGroup\`~~Optional - *Deprecated:* - This property is deprecated, use securityGroups instead \`\`\`java public ISecurityGroup getSecurityGroup(); \`\`\` - *Type:* software.amazon.awscdk.services.ec2.ISecurityGroup - *Default:* If the function is placed within a VPC and a security group is not specified, either by this or securityGroups prop, a dedicated security group will be created for this function. What security group to associate with the Lambda's network interfaces. This property is being deprecated, consider using securityGroups instead. Only used if 'vpc' is supplied. Use securityGroups property instead. Function constructor will throw an error if both are specified. --- ##### \`securityGroups\`Optional \`\`\`java public java.util.List getSecurityGroups(); \`\`\` - *Type:* java.util.List - *Default:* If the function is placed within a VPC and a security group is not specified, either by this or securityGroup prop, a dedicated security group will be created for this function. The list of security groups to associate with the Lambda's network interfaces. Only used if 'vpc' is supplied. --- ##### \`timeout\`Optional \`\`\`java public Duration getTimeout(); \`\`\` - *Type:* software.amazon.awscdk.core.Duration - *Default:* Duration.seconds(3) The function execution time (in seconds) after which Lambda terminates the function. Because the execution time affects cost, set this value based on the function's expected execution time. --- ##### \`tracing\`Optional \`\`\`java public Tracing getTracing(); \`\`\` - *Type:* software.amazon.awscdk.services.lambda.Tracing - *Default:* Tracing.Disabled Enable AWS X-Ray Tracing for Lambda Function. --- ##### \`vpc\`Optional \`\`\`java public IVpc getVpc(); \`\`\` - *Type:* software.amazon.awscdk.services.ec2.IVpc - *Default:* Function is not placed within a VPC. VPC network to place Lambda network interfaces. Specify this if the Lambda function needs to access resources in a VPC. --- ##### \`vpcSubnets\`Optional \`\`\`java public SubnetSelection getVpcSubnets(); \`\`\` - *Type:* software.amazon.awscdk.services.ec2.SubnetSelection - *Default:* the Vpc default strategy if not specified Where to place the network interfaces within the VPC. Only used if 'vpc' is supplied. Note: internet access for Lambdas requires a NAT gateway, so picking Public subnets is not allowed. --- ##### \`code\`Required \`\`\`java public Code getCode(); \`\`\` - *Type:* software.amazon.awscdk.services.lambda.Code The source code of your Lambda function. You can point to a file in an Amazon Simple Storage Service (Amazon S3) bucket or specify your source code as inline text. --- ##### \`handler\`Required \`\`\`java public java.lang.String getHandler(); \`\`\` - *Type:* java.lang.String The name of the method within your code that Lambda calls to execute your function. The format includes the file name. It can also include namespaces and other qualifiers, depending on the runtime. For more information, see https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-features.html#gettingstarted-features-programmingmodel. Use \`Handler.FROM_IMAGE\` when defining a function from a Docker image. NOTE: If you specify your source code as inline text by specifying the ZipFile property within the Code property, specify index.function_name as the handler. --- ##### \`runtime\`Required \`\`\`java public Runtime getRuntime(); \`\`\` - *Type:* software.amazon.awscdk.services.lambda.Runtime The runtime environment for the Lambda function that you are uploading. For valid values, see the Runtime property in the AWS Lambda Developer Guide. Use \`Runtime.FROM_IMAGE\` when when defining a function from a Docker image. --- ##### \`stackId\`Optional \`\`\`java public java.lang.String getStackId(); \`\`\` - *Type:* java.lang.String - *Default:* \`edge-lambda-stack-\${region}\` The stack ID of Lambda@Edge function. --- " `; exports[`submodules without an explicit name python 1`] = ` "# API Reference ## Constructs ### EdgeFunction - *Implements:* aws_cdk.aws_lambda.IVersion A Lambda@Edge function. Convenience resource for requesting a Lambda function in the 'us-east-1' region for use with Lambda@Edge. Implements several restrictions enforced by Lambda@Edge. Note that this construct requires that the 'us-east-1' region has been bootstrapped. See https://docs.aws.amazon.com/cdk/latest/guide/bootstrapping.html or 'cdk bootstrap --help' for options. #### Initializers \`\`\`python from aws_cdk import aws_cloudfront experimental.EdgeFunction( scope: Construct, id: str, max_event_age: Duration = None, on_failure: IDestination = None, on_success: IDestination = None, retry_attempts: typing.Union[int, float] = None, allow_all_outbound: bool = None, allow_public_subnet: bool = None, architectures: typing.List[Architecture] = None, code_signing_config: ICodeSigningConfig = None, current_version_options: VersionOptions = None, dead_letter_queue: IQueue = None, dead_letter_queue_enabled: bool = None, description: str = None, environment: typing.Mapping[str] = None, environment_encryption: IKey = None, events: typing.List[IEventSource] = None, filesystem: FileSystem = None, function_name: str = None, initial_policy: typing.List[PolicyStatement] = None, insights_version: LambdaInsightsVersion = None, layers: typing.List[ILayerVersion] = None, log_retention: RetentionDays = None, log_retention_retry_options: LogRetentionRetryOptions = None, log_retention_role: IRole = None, memory_size: typing.Union[int, float] = None, profiling: bool = None, profiling_group: IProfilingGroup = None, reserved_concurrent_executions: typing.Union[int, float] = None, role: IRole = None, security_group: ISecurityGroup = None, security_groups: typing.List[ISecurityGroup] = None, timeout: Duration = None, tracing: Tracing = None, vpc: IVpc = None, vpc_subnets: SubnetSelection = None, code: Code, handler: str, runtime: Runtime, stack_id: str = None ) \`\`\` | **Name** | **Type** | **Description** | | --- | --- | --- | | scope | constructs.Construct | *No description.* | | id | str | *No description.* | | max_event_age | aws_cdk.core.Duration | The maximum age of a request that Lambda sends to a function for processing. | | on_failure | aws_cdk.aws_lambda.IDestination | The destination for failed invocations. | | on_success | aws_cdk.aws_lambda.IDestination | The destination for successful invocations. | | retry_attempts | typing.Union[int, float] | The maximum number of times to retry when the function returns an error. | | allow_all_outbound | bool | Whether to allow the Lambda to send all network traffic. | | allow_public_subnet | bool | Lambda Functions in a public subnet can NOT access the internet. | | architectures | typing.List[aws_cdk.aws_lambda.Architecture] | The system architectures compatible with this lambda function. | | code_signing_config | aws_cdk.aws_lambda.ICodeSigningConfig | Code signing config associated with this function. | | current_version_options | aws_cdk.aws_lambda.VersionOptions | Options for the \`lambda.Version\` resource automatically created by the \`fn.currentVersion\` method. | | dead_letter_queue | aws_cdk.aws_sqs.IQueue | The SQS queue to use if DLQ is enabled. | | dead_letter_queue_enabled | bool | Enabled DLQ. | | description | str | A description of the function. | | environment | typing.Mapping[str] | Key-value pairs that Lambda caches and makes available for your Lambda functions. | | environment_encryption | aws_cdk.aws_kms.IKey | The AWS KMS key that's used to encrypt your function's environment variables. | | events | typing.List[aws_cdk.aws_lambda.IEventSource] | Event sources for this function. | | filesystem | aws_cdk.aws_lambda.FileSystem | The filesystem configuration for the lambda function. | | function_name | str | A name for the function. | | initial_policy | typing.List[aws_cdk.aws_iam.PolicyStatement] | Initial policy statements to add to the created Lambda Role. | | insights_version | aws_cdk.aws_lambda.LambdaInsightsVersion | Specify the version of CloudWatch Lambda insights to use for monitoring. | | layers | typing.List[aws_cdk.aws_lambda.ILayerVersion] | A list of layers to add to the function's execution environment. | | log_retention | aws_cdk.aws_logs.RetentionDays | The number of days log events are kept in CloudWatch Logs. | | log_retention_retry_options | aws_cdk.aws_lambda.LogRetentionRetryOptions | When log retention is specified, a custom resource attempts to create the CloudWatch log group. | | log_retention_role | aws_cdk.aws_iam.IRole | The IAM role for the Lambda function associated with the custom resource that sets the retention policy. | | memory_size | typing.Union[int, float] | The amount of memory, in MB, that is allocated to your Lambda function. | | profiling | bool | Enable profiling. | | profiling_group | aws_cdk.aws_codeguruprofiler.IProfilingGroup | Profiling Group. | | reserved_concurrent_executions | typing.Union[int, float] | The maximum of concurrent executions you want to reserve for the function. | | role | aws_cdk.aws_iam.IRole | Lambda execution role. | | security_group | aws_cdk.aws_ec2.ISecurityGroup | What security group to associate with the Lambda's network interfaces. This property is being deprecated, consider using securityGroups instead. | | security_groups | typing.List[aws_cdk.aws_ec2.ISecurityGroup] | The list of security groups to associate with the Lambda's network interfaces. | | timeout | aws_cdk.core.Duration | The function execution time (in seconds) after which Lambda terminates the function. | | tracing | aws_cdk.aws_lambda.Tracing | Enable AWS X-Ray Tracing for Lambda Function. | | vpc | aws_cdk.aws_ec2.IVpc | VPC network to place Lambda network interfaces. | | vpc_subnets | aws_cdk.aws_ec2.SubnetSelection | Where to place the network interfaces within the VPC. | | code | aws_cdk.aws_lambda.Code | The source code of your Lambda function. | | handler | str | The name of the method within your code that Lambda calls to execute your function. | | runtime | aws_cdk.aws_lambda.Runtime | The runtime environment for the Lambda function that you are uploading. | | stack_id | str | The stack ID of Lambda@Edge function. | --- ##### \`scope\`Required - *Type:* constructs.Construct --- ##### \`id\`Required - *Type:* str --- ##### \`max_event_age\`Optional - *Type:* aws_cdk.core.Duration - *Default:* Duration.hours(6) The maximum age of a request that Lambda sends to a function for processing. Minimum: 60 seconds Maximum: 6 hours --- ##### \`on_failure\`Optional - *Type:* aws_cdk.aws_lambda.IDestination - *Default:* no destination The destination for failed invocations. --- ##### \`on_success\`Optional - *Type:* aws_cdk.aws_lambda.IDestination - *Default:* no destination The destination for successful invocations. --- ##### \`retry_attempts\`Optional - *Type:* typing.Union[int, float] - *Default:* 2 The maximum number of times to retry when the function returns an error. Minimum: 0 Maximum: 2 --- ##### \`allow_all_outbound\`Optional - *Type:* bool - *Default:* true Whether to allow the Lambda to send all network traffic. If set to false, you must individually add traffic rules to allow the Lambda to connect to network targets. --- ##### \`allow_public_subnet\`Optional - *Type:* bool - *Default:* false Lambda Functions in a public subnet can NOT access the internet. Use this property to acknowledge this limitation and still place the function in a public subnet. > [https://stackoverflow.com/questions/52992085/why-cant-an-aws-lambda-function-inside-a-public-subnet-in-a-vpc-connect-to-the/52994841#52994841](https://stackoverflow.com/questions/52992085/why-cant-an-aws-lambda-function-inside-a-public-subnet-in-a-vpc-connect-to-the/52994841#52994841) --- ##### \`architectures\`Optional - *Type:* typing.List[aws_cdk.aws_lambda.Architecture] - *Default:* [Architecture.X86_64] The system architectures compatible with this lambda function. --- ##### \`code_signing_config\`Optional - *Type:* aws_cdk.aws_lambda.ICodeSigningConfig - *Default:* Not Sign the Code Code signing config associated with this function. --- ##### \`current_version_options\`Optional - *Type:* aws_cdk.aws_lambda.VersionOptions - *Default:* default options as described in \`VersionOptions\` Options for the \`lambda.Version\` resource automatically created by the \`fn.currentVersion\` method. --- ##### \`dead_letter_queue\`Optional - *Type:* aws_cdk.aws_sqs.IQueue - *Default:* SQS queue with 14 day retention period if \`deadLetterQueueEnabled\` is \`true\` The SQS queue to use if DLQ is enabled. --- ##### \`dead_letter_queue_enabled\`Optional - *Type:* bool - *Default:* false unless \`deadLetterQueue\` is set, which implies DLQ is enabled. Enabled DLQ. If \`deadLetterQueue\` is undefined, an SQS queue with default options will be defined for your Function. --- ##### \`description\`Optional - *Type:* str - *Default:* No description. A description of the function. --- ##### \`environment\`Optional - *Type:* typing.Mapping[str] - *Default:* No environment variables. Key-value pairs that Lambda caches and makes available for your Lambda functions. Use environment variables to apply configuration changes, such as test and production environment configurations, without changing your Lambda function source code. --- ##### \`environment_encryption\`Optional - *Type:* aws_cdk.aws_kms.IKey - *Default:* AWS Lambda creates and uses an AWS managed customer master key (CMK). The AWS KMS key that's used to encrypt your function's environment variables. --- ##### \`events\`Optional - *Type:* typing.List[aws_cdk.aws_lambda.IEventSource] - *Default:* No event sources. Event sources for this function. You can also add event sources using \`addEventSource\`. --- ##### \`filesystem\`Optional - *Type:* aws_cdk.aws_lambda.FileSystem - *Default:* will not mount any filesystem The filesystem configuration for the lambda function. --- ##### \`function_name\`Optional - *Type:* str - *Default:* AWS CloudFormation generates a unique physical ID and uses that ID for the function's name. For more information, see Name Type. A name for the function. --- ##### \`initial_policy\`Optional - *Type:* typing.List[aws_cdk.aws_iam.PolicyStatement] - *Default:* No policy statements are added to the created Lambda role. Initial policy statements to add to the created Lambda Role. You can call \`addToRolePolicy\` to the created lambda to add statements post creation. --- ##### \`insights_version\`Optional - *Type:* aws_cdk.aws_lambda.LambdaInsightsVersion - *Default:* No Lambda Insights Specify the version of CloudWatch Lambda insights to use for monitoring. > [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Lambda-Insights.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Lambda-Insights.html) --- ##### \`layers\`Optional - *Type:* typing.List[aws_cdk.aws_lambda.ILayerVersion] - *Default:* No layers. A list of layers to add to the function's execution environment. You can configure your Lambda function to pull in additional code during initialization in the form of layers. Layers are packages of libraries or other dependencies that can be used by multiple functions. --- ##### \`log_retention\`Optional - *Type:* aws_cdk.aws_logs.RetentionDays - *Default:* logs.RetentionDays.INFINITE The number of days log events are kept in CloudWatch Logs. When updating this property, unsetting it doesn't remove the log retention policy. To remove the retention policy, set the value to \`INFINITE\`. --- ##### \`log_retention_retry_options\`Optional - *Type:* aws_cdk.aws_lambda.LogRetentionRetryOptions - *Default:* Default AWS SDK retry options. When log retention is specified, a custom resource attempts to create the CloudWatch log group. These options control the retry policy when interacting with CloudWatch APIs. --- ##### \`log_retention_role\`Optional - *Type:* aws_cdk.aws_iam.IRole - *Default:* A new role is created. The IAM role for the Lambda function associated with the custom resource that sets the retention policy. --- ##### \`memory_size\`Optional - *Type:* typing.Union[int, float] - *Default:* 128 The amount of memory, in MB, that is allocated to your Lambda function. Lambda uses this value to proportionally allocate the amount of CPU power. For more information, see Resource Model in the AWS Lambda Developer Guide. --- ##### \`profiling\`Optional - *Type:* bool - *Default:* No profiling. Enable profiling. > [https://docs.aws.amazon.com/codeguru/latest/profiler-ug/setting-up-lambda.html](https://docs.aws.amazon.com/codeguru/latest/profiler-ug/setting-up-lambda.html) --- ##### \`profiling_group\`Optional - *Type:* aws_cdk.aws_codeguruprofiler.IProfilingGroup - *Default:* A new profiling group will be created if \`profiling\` is set. Profiling Group. > [https://docs.aws.amazon.com/codeguru/latest/profiler-ug/setting-up-lambda.html](https://docs.aws.amazon.com/codeguru/latest/profiler-ug/setting-up-lambda.html) --- ##### \`reserved_concurrent_executions\`Optional - *Type:* typing.Union[int, float] - *Default:* No specific limit - account limit. The maximum of concurrent executions you want to reserve for the function. > [https://docs.aws.amazon.com/lambda/latest/dg/concurrent-executions.html](https://docs.aws.amazon.com/lambda/latest/dg/concurrent-executions.html) --- ##### \`role\`Optional - *Type:* aws_cdk.aws_iam.IRole - *Default:* A unique role will be generated for this lambda function. Both supplied and generated roles can always be changed by calling \`addToRolePolicy\`. Lambda execution role. This is the role that will be assumed by the function upon execution. It controls the permissions that the function will have. The Role must be assumable by the 'lambda.amazonaws.com' service principal. The default Role automatically has permissions granted for Lambda execution. If you provide a Role, you must add the relevant AWS managed policies yourself. The relevant managed policies are "service-role/AWSLambdaBasicExecutionRole" and "service-role/AWSLambdaVPCAccessExecutionRole". --- ##### ~~\`security_group\`~~Optional - *Deprecated:* - This property is deprecated, use securityGroups instead - *Type:* aws_cdk.aws_ec2.ISecurityGroup - *Default:* If the function is placed within a VPC and a security group is not specified, either by this or securityGroups prop, a dedicated security group will be created for this function. What security group to associate with the Lambda's network interfaces. This property is being deprecated, consider using securityGroups instead. Only used if 'vpc' is supplied. Use securityGroups property instead. Function constructor will throw an error if both are specified. --- ##### \`security_groups\`Optional - *Type:* typing.List[aws_cdk.aws_ec2.ISecurityGroup] - *Default:* If the function is placed within a VPC and a security group is not specified, either by this or securityGroup prop, a dedicated security group will be created for this function. The list of security groups to associate with the Lambda's network interfaces. Only used if 'vpc' is supplied. --- ##### \`timeout\`Optional - *Type:* aws_cdk.core.Duration - *Default:* Duration.seconds(3) The function execution time (in seconds) after which Lambda terminates the function. Because the execution time affects cost, set this value based on the function's expected execution time. --- ##### \`tracing\`Optional - *Type:* aws_cdk.aws_lambda.Tracing - *Default:* Tracing.Disabled Enable AWS X-Ray Tracing for Lambda Function. --- ##### \`vpc\`Optional - *Type:* aws_cdk.aws_ec2.IVpc - *Default:* Function is not placed within a VPC. VPC network to place Lambda network interfaces. Specify this if the Lambda function needs to access resources in a VPC. --- ##### \`vpc_subnets\`Optional - *Type:* aws_cdk.aws_ec2.SubnetSelection - *Default:* the Vpc default strategy if not specified Where to place the network interfaces within the VPC. Only used if 'vpc' is supplied. Note: internet access for Lambdas requires a NAT gateway, so picking Public subnets is not allowed. --- ##### \`code\`Required - *Type:* aws_cdk.aws_lambda.Code The source code of your Lambda function. You can point to a file in an Amazon Simple Storage Service (Amazon S3) bucket or specify your source code as inline text. --- ##### \`handler\`Required - *Type:* str The name of the method within your code that Lambda calls to execute your function. The format includes the file name. It can also include namespaces and other qualifiers, depending on the runtime. For more information, see https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-features.html#gettingstarted-features-programmingmodel. Use \`Handler.FROM_IMAGE\` when defining a function from a Docker image. NOTE: If you specify your source code as inline text by specifying the ZipFile property within the Code property, specify index.function_name as the handler. --- ##### \`runtime\`Required - *Type:* aws_cdk.aws_lambda.Runtime The runtime environment for the Lambda function that you are uploading. For valid values, see the Runtime property in the AWS Lambda Developer Guide. Use \`Runtime.FROM_IMAGE\` when when defining a function from a Docker image. --- ##### \`stack_id\`Optional - *Type:* str - *Default:* \`edge-lambda-stack-\${region}\` The stack ID of Lambda@Edge function. --- #### Methods | **Name** | **Description** | | --- | --- | | to_string | Returns a string representation of this construct. | | apply_removal_policy | Apply the given removal policy to this resource. | | add_alias | Defines an alias for this version. | | add_event_source | Adds an event source to this function. | | add_event_source_mapping | Adds an event source that maps to this AWS Lambda function. | | add_permission | Adds a permission to the Lambda resource policy. | | add_to_role_policy | Adds a statement to the IAM role assumed by the instance. | | configure_async_invoke | Configures options for asynchronous invocation. | | grant_invoke | Grant the given identity permissions to invoke this Lambda. | | metric | Return the given named metric for this Lambda Return the given named metric for this Function. | | metric_duration | Metric for the Duration of this Lambda How long execution of this Lambda takes. | | metric_errors | How many invocations of this Lambda fail. | | metric_invocations | Metric for the number of invocations of this Lambda How often this Lambda is invoked. | | metric_throttles | Metric for the number of throttled invocations of this Lambda How often this Lambda is throttled. | --- ##### \`to_string\` \`\`\`python def to_string() -> str \`\`\` Returns a string representation of this construct. ##### \`apply_removal_policy\` \`\`\`python def apply_removal_policy( policy: RemovalPolicy ) -> None \`\`\` Apply the given removal policy to this resource. The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced. The resource can be deleted (\`RemovalPolicy.DESTROY\`), or left in your AWS account for data recovery and cleanup later (\`RemovalPolicy.RETAIN\`). ###### \`policy\`Required - *Type:* aws_cdk.core.RemovalPolicy --- ##### \`add_alias\` \`\`\`python def add_alias( alias_name: str, max_event_age: Duration = None, on_failure: IDestination = None, on_success: IDestination = None, retry_attempts: typing.Union[int, float] = None, additional_versions: typing.List[VersionWeight] = None, description: str = None, provisioned_concurrent_executions: typing.Union[int, float] = None ) -> Alias \`\`\` Defines an alias for this version. ###### \`alias_name\`Required - *Type:* str --- ###### \`max_event_age\`Optional - *Type:* aws_cdk.core.Duration - *Default:* Duration.hours(6) The maximum age of a request that Lambda sends to a function for processing. Minimum: 60 seconds Maximum: 6 hours --- ###### \`on_failure\`Optional - *Type:* aws_cdk.aws_lambda.IDestination - *Default:* no destination The destination for failed invocations. --- ###### \`on_success\`Optional - *Type:* aws_cdk.aws_lambda.IDestination - *Default:* no destination The destination for successful invocations. --- ###### \`retry_attempts\`Optional - *Type:* typing.Union[int, float] - *Default:* 2 The maximum number of times to retry when the function returns an error. Minimum: 0 Maximum: 2 --- ###### \`additional_versions\`Optional - *Type:* typing.List[aws_cdk.aws_lambda.VersionWeight] - *Default:* No additional versions Additional versions with individual weights this alias points to. Individual additional version weights specified here should add up to (less than) one. All remaining weight is routed to the default version. For example, the config is version: "1" additionalVersions: [{ version: "2", weight: 0.05 }] Then 5% of traffic will be routed to function version 2, while the remaining 95% of traffic will be routed to function version 1. --- ###### \`description\`Optional - *Type:* str - *Default:* No description Description for the alias. --- ###### \`provisioned_concurrent_executions\`Optional - *Type:* typing.Union[int, float] - *Default:* No provisioned concurrency Specifies a provisioned concurrency configuration for a function's alias. --- ##### \`add_event_source\` \`\`\`python def add_event_source( source: IEventSource ) -> None \`\`\` Adds an event source to this function. ###### \`source\`Required - *Type:* aws_cdk.aws_lambda.IEventSource --- ##### \`add_event_source_mapping\` \`\`\`python def add_event_source_mapping( id: str, batch_size: typing.Union[int, float] = None, bisect_batch_on_error: bool = None, enabled: bool = None, event_source_arn: str = None, kafka_bootstrap_servers: typing.List[str] = None, kafka_topic: str = None, max_batching_window: Duration = None, max_record_age: Duration = None, on_failure: IEventSourceDlq = None, parallelization_factor: typing.Union[int, float] = None, report_batch_item_failures: bool = None, retry_attempts: typing.Union[int, float] = None, source_access_configurations: typing.List[SourceAccessConfiguration] = None, starting_position: StartingPosition = None, tumbling_window: Duration = None ) -> EventSourceMapping \`\`\` Adds an event source that maps to this AWS Lambda function. ###### \`id\`Required - *Type:* str --- ###### \`batch_size\`Optional - *Type:* typing.Union[int, float] - *Default:* Amazon Kinesis, Amazon DynamoDB, and Amazon MSK is 100 records. Both the default and maximum for Amazon SQS are 10 messages. The largest number of records that AWS Lambda will retrieve from your event source at the time of invoking your function. Your function receives an event with all the retrieved records. Valid Range: Minimum value of 1. Maximum value of 10000. --- ###### \`bisect_batch_on_error\`Optional - *Type:* bool - *Default:* false If the function returns an error, split the batch in two and retry. --- ###### \`enabled\`Optional - *Type:* bool - *Default:* true Set to false to disable the event source upon creation. --- ###### \`event_source_arn\`Optional - *Type:* str - *Default:* not set if using a self managed Kafka cluster, throws an error otherwise The Amazon Resource Name (ARN) of the event source. Any record added to this stream can invoke the Lambda function. --- ###### \`kafka_bootstrap_servers\`Optional - *Type:* typing.List[str] - *Default:* none A list of host and port pairs that are the addresses of the Kafka brokers in a self managed "bootstrap" Kafka cluster that a Kafka client connects to initially to bootstrap itself. They are in the format \`abc.example.com:9096\`. --- ###### \`kafka_topic\`Optional - *Type:* str - *Default:* no topic The name of the Kafka topic. --- ###### \`max_batching_window\`Optional - *Type:* aws_cdk.core.Duration - *Default:* Duration.seconds(0) The maximum amount of time to gather records before invoking the function. Maximum of Duration.minutes(5) --- ###### \`max_record_age\`Optional - *Type:* aws_cdk.core.Duration - *Default:* infinite or until the record expires. The maximum age of a record that Lambda sends to a function for processing. Valid Range: * Minimum value of 60 seconds * Maximum value of 7 days --- ###### \`on_failure\`Optional - *Type:* aws_cdk.aws_lambda.IEventSourceDlq - *Default:* discarded records are ignored An Amazon SQS queue or Amazon SNS topic destination for discarded records. --- ###### \`parallelization_factor\`Optional - *Type:* typing.Union[int, float] - *Default:* 1 The number of batches to process from each shard concurrently. Valid Range: * Minimum value of 1 * Maximum value of 10 --- ###### \`report_batch_item_failures\`Optional - *Type:* bool - *Default:* false Allow functions to return partially successful responses for a batch of records. > [https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html#services-ddb-batchfailurereporting](https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html#services-ddb-batchfailurereporting) --- ###### \`retry_attempts\`Optional - *Type:* typing.Union[int, float] - *Default:* infinite or until the record expires. The maximum number of times to retry when the function returns an error. Set to \`undefined\` if you want lambda to keep retrying infinitely or until the record expires. Valid Range: * Minimum value of 0 * Maximum value of 10000 --- ###### \`source_access_configurations\`Optional - *Type:* typing.List[aws_cdk.aws_lambda.SourceAccessConfiguration] - *Default:* none Specific settings like the authentication protocol or the VPC components to secure access to your event source. > [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-sourceaccessconfiguration.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-sourceaccessconfiguration.html) --- ###### \`starting_position\`Optional - *Type:* aws_cdk.aws_lambda.StartingPosition - *Default:* Required for Amazon Kinesis, Amazon DynamoDB, and Amazon MSK Streams sources. The position in the DynamoDB, Kinesis or MSK stream where AWS Lambda should start reading. > [https://docs.aws.amazon.com/kinesis/latest/APIReference/API_GetShardIterator.html#Kinesis-GetShardIterator-request-ShardIteratorType](https://docs.aws.amazon.com/kinesis/latest/APIReference/API_GetShardIterator.html#Kinesis-GetShardIterator-request-ShardIteratorType) --- ###### \`tumbling_window\`Optional - *Type:* aws_cdk.core.Duration - *Default:* None The size of the tumbling windows to group records sent to DynamoDB or Kinesis. > [https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html#services-ddb-windows Valid Range: 0 - 15 minutes](https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html#services-ddb-windows Valid Range: 0 - 15 minutes) --- ##### \`add_permission\` \`\`\`python def add_permission( id: str, principal: IPrincipal, action: str = None, event_source_token: str = None, scope: Construct = None, source_account: str = None, source_arn: str = None ) -> None \`\`\` Adds a permission to the Lambda resource policy. ###### \`id\`Required - *Type:* str --- ###### \`principal\`Required - *Type:* aws_cdk.aws_iam.IPrincipal The entity for which you are granting permission to invoke the Lambda function. This entity can be any valid AWS service principal, such as s3.amazonaws.com or sns.amazonaws.com, or, if you are granting cross-account permission, an AWS account ID. For example, you might want to allow a custom application in another AWS account to push events to Lambda by invoking your function. The principal can be either an AccountPrincipal or a ServicePrincipal. --- ###### \`action\`Optional - *Type:* str - *Default:* 'lambda:InvokeFunction' The Lambda actions that you want to allow in this statement. For example, you can specify lambda:CreateFunction to specify a certain action, or use a wildcard (\`\`lambda:*\`\`) to grant permission to all Lambda actions. For a list of actions, see Actions and Condition Context Keys for AWS Lambda in the IAM User Guide. --- ###### \`event_source_token\`Optional - *Type:* str - *Default:* The caller would not need to present a token. A unique token that must be supplied by the principal invoking the function. --- ###### \`scope\`Optional - *Type:* aws_cdk.core.Construct - *Default:* The instance of lambda.IFunction The scope to which the permission constructs be attached. The default is the Lambda function construct itself, but this would need to be different in cases such as cross-stack references where the Permissions would need to sit closer to the consumer of this permission (i.e., the caller). --- ###### \`source_account\`Optional - *Type:* str The AWS account ID (without hyphens) of the source owner. For example, if you specify an S3 bucket in the SourceArn property, this value is the bucket owner's account ID. You can use this property to ensure that all source principals are owned by a specific account. --- ###### \`source_arn\`Optional - *Type:* str The ARN of a resource that is invoking your function. When granting Amazon Simple Storage Service (Amazon S3) permission to invoke your function, specify this property with the bucket ARN as its value. This ensures that events generated only from the specified bucket, not just any bucket from any AWS account that creates a mapping to your function, can invoke the function. --- ##### \`add_to_role_policy\` \`\`\`python def add_to_role_policy( statement: PolicyStatement ) -> None \`\`\` Adds a statement to the IAM role assumed by the instance. ###### \`statement\`Required - *Type:* aws_cdk.aws_iam.PolicyStatement --- ##### \`configure_async_invoke\` \`\`\`python def configure_async_invoke( max_event_age: Duration = None, on_failure: IDestination = None, on_success: IDestination = None, retry_attempts: typing.Union[int, float] = None ) -> None \`\`\` Configures options for asynchronous invocation. ###### \`max_event_age\`Optional - *Type:* aws_cdk.core.Duration - *Default:* Duration.hours(6) The maximum age of a request that Lambda sends to a function for processing. Minimum: 60 seconds Maximum: 6 hours --- ###### \`on_failure\`Optional - *Type:* aws_cdk.aws_lambda.IDestination - *Default:* no destination The destination for failed invocations. --- ###### \`on_success\`Optional - *Type:* aws_cdk.aws_lambda.IDestination - *Default:* no destination The destination for successful invocations. --- ###### \`retry_attempts\`Optional - *Type:* typing.Union[int, float] - *Default:* 2 The maximum number of times to retry when the function returns an error. Minimum: 0 Maximum: 2 --- ##### \`grant_invoke\` \`\`\`python def grant_invoke( identity: IGrantable ) -> Grant \`\`\` Grant the given identity permissions to invoke this Lambda. ###### \`identity\`Required - *Type:* aws_cdk.aws_iam.IGrantable --- ##### \`metric\` \`\`\`python def metric( metric_name: str, account: str = None, color: str = None, dimensions: typing.Mapping[typing.Any] = None, dimensions_map: typing.Mapping[str] = None, label: str = None, period: Duration = None, region: str = None, statistic: str = None, unit: Unit = None ) -> Metric \`\`\` Return the given named metric for this Lambda Return the given named metric for this Function. Return the given named metric for this Lambda Return the given named metric for this Function. ###### \`metric_name\`Required - *Type:* str --- ###### \`account\`Optional - *Type:* str - *Default:* Deployment account. Account which this metric comes from. --- ###### \`color\`Optional - *Type:* str - *Default:* Automatic color The hex color code, prefixed with '#' (e.g. '#00ff00'), to use when this metric is rendered on a graph. The \`Color\` class has a set of standard colors that can be used here. --- ###### ~~\`dimensions\`~~Optional - *Deprecated:* Use 'dimensionsMap' instead. - *Type:* typing.Mapping[typing.Any] - *Default:* No dimensions. Dimensions of the metric. --- ###### \`dimensions_map\`Optional - *Type:* typing.Mapping[str] - *Default:* No dimensions. Dimensions of the metric. --- ###### \`label\`Optional - *Type:* str - *Default:* No label Label for this metric when added to a Graph in a Dashboard. --- ###### \`period\`Optional - *Type:* aws_cdk.core.Duration - *Default:* Duration.minutes(5) The period over which the specified statistic is applied. --- ###### \`region\`Optional - *Type:* str - *Default:* Deployment region. Region which this metric comes from. --- ###### \`statistic\`Optional - *Type:* str - *Default:* Average What function to use for aggregating. Can be one of the following: - "Minimum" | "min" - "Maximum" | "max" - "Average" | "avg" - "Sum" | "sum" - "SampleCount | "n" - "pNN.NN" --- ###### \`unit\`Optional - *Type:* aws_cdk.aws_cloudwatch.Unit - *Default:* All metric datums in the given metric stream Unit used to filter the metric stream. Only refer to datums emitted to the metric stream with the given unit and ignore all others. Only useful when datums are being emitted to the same metric stream under different units. The default is to use all matric datums in the stream, regardless of unit, which is recommended in nearly all cases. CloudWatch does not honor this property for graphs. --- ##### \`metric_duration\` \`\`\`python def metric_duration( account: str = None, color: str = None, dimensions: typing.Mapping[typing.Any] = None, dimensions_map: typing.Mapping[str] = None, label: str = None, period: Duration = None, region: str = None, statistic: str = None, unit: Unit = None ) -> Metric \`\`\` Metric for the Duration of this Lambda How long execution of this Lambda takes. Average over 5 minutes Metric for the Duration of this Lambda How long execution of this Lambda takes. Average over 5 minutes ###### \`account\`Optional - *Type:* str - *Default:* Deployment account. Account which this metric comes from. --- ###### \`color\`Optional - *Type:* str - *Default:* Automatic color The hex color code, prefixed with '#' (e.g. '#00ff00'), to use when this metric is rendered on a graph. The \`Color\` class has a set of standard colors that can be used here. --- ###### ~~\`dimensions\`~~Optional - *Deprecated:* Use 'dimensionsMap' instead. - *Type:* typing.Mapping[typing.Any] - *Default:* No dimensions. Dimensions of the metric. --- ###### \`dimensions_map\`Optional - *Type:* typing.Mapping[str] - *Default:* No dimensions. Dimensions of the metric. --- ###### \`label\`Optional - *Type:* str - *Default:* No label Label for this metric when added to a Graph in a Dashboard. --- ###### \`period\`Optional - *Type:* aws_cdk.core.Duration - *Default:* Duration.minutes(5) The period over which the specified statistic is applied. --- ###### \`region\`Optional - *Type:* str - *Default:* Deployment region. Region which this metric comes from. --- ###### \`statistic\`Optional - *Type:* str - *Default:* Average What function to use for aggregating. Can be one of the following: - "Minimum" | "min" - "Maximum" | "max" - "Average" | "avg" - "Sum" | "sum" - "SampleCount | "n" - "pNN.NN" --- ###### \`unit\`Optional - *Type:* aws_cdk.aws_cloudwatch.Unit - *Default:* All metric datums in the given metric stream Unit used to filter the metric stream. Only refer to datums emitted to the metric stream with the given unit and ignore all others. Only useful when datums are being emitted to the same metric stream under different units. The default is to use all matric datums in the stream, regardless of unit, which is recommended in nearly all cases. CloudWatch does not honor this property for graphs. --- ##### \`metric_errors\` \`\`\`python def metric_errors( account: str = None, color: str = None, dimensions: typing.Mapping[typing.Any] = None, dimensions_map: typing.Mapping[str] = None, label: str = None, period: Duration = None, region: str = None, statistic: str = None, unit: Unit = None ) -> Metric \`\`\` How many invocations of this Lambda fail. Sum over 5 minutes ###### \`account\`Optional - *Type:* str - *Default:* Deployment account. Account which this metric comes from. --- ###### \`color\`Optional - *Type:* str - *Default:* Automatic color The hex color code, prefixed with '#' (e.g. '#00ff00'), to use when this metric is rendered on a graph. The \`Color\` class has a set of standard colors that can be used here. --- ###### ~~\`dimensions\`~~Optional - *Deprecated:* Use 'dimensionsMap' instead. - *Type:* typing.Mapping[typing.Any] - *Default:* No dimensions. Dimensions of the metric. --- ###### \`dimensions_map\`Optional - *Type:* typing.Mapping[str] - *Default:* No dimensions. Dimensions of the metric. --- ###### \`label\`Optional - *Type:* str - *Default:* No label Label for this metric when added to a Graph in a Dashboard. --- ###### \`period\`Optional - *Type:* aws_cdk.core.Duration - *Default:* Duration.minutes(5) The period over which the specified statistic is applied. --- ###### \`region\`Optional - *Type:* str - *Default:* Deployment region. Region which this metric comes from. --- ###### \`statistic\`Optional - *Type:* str - *Default:* Average What function to use for aggregating. Can be one of the following: - "Minimum" | "min" - "Maximum" | "max" - "Average" | "avg" - "Sum" | "sum" - "SampleCount | "n" - "pNN.NN" --- ###### \`unit\`Optional - *Type:* aws_cdk.aws_cloudwatch.Unit - *Default:* All metric datums in the given metric stream Unit used to filter the metric stream. Only refer to datums emitted to the metric stream with the given unit and ignore all others. Only useful when datums are being emitted to the same metric stream under different units. The default is to use all matric datums in the stream, regardless of unit, which is recommended in nearly all cases. CloudWatch does not honor this property for graphs. --- ##### \`metric_invocations\` \`\`\`python def metric_invocations( account: str = None, color: str = None, dimensions: typing.Mapping[typing.Any] = None, dimensions_map: typing.Mapping[str] = None, label: str = None, period: Duration = None, region: str = None, statistic: str = None, unit: Unit = None ) -> Metric \`\`\` Metric for the number of invocations of this Lambda How often this Lambda is invoked. Sum over 5 minutes Metric for the number of invocations of this Lambda How often this Lambda is invoked. Sum over 5 minutes ###### \`account\`Optional - *Type:* str - *Default:* Deployment account. Account which this metric comes from. --- ###### \`color\`Optional - *Type:* str - *Default:* Automatic color The hex color code, prefixed with '#' (e.g. '#00ff00'), to use when this metric is rendered on a graph. The \`Color\` class has a set of standard colors that can be used here. --- ###### ~~\`dimensions\`~~Optional - *Deprecated:* Use 'dimensionsMap' instead. - *Type:* typing.Mapping[typing.Any] - *Default:* No dimensions. Dimensions of the metric. --- ###### \`dimensions_map\`Optional - *Type:* typing.Mapping[str] - *Default:* No dimensions. Dimensions of the metric. --- ###### \`label\`Optional - *Type:* str - *Default:* No label Label for this metric when added to a Graph in a Dashboard. --- ###### \`period\`Optional - *Type:* aws_cdk.core.Duration - *Default:* Duration.minutes(5) The period over which the specified statistic is applied. --- ###### \`region\`Optional - *Type:* str - *Default:* Deployment region. Region which this metric comes from. --- ###### \`statistic\`Optional - *Type:* str - *Default:* Average What function to use for aggregating. Can be one of the following: - "Minimum" | "min" - "Maximum" | "max" - "Average" | "avg" - "Sum" | "sum" - "SampleCount | "n" - "pNN.NN" --- ###### \`unit\`Optional - *Type:* aws_cdk.aws_cloudwatch.Unit - *Default:* All metric datums in the given metric stream Unit used to filter the metric stream. Only refer to datums emitted to the metric stream with the given unit and ignore all others. Only useful when datums are being emitted to the same metric stream under different units. The default is to use all matric datums in the stream, regardless of unit, which is recommended in nearly all cases. CloudWatch does not honor this property for graphs. --- ##### \`metric_throttles\` \`\`\`python def metric_throttles( account: str = None, color: str = None, dimensions: typing.Mapping[typing.Any] = None, dimensions_map: typing.Mapping[str] = None, label: str = None, period: Duration = None, region: str = None, statistic: str = None, unit: Unit = None ) -> Metric \`\`\` Metric for the number of throttled invocations of this Lambda How often this Lambda is throttled. Sum over 5 minutes Metric for the number of throttled invocations of this Lambda How often this Lambda is throttled. Sum over 5 minutes ###### \`account\`Optional - *Type:* str - *Default:* Deployment account. Account which this metric comes from. --- ###### \`color\`Optional - *Type:* str - *Default:* Automatic color The hex color code, prefixed with '#' (e.g. '#00ff00'), to use when this metric is rendered on a graph. The \`Color\` class has a set of standard colors that can be used here. --- ###### ~~\`dimensions\`~~Optional - *Deprecated:* Use 'dimensionsMap' instead. - *Type:* typing.Mapping[typing.Any] - *Default:* No dimensions. Dimensions of the metric. --- ###### \`dimensions_map\`Optional - *Type:* typing.Mapping[str] - *Default:* No dimensions. Dimensions of the metric. --- ###### \`label\`Optional - *Type:* str - *Default:* No label Label for this metric when added to a Graph in a Dashboard. --- ###### \`period\`Optional - *Type:* aws_cdk.core.Duration - *Default:* Duration.minutes(5) The period over which the specified statistic is applied. --- ###### \`region\`Optional - *Type:* str - *Default:* Deployment region. Region which this metric comes from. --- ###### \`statistic\`Optional - *Type:* str - *Default:* Average What function to use for aggregating. Can be one of the following: - "Minimum" | "min" - "Maximum" | "max" - "Average" | "avg" - "Sum" | "sum" - "SampleCount | "n" - "pNN.NN" --- ###### \`unit\`Optional - *Type:* aws_cdk.aws_cloudwatch.Unit - *Default:* All metric datums in the given metric stream Unit used to filter the metric stream. Only refer to datums emitted to the metric stream with the given unit and ignore all others. Only useful when datums are being emitted to the same metric stream under different units. The default is to use all matric datums in the stream, regardless of unit, which is recommended in nearly all cases. CloudWatch does not honor this property for graphs. --- #### Static Functions | **Name** | **Description** | | --- | --- | | is_construct | Return whether the given object is a Construct. | | is_resource | Check whether the given construct is a Resource. | --- ##### \`is_construct\` \`\`\`python from aws_cdk import aws_cloudfront experimental.EdgeFunction.is_construct( x: typing.Any ) \`\`\` Return whether the given object is a Construct. ###### \`x\`Required - *Type:* typing.Any --- ##### \`is_resource\` \`\`\`python from aws_cdk import aws_cloudfront experimental.EdgeFunction.is_resource( construct: IConstruct ) \`\`\` Check whether the given construct is a Resource. ###### \`construct\`Required - *Type:* aws_cdk.core.IConstruct --- #### Properties | **Name** | **Type** | **Description** | | --- | --- | --- | | node | aws_cdk.core.ConstructNode | The construct tree node associated with this construct. | | env | aws_cdk.core.ResourceEnvironment | The environment this resource belongs to. | | stack | aws_cdk.core.Stack | The stack in which this resource is defined. | | connections | aws_cdk.aws_ec2.Connections | Not supported. | | current_version | aws_cdk.aws_lambda.IVersion | Convenience method to make \`EdgeFunction\` conform to the same interface as \`Function\`. | | edge_arn | str | The ARN of the version for Lambda@Edge. | | function_arn | str | The ARN of the function. | | function_name | str | The name of the function. | | grant_principal | aws_cdk.aws_iam.IPrincipal | The principal to grant permissions to. | | is_bound_to_vpc | bool | Whether or not this Lambda function was bound to a VPC. | | lambda | aws_cdk.aws_lambda.IFunction | The underlying AWS Lambda function. | | latest_version | aws_cdk.aws_lambda.IVersion | The \`$LATEST\` version of this function. | | permissions_node | aws_cdk.core.ConstructNode | The construct node where permissions are attached. | | version | str | The most recently deployed version of this function. | | role | aws_cdk.aws_iam.IRole | The IAM role associated with this function. | --- ##### \`node\`Required \`\`\`python node: ConstructNode \`\`\` - *Type:* aws_cdk.core.ConstructNode The construct tree node associated with this construct. --- ##### \`env\`Required \`\`\`python env: ResourceEnvironment \`\`\` - *Type:* aws_cdk.core.ResourceEnvironment The environment this resource belongs to. For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into. --- ##### \`stack\`Required \`\`\`python stack: Stack \`\`\` - *Type:* aws_cdk.core.Stack The stack in which this resource is defined. --- ##### \`connections\`Required \`\`\`python connections: Connections \`\`\` - *Type:* aws_cdk.aws_ec2.Connections Not supported. Connections are only applicable to VPC-enabled functions. --- ##### \`current_version\`Required \`\`\`python current_version: IVersion \`\`\` - *Type:* aws_cdk.aws_lambda.IVersion Convenience method to make \`EdgeFunction\` conform to the same interface as \`Function\`. --- ##### \`edge_arn\`Required \`\`\`python edge_arn: str \`\`\` - *Type:* str The ARN of the version for Lambda@Edge. --- ##### \`function_arn\`Required \`\`\`python function_arn: str \`\`\` - *Type:* str The ARN of the function. --- ##### \`function_name\`Required \`\`\`python function_name: str \`\`\` - *Type:* str The name of the function. --- ##### \`grant_principal\`Required \`\`\`python grant_principal: IPrincipal \`\`\` - *Type:* aws_cdk.aws_iam.IPrincipal The principal to grant permissions to. --- ##### \`is_bound_to_vpc\`Required \`\`\`python is_bound_to_vpc: bool \`\`\` - *Type:* bool Whether or not this Lambda function was bound to a VPC. If this is is \`false\`, trying to access the \`connections\` object will fail. --- ##### \`lambda\`Required \`\`\`python lambda: IFunction \`\`\` - *Type:* aws_cdk.aws_lambda.IFunction The underlying AWS Lambda function. --- ##### \`latest_version\`Required \`\`\`python latest_version: IVersion \`\`\` - *Type:* aws_cdk.aws_lambda.IVersion The \`$LATEST\` version of this function. Note that this is reference to a non-specific AWS Lambda version, which means the function this version refers to can return different results in different invocations. To obtain a reference to an explicit version which references the current function configuration, use \`lambdaFunction.currentVersion\` instead. --- ##### \`permissions_node\`Required \`\`\`python permissions_node: ConstructNode \`\`\` - *Type:* aws_cdk.core.ConstructNode The construct node where permissions are attached. --- ##### \`version\`Required \`\`\`python version: str \`\`\` - *Type:* str The most recently deployed version of this function. --- ##### \`role\`Optional \`\`\`python role: IRole \`\`\` - *Type:* aws_cdk.aws_iam.IRole The IAM role associated with this function. --- ## Structs ### EdgeFunctionProps Properties for creating a Lambda@Edge function. #### Initializer \`\`\`python from aws_cdk import aws_cloudfront experimental.EdgeFunctionProps( max_event_age: Duration = None, on_failure: IDestination = None, on_success: IDestination = None, retry_attempts: typing.Union[int, float] = None, allow_all_outbound: bool = None, allow_public_subnet: bool = None, architectures: typing.List[Architecture] = None, code_signing_config: ICodeSigningConfig = None, current_version_options: VersionOptions = None, dead_letter_queue: IQueue = None, dead_letter_queue_enabled: bool = None, description: str = None, environment: typing.Mapping[str] = None, environment_encryption: IKey = None, events: typing.List[IEventSource] = None, filesystem: FileSystem = None, function_name: str = None, initial_policy: typing.List[PolicyStatement] = None, insights_version: LambdaInsightsVersion = None, layers: typing.List[ILayerVersion] = None, log_retention: RetentionDays = None, log_retention_retry_options: LogRetentionRetryOptions = None, log_retention_role: IRole = None, memory_size: typing.Union[int, float] = None, profiling: bool = None, profiling_group: IProfilingGroup = None, reserved_concurrent_executions: typing.Union[int, float] = None, role: IRole = None, security_group: ISecurityGroup = None, security_groups: typing.List[ISecurityGroup] = None, timeout: Duration = None, tracing: Tracing = None, vpc: IVpc = None, vpc_subnets: SubnetSelection = None, code: Code, handler: str, runtime: Runtime, stack_id: str = None ) \`\`\` #### Properties | **Name** | **Type** | **Description** | | --- | --- | --- | | max_event_age | aws_cdk.core.Duration | The maximum age of a request that Lambda sends to a function for processing. | | on_failure | aws_cdk.aws_lambda.IDestination | The destination for failed invocations. | | on_success | aws_cdk.aws_lambda.IDestination | The destination for successful invocations. | | retry_attempts | typing.Union[int, float] | The maximum number of times to retry when the function returns an error. | | allow_all_outbound | bool | Whether to allow the Lambda to send all network traffic. | | allow_public_subnet | bool | Lambda Functions in a public subnet can NOT access the internet. | | architectures | typing.List[aws_cdk.aws_lambda.Architecture] | The system architectures compatible with this lambda function. | | code_signing_config | aws_cdk.aws_lambda.ICodeSigningConfig | Code signing config associated with this function. | | current_version_options | aws_cdk.aws_lambda.VersionOptions | Options for the \`lambda.Version\` resource automatically created by the \`fn.currentVersion\` method. | | dead_letter_queue | aws_cdk.aws_sqs.IQueue | The SQS queue to use if DLQ is enabled. | | dead_letter_queue_enabled | bool | Enabled DLQ. | | description | str | A description of the function. | | environment | typing.Mapping[str] | Key-value pairs that Lambda caches and makes available for your Lambda functions. | | environment_encryption | aws_cdk.aws_kms.IKey | The AWS KMS key that's used to encrypt your function's environment variables. | | events | typing.List[aws_cdk.aws_lambda.IEventSource] | Event sources for this function. | | filesystem | aws_cdk.aws_lambda.FileSystem | The filesystem configuration for the lambda function. | | function_name | str | A name for the function. | | initial_policy | typing.List[aws_cdk.aws_iam.PolicyStatement] | Initial policy statements to add to the created Lambda Role. | | insights_version | aws_cdk.aws_lambda.LambdaInsightsVersion | Specify the version of CloudWatch Lambda insights to use for monitoring. | | layers | typing.List[aws_cdk.aws_lambda.ILayerVersion] | A list of layers to add to the function's execution environment. | | log_retention | aws_cdk.aws_logs.RetentionDays | The number of days log events are kept in CloudWatch Logs. | | log_retention_retry_options | aws_cdk.aws_lambda.LogRetentionRetryOptions | When log retention is specified, a custom resource attempts to create the CloudWatch log group. | | log_retention_role | aws_cdk.aws_iam.IRole | The IAM role for the Lambda function associated with the custom resource that sets the retention policy. | | memory_size | typing.Union[int, float] | The amount of memory, in MB, that is allocated to your Lambda function. | | profiling | bool | Enable profiling. | | profiling_group | aws_cdk.aws_codeguruprofiler.IProfilingGroup | Profiling Group. | | reserved_concurrent_executions | typing.Union[int, float] | The maximum of concurrent executions you want to reserve for the function. | | role | aws_cdk.aws_iam.IRole | Lambda execution role. | | security_group | aws_cdk.aws_ec2.ISecurityGroup | What security group to associate with the Lambda's network interfaces. This property is being deprecated, consider using securityGroups instead. | | security_groups | typing.List[aws_cdk.aws_ec2.ISecurityGroup] | The list of security groups to associate with the Lambda's network interfaces. | | timeout | aws_cdk.core.Duration | The function execution time (in seconds) after which Lambda terminates the function. | | tracing | aws_cdk.aws_lambda.Tracing | Enable AWS X-Ray Tracing for Lambda Function. | | vpc | aws_cdk.aws_ec2.IVpc | VPC network to place Lambda network interfaces. | | vpc_subnets | aws_cdk.aws_ec2.SubnetSelection | Where to place the network interfaces within the VPC. | | code | aws_cdk.aws_lambda.Code | The source code of your Lambda function. | | handler | str | The name of the method within your code that Lambda calls to execute your function. | | runtime | aws_cdk.aws_lambda.Runtime | The runtime environment for the Lambda function that you are uploading. | | stack_id | str | The stack ID of Lambda@Edge function. | --- ##### \`max_event_age\`Optional \`\`\`python max_event_age: Duration \`\`\` - *Type:* aws_cdk.core.Duration - *Default:* Duration.hours(6) The maximum age of a request that Lambda sends to a function for processing. Minimum: 60 seconds Maximum: 6 hours --- ##### \`on_failure\`Optional \`\`\`python on_failure: IDestination \`\`\` - *Type:* aws_cdk.aws_lambda.IDestination - *Default:* no destination The destination for failed invocations. --- ##### \`on_success\`Optional \`\`\`python on_success: IDestination \`\`\` - *Type:* aws_cdk.aws_lambda.IDestination - *Default:* no destination The destination for successful invocations. --- ##### \`retry_attempts\`Optional \`\`\`python retry_attempts: typing.Union[int, float] \`\`\` - *Type:* typing.Union[int, float] - *Default:* 2 The maximum number of times to retry when the function returns an error. Minimum: 0 Maximum: 2 --- ##### \`allow_all_outbound\`Optional \`\`\`python allow_all_outbound: bool \`\`\` - *Type:* bool - *Default:* true Whether to allow the Lambda to send all network traffic. If set to false, you must individually add traffic rules to allow the Lambda to connect to network targets. --- ##### \`allow_public_subnet\`Optional \`\`\`python allow_public_subnet: bool \`\`\` - *Type:* bool - *Default:* false Lambda Functions in a public subnet can NOT access the internet. Use this property to acknowledge this limitation and still place the function in a public subnet. > [https://stackoverflow.com/questions/52992085/why-cant-an-aws-lambda-function-inside-a-public-subnet-in-a-vpc-connect-to-the/52994841#52994841](https://stackoverflow.com/questions/52992085/why-cant-an-aws-lambda-function-inside-a-public-subnet-in-a-vpc-connect-to-the/52994841#52994841) --- ##### \`architectures\`Optional \`\`\`python architectures: typing.List[Architecture] \`\`\` - *Type:* typing.List[aws_cdk.aws_lambda.Architecture] - *Default:* [Architecture.X86_64] The system architectures compatible with this lambda function. --- ##### \`code_signing_config\`Optional \`\`\`python code_signing_config: ICodeSigningConfig \`\`\` - *Type:* aws_cdk.aws_lambda.ICodeSigningConfig - *Default:* Not Sign the Code Code signing config associated with this function. --- ##### \`current_version_options\`Optional \`\`\`python current_version_options: VersionOptions \`\`\` - *Type:* aws_cdk.aws_lambda.VersionOptions - *Default:* default options as described in \`VersionOptions\` Options for the \`lambda.Version\` resource automatically created by the \`fn.currentVersion\` method. --- ##### \`dead_letter_queue\`Optional \`\`\`python dead_letter_queue: IQueue \`\`\` - *Type:* aws_cdk.aws_sqs.IQueue - *Default:* SQS queue with 14 day retention period if \`deadLetterQueueEnabled\` is \`true\` The SQS queue to use if DLQ is enabled. --- ##### \`dead_letter_queue_enabled\`Optional \`\`\`python dead_letter_queue_enabled: bool \`\`\` - *Type:* bool - *Default:* false unless \`deadLetterQueue\` is set, which implies DLQ is enabled. Enabled DLQ. If \`deadLetterQueue\` is undefined, an SQS queue with default options will be defined for your Function. --- ##### \`description\`Optional \`\`\`python description: str \`\`\` - *Type:* str - *Default:* No description. A description of the function. --- ##### \`environment\`Optional \`\`\`python environment: typing.Mapping[str] \`\`\` - *Type:* typing.Mapping[str] - *Default:* No environment variables. Key-value pairs that Lambda caches and makes available for your Lambda functions. Use environment variables to apply configuration changes, such as test and production environment configurations, without changing your Lambda function source code. --- ##### \`environment_encryption\`Optional \`\`\`python environment_encryption: IKey \`\`\` - *Type:* aws_cdk.aws_kms.IKey - *Default:* AWS Lambda creates and uses an AWS managed customer master key (CMK). The AWS KMS key that's used to encrypt your function's environment variables. --- ##### \`events\`Optional \`\`\`python events: typing.List[IEventSource] \`\`\` - *Type:* typing.List[aws_cdk.aws_lambda.IEventSource] - *Default:* No event sources. Event sources for this function. You can also add event sources using \`addEventSource\`. --- ##### \`filesystem\`Optional \`\`\`python filesystem: FileSystem \`\`\` - *Type:* aws_cdk.aws_lambda.FileSystem - *Default:* will not mount any filesystem The filesystem configuration for the lambda function. --- ##### \`function_name\`Optional \`\`\`python function_name: str \`\`\` - *Type:* str - *Default:* AWS CloudFormation generates a unique physical ID and uses that ID for the function's name. For more information, see Name Type. A name for the function. --- ##### \`initial_policy\`Optional \`\`\`python initial_policy: typing.List[PolicyStatement] \`\`\` - *Type:* typing.List[aws_cdk.aws_iam.PolicyStatement] - *Default:* No policy statements are added to the created Lambda role. Initial policy statements to add to the created Lambda Role. You can call \`addToRolePolicy\` to the created lambda to add statements post creation. --- ##### \`insights_version\`Optional \`\`\`python insights_version: LambdaInsightsVersion \`\`\` - *Type:* aws_cdk.aws_lambda.LambdaInsightsVersion - *Default:* No Lambda Insights Specify the version of CloudWatch Lambda insights to use for monitoring. > [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Lambda-Insights.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Lambda-Insights.html) --- ##### \`layers\`Optional \`\`\`python layers: typing.List[ILayerVersion] \`\`\` - *Type:* typing.List[aws_cdk.aws_lambda.ILayerVersion] - *Default:* No layers. A list of layers to add to the function's execution environment. You can configure your Lambda function to pull in additional code during initialization in the form of layers. Layers are packages of libraries or other dependencies that can be used by multiple functions. --- ##### \`log_retention\`Optional \`\`\`python log_retention: RetentionDays \`\`\` - *Type:* aws_cdk.aws_logs.RetentionDays - *Default:* logs.RetentionDays.INFINITE The number of days log events are kept in CloudWatch Logs. When updating this property, unsetting it doesn't remove the log retention policy. To remove the retention policy, set the value to \`INFINITE\`. --- ##### \`log_retention_retry_options\`Optional \`\`\`python log_retention_retry_options: LogRetentionRetryOptions \`\`\` - *Type:* aws_cdk.aws_lambda.LogRetentionRetryOptions - *Default:* Default AWS SDK retry options. When log retention is specified, a custom resource attempts to create the CloudWatch log group. These options control the retry policy when interacting with CloudWatch APIs. --- ##### \`log_retention_role\`Optional \`\`\`python log_retention_role: IRole \`\`\` - *Type:* aws_cdk.aws_iam.IRole - *Default:* A new role is created. The IAM role for the Lambda function associated with the custom resource that sets the retention policy. --- ##### \`memory_size\`Optional \`\`\`python memory_size: typing.Union[int, float] \`\`\` - *Type:* typing.Union[int, float] - *Default:* 128 The amount of memory, in MB, that is allocated to your Lambda function. Lambda uses this value to proportionally allocate the amount of CPU power. For more information, see Resource Model in the AWS Lambda Developer Guide. --- ##### \`profiling\`Optional \`\`\`python profiling: bool \`\`\` - *Type:* bool - *Default:* No profiling. Enable profiling. > [https://docs.aws.amazon.com/codeguru/latest/profiler-ug/setting-up-lambda.html](https://docs.aws.amazon.com/codeguru/latest/profiler-ug/setting-up-lambda.html) --- ##### \`profiling_group\`Optional \`\`\`python profiling_group: IProfilingGroup \`\`\` - *Type:* aws_cdk.aws_codeguruprofiler.IProfilingGroup - *Default:* A new profiling group will be created if \`profiling\` is set. Profiling Group. > [https://docs.aws.amazon.com/codeguru/latest/profiler-ug/setting-up-lambda.html](https://docs.aws.amazon.com/codeguru/latest/profiler-ug/setting-up-lambda.html) --- ##### \`reserved_concurrent_executions\`Optional \`\`\`python reserved_concurrent_executions: typing.Union[int, float] \`\`\` - *Type:* typing.Union[int, float] - *Default:* No specific limit - account limit. The maximum of concurrent executions you want to reserve for the function. > [https://docs.aws.amazon.com/lambda/latest/dg/concurrent-executions.html](https://docs.aws.amazon.com/lambda/latest/dg/concurrent-executions.html) --- ##### \`role\`Optional \`\`\`python role: IRole \`\`\` - *Type:* aws_cdk.aws_iam.IRole - *Default:* A unique role will be generated for this lambda function. Both supplied and generated roles can always be changed by calling \`addToRolePolicy\`. Lambda execution role. This is the role that will be assumed by the function upon execution. It controls the permissions that the function will have. The Role must be assumable by the 'lambda.amazonaws.com' service principal. The default Role automatically has permissions granted for Lambda execution. If you provide a Role, you must add the relevant AWS managed policies yourself. The relevant managed policies are "service-role/AWSLambdaBasicExecutionRole" and "service-role/AWSLambdaVPCAccessExecutionRole". --- ##### ~~\`security_group\`~~Optional - *Deprecated:* - This property is deprecated, use securityGroups instead \`\`\`python security_group: ISecurityGroup \`\`\` - *Type:* aws_cdk.aws_ec2.ISecurityGroup - *Default:* If the function is placed within a VPC and a security group is not specified, either by this or securityGroups prop, a dedicated security group will be created for this function. What security group to associate with the Lambda's network interfaces. This property is being deprecated, consider using securityGroups instead. Only used if 'vpc' is supplied. Use securityGroups property instead. Function constructor will throw an error if both are specified. --- ##### \`security_groups\`Optional \`\`\`python security_groups: typing.List[ISecurityGroup] \`\`\` - *Type:* typing.List[aws_cdk.aws_ec2.ISecurityGroup] - *Default:* If the function is placed within a VPC and a security group is not specified, either by this or securityGroup prop, a dedicated security group will be created for this function. The list of security groups to associate with the Lambda's network interfaces. Only used if 'vpc' is supplied. --- ##### \`timeout\`Optional \`\`\`python timeout: Duration \`\`\` - *Type:* aws_cdk.core.Duration - *Default:* Duration.seconds(3) The function execution time (in seconds) after which Lambda terminates the function. Because the execution time affects cost, set this value based on the function's expected execution time. --- ##### \`tracing\`Optional \`\`\`python tracing: Tracing \`\`\` - *Type:* aws_cdk.aws_lambda.Tracing - *Default:* Tracing.Disabled Enable AWS X-Ray Tracing for Lambda Function. --- ##### \`vpc\`Optional \`\`\`python vpc: IVpc \`\`\` - *Type:* aws_cdk.aws_ec2.IVpc - *Default:* Function is not placed within a VPC. VPC network to place Lambda network interfaces. Specify this if the Lambda function needs to access resources in a VPC. --- ##### \`vpc_subnets\`Optional \`\`\`python vpc_subnets: SubnetSelection \`\`\` - *Type:* aws_cdk.aws_ec2.SubnetSelection - *Default:* the Vpc default strategy if not specified Where to place the network interfaces within the VPC. Only used if 'vpc' is supplied. Note: internet access for Lambdas requires a NAT gateway, so picking Public subnets is not allowed. --- ##### \`code\`Required \`\`\`python code: Code \`\`\` - *Type:* aws_cdk.aws_lambda.Code The source code of your Lambda function. You can point to a file in an Amazon Simple Storage Service (Amazon S3) bucket or specify your source code as inline text. --- ##### \`handler\`Required \`\`\`python handler: str \`\`\` - *Type:* str The name of the method within your code that Lambda calls to execute your function. The format includes the file name. It can also include namespaces and other qualifiers, depending on the runtime. For more information, see https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-features.html#gettingstarted-features-programmingmodel. Use \`Handler.FROM_IMAGE\` when defining a function from a Docker image. NOTE: If you specify your source code as inline text by specifying the ZipFile property within the Code property, specify index.function_name as the handler. --- ##### \`runtime\`Required \`\`\`python runtime: Runtime \`\`\` - *Type:* aws_cdk.aws_lambda.Runtime The runtime environment for the Lambda function that you are uploading. For valid values, see the Runtime property in the AWS Lambda Developer Guide. Use \`Runtime.FROM_IMAGE\` when when defining a function from a Docker image. --- ##### \`stack_id\`Optional \`\`\`python stack_id: str \`\`\` - *Type:* str - *Default:* \`edge-lambda-stack-\${region}\` The stack ID of Lambda@Edge function. --- " `;