interface AliasOptions
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.Lambda.AliasOptions |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awslambda#AliasOptions |
![]() | software.amazon.awscdk.services.lambda.AliasOptions |
![]() | aws_cdk.aws_lambda.AliasOptions |
![]() | aws-cdk-lib » aws_lambda » AliasOptions |
Options for lambda.Alias
.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
import { aws_lambda as lambda } from 'aws-cdk-lib';
declare const destination: lambda.IDestination;
declare const version: lambda.Version;
const aliasOptions: lambda.AliasOptions = {
additionalVersions: [{
version: version,
weight: 123,
}],
description: 'description',
maxEventAge: cdk.Duration.minutes(30),
onFailure: destination,
onSuccess: destination,
provisionedConcurrentExecutions: 123,
retryAttempts: 123,
};
Properties
Name | Type | Description |
---|---|---|
additional | Version [] | Additional versions with individual weights this alias points to. |
description? | string | Description for the alias. |
max | Duration | The maximum age of a request that Lambda sends to a function for processing. |
on | IDestination | The destination for failed invocations. |
on | IDestination | The destination for successful invocations. |
provisioned | number | Specifies a provisioned concurrency configuration for a function's alias. |
retry | number | The maximum number of times to retry when the function returns an error. |
additionalVersions?
Type:
Version
[]
(optional, 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?
Type:
string
(optional, default: No description)
Description for the alias.
maxEventAge?
Type:
Duration
(optional, 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?
Type:
IDestination
(optional, default: no destination)
The destination for failed invocations.
onSuccess?
Type:
IDestination
(optional, default: no destination)
The destination for successful invocations.
provisionedConcurrentExecutions?
Type:
number
(optional, default: No provisioned concurrency)
Specifies a provisioned concurrency configuration for a function's alias.
retryAttempts?
Type:
number
(optional, default: 2)
The maximum number of times to retry when the function returns an error.
Minimum: 0 Maximum: 2