1. Packages
  2. AWS Classic
  3. API Docs
  4. lambda
  5. ProvisionedConcurrencyConfig

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.30.0 published on Thursday, Apr 11, 2024 by Pulumi

aws.lambda.ProvisionedConcurrencyConfig

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.30.0 published on Thursday, Apr 11, 2024 by Pulumi

    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,
    });
    
    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"])
    
    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
    	})
    }
    
    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,
        });
    
    });
    
    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());
    
        }
    }
    
    resources:
      example:
        type: aws:lambda:ProvisionedConcurrencyConfig
        properties:
          functionName: ${exampleAwsLambdaAlias.functionName}
          provisionedConcurrentExecutions: 1
          qualifier: ${exampleAwsLambdaAlias.name}
    

    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,
    });
    
    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"])
    
    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
    	})
    }
    
    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,
        });
    
    });
    
    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());
    
        }
    }
    
    resources:
      example:
        type: aws:lambda:ProvisionedConcurrencyConfig
        properties:
          functionName: ${exampleAwsLambdaFunction.functionName}
          provisionedConcurrentExecutions: 1
          qualifier: ${exampleAwsLambdaFunction.version}
    

    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 string
    The unique name of the resource.
    args ProvisionedConcurrencyConfigArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args 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 string
    The unique name of the resource.
    args ProvisionedConcurrencyConfigArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ProvisionedConcurrencyConfigArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ProvisionedConcurrencyConfigArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    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

    The ProvisionedConcurrencyConfig resource accepts the following input properties:

    FunctionName 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 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 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 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 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 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 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 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 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 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 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 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)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    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 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 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 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 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 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 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 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 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 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 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 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 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
    

    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.
    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.30.0 published on Thursday, Apr 11, 2024 by Pulumi