1. Packages
  2. AWS
  3. API Docs
  4. lambda
  5. ProvisionedConcurrencyConfig
AWS v6.74.0 published on Wednesday, Mar 26, 2025 by Pulumi

aws.lambda.ProvisionedConcurrencyConfig

Explore with Pulumi AI

Manages a Lambda Provisioned Concurrency Configuration.

NOTE: Setting skip_destroy to true means that the AWS Provider will not destroy a provisioned concurrency configuration, even when running pulumi destroy. The configuration is thus an intentional dangling resource that is not managed by Pulumi and may incur extra expense in your AWS account.

Example Usage

Alias Name

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.lambda.ProvisionedConcurrencyConfig("example", {
    functionName: exampleAwsLambdaAlias.functionName,
    provisionedConcurrentExecutions: 1,
    qualifier: exampleAwsLambdaAlias.name,
});
Copy
import pulumi
import pulumi_aws as aws

example = aws.lambda_.ProvisionedConcurrencyConfig("example",
    function_name=example_aws_lambda_alias["functionName"],
    provisioned_concurrent_executions=1,
    qualifier=example_aws_lambda_alias["name"])
Copy
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lambda"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := lambda.NewProvisionedConcurrencyConfig(ctx, "example", &lambda.ProvisionedConcurrencyConfigArgs{
			FunctionName:                    pulumi.Any(exampleAwsLambdaAlias.FunctionName),
			ProvisionedConcurrentExecutions: pulumi.Int(1),
			Qualifier:                       pulumi.Any(exampleAwsLambdaAlias.Name),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = new Aws.Lambda.ProvisionedConcurrencyConfig("example", new()
    {
        FunctionName = exampleAwsLambdaAlias.FunctionName,
        ProvisionedConcurrentExecutions = 1,
        Qualifier = exampleAwsLambdaAlias.Name,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.lambda.ProvisionedConcurrencyConfig;
import com.pulumi.aws.lambda.ProvisionedConcurrencyConfigArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var example = new ProvisionedConcurrencyConfig("example", ProvisionedConcurrencyConfigArgs.builder()
            .functionName(exampleAwsLambdaAlias.functionName())
            .provisionedConcurrentExecutions(1)
            .qualifier(exampleAwsLambdaAlias.name())
            .build());

    }
}
Copy
resources:
  example:
    type: aws:lambda:ProvisionedConcurrencyConfig
    properties:
      functionName: ${exampleAwsLambdaAlias.functionName}
      provisionedConcurrentExecutions: 1
      qualifier: ${exampleAwsLambdaAlias.name}
Copy

Function Version

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.lambda.ProvisionedConcurrencyConfig("example", {
    functionName: exampleAwsLambdaFunction.functionName,
    provisionedConcurrentExecutions: 1,
    qualifier: exampleAwsLambdaFunction.version,
});
Copy
import pulumi
import pulumi_aws as aws

example = aws.lambda_.ProvisionedConcurrencyConfig("example",
    function_name=example_aws_lambda_function["functionName"],
    provisioned_concurrent_executions=1,
    qualifier=example_aws_lambda_function["version"])
Copy
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lambda"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := lambda.NewProvisionedConcurrencyConfig(ctx, "example", &lambda.ProvisionedConcurrencyConfigArgs{
			FunctionName:                    pulumi.Any(exampleAwsLambdaFunction.FunctionName),
			ProvisionedConcurrentExecutions: pulumi.Int(1),
			Qualifier:                       pulumi.Any(exampleAwsLambdaFunction.Version),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = new Aws.Lambda.ProvisionedConcurrencyConfig("example", new()
    {
        FunctionName = exampleAwsLambdaFunction.FunctionName,
        ProvisionedConcurrentExecutions = 1,
        Qualifier = exampleAwsLambdaFunction.Version,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.lambda.ProvisionedConcurrencyConfig;
import com.pulumi.aws.lambda.ProvisionedConcurrencyConfigArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var example = new ProvisionedConcurrencyConfig("example", ProvisionedConcurrencyConfigArgs.builder()
            .functionName(exampleAwsLambdaFunction.functionName())
            .provisionedConcurrentExecutions(1)
            .qualifier(exampleAwsLambdaFunction.version())
            .build());

    }
}
Copy
resources:
  example:
    type: aws:lambda:ProvisionedConcurrencyConfig
    properties:
      functionName: ${exampleAwsLambdaFunction.functionName}
      provisionedConcurrentExecutions: 1
      qualifier: ${exampleAwsLambdaFunction.version}
