LambdaDeploymentConfigProps Struct
Construction properties of LambdaDeploymentConfig.
| Source | aws-codedeploy/lib/lambda/deployment-config.ts |
|---|---|
| Type last changed |
Example
ts
const config = new codedeploy.LambdaDeploymentConfig(this, 'CustomConfig', {
trafficRouting: new codedeploy.TimeBasedCanaryTrafficRouting({
interval: Duration.minutes(15),
percentage: 5,
}),
});
declare const application: codedeploy.LambdaApplication;
declare const alias: lambda.Alias;
const deploymentGroup = new codedeploy.LambdaDeploymentGroup(this, 'BlueGreenDeployment', {
application,
alias,
deploymentConfig: config,
});
python
# application: codedeploy.LambdaApplication
# alias: lambda.Alias
config = codedeploy.LambdaDeploymentConfig(self, "CustomConfig",
traffic_routing=codedeploy.TimeBasedCanaryTrafficRouting(
interval=Duration.minutes(15),
percentage=5
)
)
deployment_group = codedeploy.LambdaDeploymentGroup(self, "BlueGreenDeployment",
application=application,
alias=alias,
deployment_config=config
)
java
LambdaApplication application;
Alias alias;
LambdaDeploymentConfig config = LambdaDeploymentConfig.Builder.create(this, "CustomConfig")
.trafficRouting(TimeBasedCanaryTrafficRouting.Builder.create()
.interval(Duration.minutes(15))
.percentage(5)
.build())
.build();
LambdaDeploymentGroup deploymentGroup = LambdaDeploymentGroup.Builder.create(this, "BlueGreenDeployment")
.application(application)
.alias(alias)
.deploymentConfig(config)
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
LambdaApplication application;
Alias alias;
var config = new LambdaDeploymentConfig(this, "CustomConfig", new LambdaDeploymentConfigProps {
TrafficRouting = new TimeBasedCanaryTrafficRouting(new TimeBasedCanaryTrafficRoutingProps {
Interval = Duration.Minutes(15),
Percentage = 5
})
});
var deploymentGroup = new LambdaDeploymentGroup(this, "BlueGreenDeployment", new LambdaDeploymentGroupProps {
Application = application,
Alias = alias,
DeploymentConfig = config
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
var application LambdaApplication
var alias Alias
config := codedeploy.NewLambdaDeploymentConfig(this, jsii.String("CustomConfig"), &LambdaDeploymentConfigProps{
TrafficRouting: codedeploy.NewTimeBasedCanaryTrafficRouting(&TimeBasedCanaryTrafficRoutingProps{
Interval: awscdk.Duration_Minutes(jsii.Number(15)),
Percentage: jsii.Number(5),
}),
})
deploymentGroup := codedeploy.NewLambdaDeploymentGroup(this, jsii.String("BlueGreenDeployment"), &LambdaDeploymentGroupProps{
Application: Application,
Alias: Alias,
DeploymentConfig: config,
})
Properties
deploymentConfigNameoptionalstringdeployment_config_nameoptionalstrdeploymentConfigNameoptionalStringDeploymentConfigNameoptionalstringDeploymentConfigNameoptional*string #The physical, human-readable name of the Deployment Configuration.
Default: automatically generated name
trafficRoutingoptionalTrafficRoutingtraffic_routingoptionalTrafficRoutingtrafficRoutingoptionalTrafficRoutingTrafficRoutingoptionalTrafficRoutingTrafficRoutingoptionalTrafficRouting = AllAtOnce #The configuration that specifies how traffic is shifted from the 'blue' target group to the 'green' target group during a deployment.