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

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

AWS Classic v5.41.0 published on Monday, May 15, 2023 by Pulumi

aws.lambda.CodeSigningConfig

Explore with Pulumi AI

aws logo

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

AWS Classic v5.41.0 published on Monday, May 15, 2023 by Pulumi

    Provides a Lambda Code Signing Config resource. A code signing configuration defines a list of allowed signing profiles and defines the code-signing validation policy (action to be taken if deployment validation checks fail).

    For information about Lambda code signing configurations and how to use them, see configuring code signing for Lambda functions

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var newCsc = new Aws.Lambda.CodeSigningConfig("newCsc", new()
        {
            AllowedPublishers = new Aws.Lambda.Inputs.CodeSigningConfigAllowedPublishersArgs
            {
                SigningProfileVersionArns = new[]
                {
                    aws_signer_signing_profile.Example1.Arn,
                    aws_signer_signing_profile.Example2.Arn,
                },
            },
            Policies = new Aws.Lambda.Inputs.CodeSigningConfigPoliciesArgs
            {
                UntrustedArtifactOnDeployment = "Warn",
            },
            Description = "My awesome code signing config.",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/lambda"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := lambda.NewCodeSigningConfig(ctx, "newCsc", &lambda.CodeSigningConfigArgs{
    			AllowedPublishers: &lambda.CodeSigningConfigAllowedPublishersArgs{
    				SigningProfileVersionArns: pulumi.StringArray{
    					aws_signer_signing_profile.Example1.Arn,
    					aws_signer_signing_profile.Example2.Arn,
    				},
    			},
    			Policies: &lambda.CodeSigningConfigPoliciesArgs{
    				UntrustedArtifactOnDeployment: pulumi.String("Warn"),
    			},
    			Description: pulumi.String("My awesome code signing config."),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.lambda.CodeSigningConfig;
    import com.pulumi.aws.lambda.CodeSigningConfigArgs;
    import com.pulumi.aws.lambda.inputs.CodeSigningConfigAllowedPublishersArgs;
    import com.pulumi.aws.lambda.inputs.CodeSigningConfigPoliciesArgs;
    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 newCsc = new CodeSigningConfig("newCsc", CodeSigningConfigArgs.builder()        
                .allowedPublishers(CodeSigningConfigAllowedPublishersArgs.builder()
                    .signingProfileVersionArns(                
                        aws_signer_signing_profile.example1().arn(),
                        aws_signer_signing_profile.example2().arn())
                    .build())
                .policies(CodeSigningConfigPoliciesArgs.builder()
                    .untrustedArtifactOnDeployment("Warn")
                    .build())
                .description("My awesome code signing config.")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_aws as aws
    
    new_csc = aws.lambda_.CodeSigningConfig("newCsc",
        allowed_publishers=aws.lambda_.CodeSigningConfigAllowedPublishersArgs(
            signing_profile_version_arns=[
                aws_signer_signing_profile["example1"]["arn"],
                aws_signer_signing_profile["example2"]["arn"],
            ],
        ),
        policies=aws.lambda_.CodeSigningConfigPoliciesArgs(
            untrusted_artifact_on_deployment="Warn",
        ),
        description="My awesome code signing config.")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const newCsc = new aws.lambda.CodeSigningConfig("newCsc", {
        allowedPublishers: {
            signingProfileVersionArns: [
                aws_signer_signing_profile.example1.arn,
                aws_signer_signing_profile.example2.arn,
            ],
        },
        policies: {
            untrustedArtifactOnDeployment: "Warn",
        },
        description: "My awesome code signing config.",
    });
    
    resources:
      newCsc:
        type: aws:lambda:CodeSigningConfig
        properties:
          allowedPublishers:
            signingProfileVersionArns:
              - ${aws_signer_signing_profile.example1.arn}
              - ${aws_signer_signing_profile.example2.arn}
          policies:
            untrustedArtifactOnDeployment: Warn
          description: My awesome code signing config.
    

    Create CodeSigningConfig Resource

    new CodeSigningConfig(name: string, args: CodeSigningConfigArgs, opts?: CustomResourceOptions);
    @overload
    def CodeSigningConfig(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          allowed_publishers: Optional[_lambda_.CodeSigningConfigAllowedPublishersArgs] = None,
                          description: Optional[str] = None,
                          policies: Optional[_lambda_.CodeSigningConfigPoliciesArgs] = None)
    @overload
    def CodeSigningConfig(resource_name: str,
                          args: CodeSigningConfigArgs,
                          opts: Optional[ResourceOptions] = None)
    func NewCodeSigningConfig(ctx *Context, name string, args CodeSigningConfigArgs, opts ...ResourceOption) (*CodeSigningConfig, error)
    public CodeSigningConfig(string name, CodeSigningConfigArgs args, CustomResourceOptions? opts = null)
    public CodeSigningConfig(String name, CodeSigningConfigArgs args)
    public CodeSigningConfig(String name, CodeSigningConfigArgs args, CustomResourceOptions options)
    
    type: aws:lambda:CodeSigningConfig
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args CodeSigningConfigArgs
    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 CodeSigningConfigArgs
    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 CodeSigningConfigArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CodeSigningConfigArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CodeSigningConfigArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    CodeSigningConfig 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 CodeSigningConfig resource accepts the following input properties:

    AllowedPublishers CodeSigningConfigAllowedPublishersArgs

    A configuration block of allowed publishers as signing profiles for this code signing configuration. Detailed below.

    Description string

    Descriptive name for this code signing configuration.

    Policies CodeSigningConfigPoliciesArgs

    A configuration block of code signing policies that define the actions to take if the validation checks fail. Detailed below.

    AllowedPublishers CodeSigningConfigAllowedPublishersArgs

    A configuration block of allowed publishers as signing profiles for this code signing configuration. Detailed below.

    Description string

    Descriptive name for this code signing configuration.

    Policies CodeSigningConfigPoliciesArgs

    A configuration block of code signing policies that define the actions to take if the validation checks fail. Detailed below.

    allowedPublishers CodeSigningConfigAllowedPublishersArgs

    A configuration block of allowed publishers as signing profiles for this code signing configuration. Detailed below.

    description String

    Descriptive name for this code signing configuration.

    policies CodeSigningConfigPoliciesArgs

    A configuration block of code signing policies that define the actions to take if the validation checks fail. Detailed below.

    allowedPublishers CodeSigningConfigAllowedPublishersArgs

    A configuration block of allowed publishers as signing profiles for this code signing configuration. Detailed below.

    description string

    Descriptive name for this code signing configuration.

    policies CodeSigningConfigPoliciesArgs

    A configuration block of code signing policies that define the actions to take if the validation checks fail. Detailed below.

    allowed_publishers CodeSigningConfigAllowedPublishersArgs

    A configuration block of allowed publishers as signing profiles for this code signing configuration. Detailed below.

    description str

    Descriptive name for this code signing configuration.

    policies CodeSigningConfigPoliciesArgs

    A configuration block of code signing policies that define the actions to take if the validation checks fail. Detailed below.

    allowedPublishers Property Map

    A configuration block of allowed publishers as signing profiles for this code signing configuration. Detailed below.

    description String

    Descriptive name for this code signing configuration.

    policies Property Map

    A configuration block of code signing policies that define the actions to take if the validation checks fail. Detailed below.

    Outputs

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

    Arn string

    The Amazon Resource Name (ARN) of the code signing configuration.

    ConfigId string

    Unique identifier for the code signing configuration.

    Id string

    The provider-assigned unique ID for this managed resource.

    LastModified string

    The date and time that the code signing configuration was last modified.

    Arn string

    The Amazon Resource Name (ARN) of the code signing configuration.

    ConfigId string

    Unique identifier for the code signing configuration.

    Id string

    The provider-assigned unique ID for this managed resource.

    LastModified string

    The date and time that the code signing configuration was last modified.

    arn String

    The Amazon Resource Name (ARN) of the code signing configuration.

    configId String

    Unique identifier for the code signing configuration.

    id String

    The provider-assigned unique ID for this managed resource.

    lastModified String

    The date and time that the code signing configuration was last modified.

    arn string

    The Amazon Resource Name (ARN) of the code signing configuration.

    configId string

    Unique identifier for the code signing configuration.

    id string

    The provider-assigned unique ID for this managed resource.

    lastModified string

    The date and time that the code signing configuration was last modified.

    arn str

    The Amazon Resource Name (ARN) of the code signing configuration.

    config_id str

    Unique identifier for the code signing configuration.

    id str

    The provider-assigned unique ID for this managed resource.

    last_modified str

    The date and time that the code signing configuration was last modified.

    arn String

    The Amazon Resource Name (ARN) of the code signing configuration.

    configId String

    Unique identifier for the code signing configuration.

    id String

    The provider-assigned unique ID for this managed resource.

    lastModified String

    The date and time that the code signing configuration was last modified.

    Look up Existing CodeSigningConfig Resource

    Get an existing CodeSigningConfig 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?: CodeSigningConfigState, opts?: CustomResourceOptions): CodeSigningConfig
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            allowed_publishers: Optional[_lambda_.CodeSigningConfigAllowedPublishersArgs] = None,
            arn: Optional[str] = None,
            config_id: Optional[str] = None,
            description: Optional[str] = None,
            last_modified: Optional[str] = None,
            policies: Optional[_lambda_.CodeSigningConfigPoliciesArgs] = None) -> CodeSigningConfig
    func GetCodeSigningConfig(ctx *Context, name string, id IDInput, state *CodeSigningConfigState, opts ...ResourceOption) (*CodeSigningConfig, error)
    public static CodeSigningConfig Get(string name, Input<string> id, CodeSigningConfigState? state, CustomResourceOptions? opts = null)
    public static CodeSigningConfig get(String name, Output<String> id, CodeSigningConfigState 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:
    AllowedPublishers CodeSigningConfigAllowedPublishersArgs

    A configuration block of allowed publishers as signing profiles for this code signing configuration. Detailed below.

    Arn string

    The Amazon Resource Name (ARN) of the code signing configuration.

    ConfigId string

    Unique identifier for the code signing configuration.

    Description string

    Descriptive name for this code signing configuration.

    LastModified string

    The date and time that the code signing configuration was last modified.

    Policies CodeSigningConfigPoliciesArgs

    A configuration block of code signing policies that define the actions to take if the validation checks fail. Detailed below.

    AllowedPublishers CodeSigningConfigAllowedPublishersArgs

    A configuration block of allowed publishers as signing profiles for this code signing configuration. Detailed below.

    Arn string

    The Amazon Resource Name (ARN) of the code signing configuration.

    ConfigId string

    Unique identifier for the code signing configuration.

    Description string

    Descriptive name for this code signing configuration.

    LastModified string

    The date and time that the code signing configuration was last modified.

    Policies CodeSigningConfigPoliciesArgs

    A configuration block of code signing policies that define the actions to take if the validation checks fail. Detailed below.

    allowedPublishers CodeSigningConfigAllowedPublishersArgs

    A configuration block of allowed publishers as signing profiles for this code signing configuration. Detailed below.

    arn String

    The Amazon Resource Name (ARN) of the code signing configuration.

    configId String

    Unique identifier for the code signing configuration.

    description String

    Descriptive name for this code signing configuration.

    lastModified String

    The date and time that the code signing configuration was last modified.

    policies CodeSigningConfigPoliciesArgs

    A configuration block of code signing policies that define the actions to take if the validation checks fail. Detailed below.

    allowedPublishers CodeSigningConfigAllowedPublishersArgs

    A configuration block of allowed publishers as signing profiles for this code signing configuration. Detailed below.

    arn string

    The Amazon Resource Name (ARN) of the code signing configuration.

    configId string

    Unique identifier for the code signing configuration.

    description string

    Descriptive name for this code signing configuration.

    lastModified string

    The date and time that the code signing configuration was last modified.

    policies CodeSigningConfigPoliciesArgs

    A configuration block of code signing policies that define the actions to take if the validation checks fail. Detailed below.

    allowed_publishers CodeSigningConfigAllowedPublishersArgs

    A configuration block of allowed publishers as signing profiles for this code signing configuration. Detailed below.

    arn str

    The Amazon Resource Name (ARN) of the code signing configuration.

    config_id str

    Unique identifier for the code signing configuration.

    description str

    Descriptive name for this code signing configuration.

    last_modified str

    The date and time that the code signing configuration was last modified.

    policies CodeSigningConfigPoliciesArgs

    A configuration block of code signing policies that define the actions to take if the validation checks fail. Detailed below.

    allowedPublishers Property Map

    A configuration block of allowed publishers as signing profiles for this code signing configuration. Detailed below.

    arn String

    The Amazon Resource Name (ARN) of the code signing configuration.

    configId String

    Unique identifier for the code signing configuration.

    description String

    Descriptive name for this code signing configuration.

    lastModified String

    The date and time that the code signing configuration was last modified.

    policies Property Map

    A configuration block of code signing policies that define the actions to take if the validation checks fail. Detailed below.

    Supporting Types

    CodeSigningConfigAllowedPublishers

    SigningProfileVersionArns List<string>

    The Amazon Resource Name (ARN) for each of the signing profiles. A signing profile defines a trusted user who can sign a code package.

    SigningProfileVersionArns []string

    The Amazon Resource Name (ARN) for each of the signing profiles. A signing profile defines a trusted user who can sign a code package.

    signingProfileVersionArns List<String>

    The Amazon Resource Name (ARN) for each of the signing profiles. A signing profile defines a trusted user who can sign a code package.

    signingProfileVersionArns string[]

    The Amazon Resource Name (ARN) for each of the signing profiles. A signing profile defines a trusted user who can sign a code package.

    signing_profile_version_arns Sequence[str]

    The Amazon Resource Name (ARN) for each of the signing profiles. A signing profile defines a trusted user who can sign a code package.

    signingProfileVersionArns List<String>

    The Amazon Resource Name (ARN) for each of the signing profiles. A signing profile defines a trusted user who can sign a code package.

    CodeSigningConfigPolicies

    UntrustedArtifactOnDeployment string

    Code signing configuration policy for deployment validation failure. If you set the policy to Enforce, Lambda blocks the deployment request if code-signing validation checks fail. If you set the policy to Warn, Lambda allows the deployment and creates a CloudWatch log. Valid values: Warn, Enforce. Default value: Warn.

    UntrustedArtifactOnDeployment string

    Code signing configuration policy for deployment validation failure. If you set the policy to Enforce, Lambda blocks the deployment request if code-signing validation checks fail. If you set the policy to Warn, Lambda allows the deployment and creates a CloudWatch log. Valid values: Warn, Enforce. Default value: Warn.

    untrustedArtifactOnDeployment String

    Code signing configuration policy for deployment validation failure. If you set the policy to Enforce, Lambda blocks the deployment request if code-signing validation checks fail. If you set the policy to Warn, Lambda allows the deployment and creates a CloudWatch log. Valid values: Warn, Enforce. Default value: Warn.

    untrustedArtifactOnDeployment string

    Code signing configuration policy for deployment validation failure. If you set the policy to Enforce, Lambda blocks the deployment request if code-signing validation checks fail. If you set the policy to Warn, Lambda allows the deployment and creates a CloudWatch log. Valid values: Warn, Enforce. Default value: Warn.

    untrusted_artifact_on_deployment str

    Code signing configuration policy for deployment validation failure. If you set the policy to Enforce, Lambda blocks the deployment request if code-signing validation checks fail. If you set the policy to Warn, Lambda allows the deployment and creates a CloudWatch log. Valid values: Warn, Enforce. Default value: Warn.

    untrustedArtifactOnDeployment String

    Code signing configuration policy for deployment validation failure. If you set the policy to Enforce, Lambda blocks the deployment request if code-signing validation checks fail. If you set the policy to Warn, Lambda allows the deployment and creates a CloudWatch log. Valid values: Warn, Enforce. Default value: Warn.

    Import

    Code Signing Configs can be imported using their ARN, e.g.,

     $ pulumi import aws:lambda/codeSigningConfig:CodeSigningConfig imported_csc arn:aws:lambda:us-west-2:123456789012:code-signing-config:csc-0f6c334abcdea4d8b
    

    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 v5.41.0 published on Monday, May 15, 2023 by Pulumi