Copy

Create ProvisionedConcurrencyConfig Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new ProvisionedConcurrencyConfig(name: string, args: ProvisionedConcurrencyConfigArgs, opts?: CustomResourceOptions);
@overload
def ProvisionedConcurrencyConfig(resource_name: str,
                                 args: ProvisionedConcurrencyConfigArgs,
                                 opts: Optional[ResourceOptions] = None)

@overload
def ProvisionedConcurrencyConfig(resource_name: str,
                                 opts: Optional[ResourceOptions] = None,
                                 function_name: Optional[str] = None,
                                 provisioned_concurrent_executions: Optional[int] = None,
                                 qualifier: Optional[str] = None,
                                 skip_destroy: Optional[bool] = None)
func NewProvisionedConcurrencyConfig(ctx *Context, name string, args ProvisionedConcurrencyConfigArgs, opts ...ResourceOption) (*ProvisionedConcurrencyConfig, error)
public ProvisionedConcurrencyConfig(string name, ProvisionedConcurrencyConfigArgs args, CustomResourceOptions? opts = null)
public ProvisionedConcurrencyConfig(String name, ProvisionedConcurrencyConfigArgs args)
public ProvisionedConcurrencyConfig(String name, ProvisionedConcurrencyConfigArgs args, CustomResourceOptions options)
type: aws:lambda:ProvisionedConcurrencyConfig
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ProvisionedConcurrencyConfigArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. ProvisionedConcurrencyConfigArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. ProvisionedConcurrencyConfigArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ProvisionedConcurrencyConfigArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ProvisionedConcurrencyConfigArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var provisionedConcurrencyConfigResource = new Aws.Lambda.ProvisionedConcurrencyConfig("provisionedConcurrencyConfigResource", new()
{
    FunctionName = "string",
    ProvisionedConcurrentExecutions = 0,
    Qualifier = "string",
    SkipDestroy = false,
});
Copy
example, err := lambda.NewProvisionedConcurrencyConfig(ctx, "provisionedConcurrencyConfigResource", &lambda.ProvisionedConcurrencyConfigArgs{
	FunctionName:                    pulumi.String("string"),
	ProvisionedConcurrentExecutions: pulumi.Int(0),
	Qualifier:                       pulumi.String("string"),
	SkipDestroy:                     pulumi.Bool(false),
})
Copy
var provisionedConcurrencyConfigResource = new ProvisionedConcurrencyConfig("provisionedConcurrencyConfigResource", ProvisionedConcurrencyConfigArgs.builder()
    .functionName("string")
    .provisionedConcurrentExecutions(0)
    .qualifier("string")
    .skipDestroy(false)
    .build());
Copy
provisioned_concurrency_config_resource = aws.lambda_.ProvisionedConcurrencyConfig("provisionedConcurrencyConfigResource",
    function_name="string",
    provisioned_concurrent_executions=0,
    qualifier="string",
    skip_destroy=False)
Copy
const provisionedConcurrencyConfigResource = new aws.lambda.ProvisionedConcurrencyConfig("provisionedConcurrencyConfigResource", {
    functionName: "string",
    provisionedConcurrentExecutions: 0,
    qualifier: "string",
    skipDestroy: false,
});
Copy
type: aws:lambda:ProvisionedConcurrencyConfig
properties:
    functionName: string
    provisionedConcurrentExecutions: 0
    qualifier: string
    skipDestroy: false
Copy

ProvisionedConcurrencyConfig Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The ProvisionedConcurrencyConfig resource accepts the following input properties:

FunctionName
This property is required.
Changes to this property will trigger replacement.
string
Name or Amazon Resource Name (ARN) of the Lambda Function.
ProvisionedConcurrentExecutions This property is required. int
Amount of capacity to allocate. Must be greater than or equal to 1.
Qualifier
This property is required.
Changes to this property will trigger replacement.
string

Lambda Function version or Lambda Alias name.

The following arguments are optional:

SkipDestroy bool
Whether to retain the provisoned concurrency configuration upon destruction. Defaults to false. If set to true, the resource in simply removed from state instead.
FunctionName
This property is required.
Changes to this property will trigger replacement.
string
Name or Amazon Resource Name (ARN) of the Lambda Function.
ProvisionedConcurrentExecutions This property is required. int
Amount of capacity to allocate. Must be greater than or equal to 1.
Qualifier
This property is required.
Changes to this property will trigger replacement.
string

Lambda Function version or Lambda Alias name.

The following arguments are optional:

SkipDestroy bool
Whether to retain the provisoned concurrency configuration upon destruction. Defaults to false. If set to true, the resource in simply removed from state instead.
functionName
This property is required.
Changes to this property will trigger replacement.
String
Name or Amazon Resource Name (ARN) of the Lambda Function.
provisionedConcurrentExecutions This property is required. Integer
Amount of capacity to allocate. Must be greater than or equal to 1.
qualifier
This property is required.
Changes to this property will trigger replacement.
String

Lambda Function version or Lambda Alias name.

The following arguments are optional:

skipDestroy Boolean
Whether to retain the provisoned concurrency configuration upon destruction. Defaults to false. If set to true, the resource in simply removed from state instead.
functionName
This property is required.
Changes to this property will trigger replacement.
string
Name or Amazon Resource Name (ARN) of the Lambda Function.
provisionedConcurrentExecutions This property is required. number
Amount of capacity to allocate. Must be greater than or equal to 1.
qualifier
This property is required.
Changes to this property will trigger replacement.
string

Lambda Function version or Lambda Alias name.

The following arguments are optional:

skipDestroy boolean
Whether to retain the provisoned concurrency configuration upon destruction. Defaults to false. If set to true, the resource in simply removed from state instead.
function_name
This property is required.
Changes to this property will trigger replacement.
str
Name or Amazon Resource Name (ARN) of the Lambda Function.
provisioned_concurrent_executions This property is required. int
Amount of capacity to allocate. Must be greater than or equal to 1.
qualifier
This property is required.
Changes to this property will trigger replacement.
str

Lambda Function version or Lambda Alias name.

The following arguments are optional:

skip_destroy bool
Whether to retain the provisoned concurrency configuration upon destruction. Defaults to false. If set to true, the resource in simply removed from state instead.
functionName
This property is required.
Changes to this property will trigger replacement.
String
Name or Amazon Resource Name (ARN) of the Lambda Function.
provisionedConcurrentExecutions This property is required. Number
Amount of capacity to allocate. Must be greater than or equal to 1.
qualifier
This property is required.
Changes to this property will trigger replacement.
String

Lambda Function version or Lambda Alias name.

The following arguments are optional:

skipDestroy Boolean
Whether to retain the provisoned concurrency configuration upon destruction. Defaults to false. If set to true, the resource in simply removed from state instead.

Outputs

All input properties are implicitly available as output properties. Additionally, the ProvisionedConcurrencyConfig resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing ProvisionedConcurrencyConfig Resource

Get an existing ProvisionedConcurrencyConfig resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: ProvisionedConcurrencyConfigState, opts?: CustomResourceOptions): ProvisionedConcurrencyConfig
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        function_name: Optional[str] = None,
        provisioned_concurrent_executions: Optional[int] = None,
        qualifier: Optional[str] = None,
        skip_destroy: Optional[bool] = None) -> ProvisionedConcurrencyConfig
func GetProvisionedConcurrencyConfig(ctx *Context, name string, id IDInput, state *ProvisionedConcurrencyConfigState, opts ...ResourceOption) (*ProvisionedConcurrencyConfig, error)
public static ProvisionedConcurrencyConfig Get(string name, Input<string> id, ProvisionedConcurrencyConfigState? state, CustomResourceOptions? opts = null)
public static ProvisionedConcurrencyConfig get(String name, Output<String> id, ProvisionedConcurrencyConfigState state, CustomResourceOptions options)
resources:  _:    type: aws:lambda:ProvisionedConcurrencyConfig    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
FunctionName Changes to this property will trigger replacement. string
Name or Amazon Resource Name (ARN) of the Lambda Function.
ProvisionedConcurrentExecutions int
Amount of capacity to allocate. Must be greater than or equal to 1.
Qualifier Changes to this property will trigger replacement. string

Lambda Function version or Lambda Alias name.

The following arguments are optional:

SkipDestroy bool
Whether to retain the provisoned concurrency configuration upon destruction. Defaults to false. If set to true, the resource in simply removed from state instead.
FunctionName Changes to this property will trigger replacement. string
Name or Amazon Resource Name (ARN) of the Lambda Function.
ProvisionedConcurrentExecutions int
Amount of capacity to allocate. Must be greater than or equal to 1.
Qualifier Changes to this property will trigger replacement. string

Lambda Function version or Lambda Alias name.

The following arguments are optional:

SkipDestroy bool
Whether to retain the provisoned concurrency configuration upon destruction. Defaults to false. If set to true, the resource in simply removed from state instead.
functionName Changes to this property will trigger replacement. String
Name or Amazon Resource Name (ARN) of the Lambda Function.
provisionedConcurrentExecutions Integer
Amount of capacity to allocate. Must be greater than or equal to 1.
qualifier Changes to this property will trigger replacement. String

Lambda Function version or Lambda Alias name.

The following arguments are optional:

skipDestroy Boolean
Whether to retain the provisoned concurrency configuration upon destruction. Defaults to false. If set to true, the resource in simply removed from state instead.
functionName Changes to this property will trigger replacement. string
Name or Amazon Resource Name (ARN) of the Lambda Function.
provisionedConcurrentExecutions number
Amount of capacity to allocate. Must be greater than or equal to 1.
qualifier Changes to this property will trigger replacement. string

Lambda Function version or Lambda Alias name.

The following arguments are optional:

skipDestroy boolean
Whether to retain the provisoned concurrency configuration upon destruction. Defaults to false. If set to true, the resource in simply removed from state instead.
function_name Changes to this property will trigger replacement. str
Name or Amazon Resource Name (ARN) of the Lambda Function.
provisioned_concurrent_executions int
Amount of capacity to allocate. Must be greater than or equal to 1.
qualifier Changes to this property will trigger replacement. str

Lambda Function version or Lambda Alias name.

The following arguments are optional:

skip_destroy bool
Whether to retain the provisoned concurrency configuration upon destruction. Defaults to false. If set to true, the resource in simply removed from state instead.
functionName Changes to this property will trigger replacement. String
Name or Amazon Resource Name (ARN) of the Lambda Function.
provisionedConcurrentExecutions Number
Amount of capacity to allocate. Must be greater than or equal to 1.
qualifier Changes to this property will trigger replacement. String

Lambda Function version or Lambda Alias name.

The following arguments are optional:

skipDestroy Boolean
Whether to retain the provisoned concurrency configuration upon destruction. Defaults to false. If set to true, the resource in simply removed from state instead.

Import

Using pulumi import, import a Lambda Provisioned Concurrency Configuration using the function_name and qualifier separated by a comma (,). For example:

$ pulumi import aws:lambda/provisionedConcurrencyConfig:ProvisionedConcurrencyConfig example my_function,production
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.