Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Lambda

Lambda

Overview

Lambda is a compute service that lets you run code without provisioning or managing servers. Lambda runs your code on a high-availability compute infrastructure and performs all of the administration of the compute resources, including server and operating system maintenance, capacity provisioning and automatic scaling, code monitoring and logging. With Lambda, you can run code for virtually any type of application or backend service. For more information about the Lambda service, see What is Lambda in the Lambda Developer Guide.

The Lambda API Reference provides information about each of the API methods, including details about the parameters in each API request and response.

You can use Software Development Kits (SDKs), Integrated Development Environment (IDE) Toolkits, and command line tools to access the API. For installation instructions, see Tools for Amazon Web Services.

For a list of Region-specific endpoints that Lambda supports, see Lambda endpoints and quotas in the Amazon Web Services General Reference..

When making the API calls, you will need to authenticate your request by providing a signature. Lambda supports signature version 4. For more information, see Signature Version 4 signing process in the Amazon Web Services General Reference..

CA certificates

Because Amazon Web Services SDKs use the CA certificates from your computer, changes to the certificates on the Amazon Web Services servers can cause connection failures when you attempt to use an SDK. You can prevent these failures by keeping your computer's CA certificates and operating system up-to-date. If you encounter this issue in a corporate environment and do not manage your own computer, you might need to ask an administrator to assist with the update process. The following list shows minimum operating system and Java versions:

  • Microsoft Windows versions that have updates from January 2005 or later installed contain at least one of the required CAs in their trust list.

  • Mac OS X 10.4 with Java for Mac OS X 10.4 Release 5 (February 2007), Mac OS X 10.5 (October 2007), and later versions contain at least one of the required CAs in their trust list.

  • Red Hat Enterprise Linux 5 (March 2007), 6, and 7 and CentOS 5, 6, and 7 all contain at least one of the required CAs in their default trusted CA list.

  • Java 1.4.2_12 (May 2006), 5 Update 2 (March 2005), and all later versions, including Java 6 (December 2006), 7, and 8, contain at least one of the required CAs in their default trusted CA list.

When accessing the Lambda management console or Lambda API endpoints, whether through browsers or programmatically, you will need to ensure your client machines support any of the following CAs:

  • Amazon Root CA 1

  • Starfield Services Root Certificate Authority - G2

  • Starfield Class 2 Certification Authority

Root certificates from the first two authorities are available from Amazon trust services, but keeping your computer up-to-date is the more straightforward solution. To learn more about ACM-provided certificates, see Amazon Web Services Certificate Manager FAQs.

Hierarchy

Implements

Index

Constructors

constructor

Properties

Readonly config

The resolved configuration of LambdaClient class. This is resolved and normalized from the constructor configuration interface.

middlewareStack

Methods

addLayerVersionPermission

addPermission

  • Grants an Amazon Web Services service, account, or organization permission to use a function. You can apply the policy at the function level, or specify a qualifier to restrict access to a single version or alias. If you use a qualifier, the invoker must use the full Amazon Resource Name (ARN) of that version or alias to invoke the function. Note: Lambda does not support adding policies to version $LATEST.

         <p>To grant permission to another account, specify the account ID as the <code>Principal</code>. To grant permission to an
      organization defined in Organizations, specify the organization ID as the <code>PrincipalOrgID</code>.
      For Amazon Web Services services, the principal is a domain-style identifier defined by the service,
      like <code>s3.amazonaws.com</code> or <code>sns.amazonaws.com</code>. For Amazon Web Services services, you can also specify
      the ARN of the associated resource as the <code>SourceArn</code>. If you grant permission to a service principal without
      specifying the source, other accounts could potentially configure resources in their account to invoke your
      Lambda function.</p>
    
         <p>This action adds a statement to a resource-based permissions policy for the function. For more information
      about function policies, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html">Lambda Function Policies</a>. </p>
    

    Parameters

    Returns Promise<AddPermissionCommandOutput>

  • Grants an Amazon Web Services service, account, or organization permission to use a function. You can apply the policy at the function level, or specify a qualifier to restrict access to a single version or alias. If you use a qualifier, the invoker must use the full Amazon Resource Name (ARN) of that version or alias to invoke the function. Note: Lambda does not support adding policies to version $LATEST.

    To grant permission to another account, specify the account ID as the Principal. To grant permission to an organization defined in Organizations, specify the organization ID as the PrincipalOrgID. For Amazon Web Services services, the principal is a domain-style identifier defined by the service, like s3.amazonaws.com or sns.amazonaws.com. For Amazon Web Services services, you can also specify the ARN of the associated resource as the SourceArn. If you grant permission to a service principal without specifying the source, other accounts could potentially configure resources in their account to invoke your Lambda function.

    This action adds a statement to a resource-based permissions policy for the function. For more information about function policies, see Lambda Function Policies.

    Parameters

    Returns void

  • Grants an Amazon Web Services service, account, or organization permission to use a function. You can apply the policy at the function level, or specify a qualifier to restrict access to a single version or alias. If you use a qualifier, the invoker must use the full Amazon Resource Name (ARN) of that version or alias to invoke the function. Note: Lambda does not support adding policies to version $LATEST.

    To grant permission to another account, specify the account ID as the Principal. To grant permission to an organization defined in Organizations, specify the organization ID as the PrincipalOrgID. For Amazon Web Services services, the principal is a domain-style identifier defined by the service, like s3.amazonaws.com or sns.amazonaws.com. For Amazon Web Services services, you can also specify the ARN of the associated resource as the SourceArn. If you grant permission to a service principal without specifying the source, other accounts could potentially configure resources in their account to invoke your Lambda function.

    This action adds a statement to a resource-based permissions policy for the function. For more information about function policies, see Lambda Function Policies.

    Parameters

    Returns void

  • Grants an Amazon Web Services service, account, or organization permission to use a function. You can apply the policy at the function level, or specify a qualifier to restrict access to a single version or alias. If you use a qualifier, the invoker must use the full Amazon Resource Name (ARN) of that version or alias to invoke the function. Note: Lambda does not support adding policies to version $LATEST.

         <p>To grant permission to another account, specify the account ID as the <code>Principal</code>. To grant permission to an
      organization defined in Organizations, specify the organization ID as the <code>PrincipalOrgID</code>.
      For Amazon Web Services services, the principal is a domain-style identifier defined by the service,
      like <code>s3.amazonaws.com</code> or <code>sns.amazonaws.com</code>. For Amazon Web Services services, you can also specify
      the ARN of the associated resource as the <code>SourceArn</code>. If you grant permission to a service principal without
      specifying the source, other accounts could potentially configure resources in their account to invoke your
      Lambda function.</p>
    
         <p>This action adds a statement to a resource-based permissions policy for the function. For more information
      about function policies, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html">Lambda Function Policies</a>. </p>
    

    Parameters

    • args: AddPermissionCommandInput
    • Optional options: __HttpHandlerOptions

    Returns Promise<AddPermissionCommandOutput>

  • Grants an Amazon Web Services service, account, or organization permission to use a function. You can apply the policy at the function level, or specify a qualifier to restrict access to a single version or alias. If you use a qualifier, the invoker must use the full Amazon Resource Name (ARN) of that version or alias to invoke the function. Note: Lambda does not support adding policies to version $LATEST.

    To grant permission to another account, specify the account ID as the Principal. To grant permission to an organization defined in Organizations, specify the organization ID as the PrincipalOrgID. For Amazon Web Services services, the principal is a domain-style identifier defined by the service, like s3.amazonaws.com or sns.amazonaws.com. For Amazon Web Services services, you can also specify the ARN of the associated resource as the SourceArn. If you grant permission to a service principal without specifying the source, other accounts could potentially configure resources in their account to invoke your Lambda function.

    This action adds a statement to a resource-based permissions policy for the function. For more information about function policies, see Lambda Function Policies.

    Parameters

    Returns void

  • Grants an Amazon Web Services service, account, or organization permission to use a function. You can apply the policy at the function level, or specify a qualifier to restrict access to a single version or alias. If you use a qualifier, the invoker must use the full Amazon Resource Name (ARN) of that version or alias to invoke the function. Note: Lambda does not support adding policies to version $LATEST.

    To grant permission to another account, specify the account ID as the Principal. To grant permission to an organization defined in Organizations, specify the organization ID as the PrincipalOrgID. For Amazon Web Services services, the principal is a domain-style identifier defined by the service, like s3.amazonaws.com or sns.amazonaws.com. For Amazon Web Services services, you can also specify the ARN of the associated resource as the SourceArn. If you grant permission to a service principal without specifying the source, other accounts could potentially configure resources in their account to invoke your Lambda function.

    This action adds a statement to a resource-based permissions policy for the function. For more information about function policies, see Lambda Function Policies.

    Parameters

    Returns void

createAlias

  • Creates an alias for a Lambda function version. Use aliases to provide clients with a function identifier that you can update to invoke a different version.

    You can also map an alias to split invocation requests between two versions. Use the RoutingConfig parameter to specify a second version and the percentage of invocation requests that it receives.

    Parameters

    Returns Promise<CreateAliasCommandOutput>

  • Creates an alias for a Lambda function version. Use aliases to provide clients with a function identifier that you can update to invoke a different version.

    You can also map an alias to split invocation requests between two versions. Use the RoutingConfig parameter to specify a second version and the percentage of invocation requests that it receives.

    Parameters

    Returns void

  • Creates an alias for a Lambda function version. Use aliases to provide clients with a function identifier that you can update to invoke a different version.

    You can also map an alias to split invocation requests between two versions. Use the RoutingConfig parameter to specify a second version and the percentage of invocation requests that it receives.

    Parameters

    Returns void

  • Creates an alias for a Lambda function version. Use aliases to provide clients with a function identifier that you can update to invoke a different version.

    You can also map an alias to split invocation requests between two versions. Use the RoutingConfig parameter to specify a second version and the percentage of invocation requests that it receives.

    Parameters

    • args: CreateAliasCommandInput
    • Optional options: __HttpHandlerOptions

    Returns Promise<CreateAliasCommandOutput>

  • Creates an alias for a Lambda function version. Use aliases to provide clients with a function identifier that you can update to invoke a different version.

    You can also map an alias to split invocation requests between two versions. Use the RoutingConfig parameter to specify a second version and the percentage of invocation requests that it receives.

    Parameters

    Returns void

  • Creates an alias for a Lambda function version. Use aliases to provide clients with a function identifier that you can update to invoke a different version.

    You can also map an alias to split invocation requests between two versions. Use the RoutingConfig parameter to specify a second version and the percentage of invocation requests that it receives.

    Parameters

    Returns void

createCodeSigningConfig

createEventSourceMapping

  • Creates a mapping between an event source and an Lambda function. Lambda reads items from the event source and invokes the function.

    For details about how to configure different event sources, see the following topics.

         <p>The following error handling options are available only for stream sources (DynamoDB and Kinesis):</p>
         <ul>
            <li>
               <p>
                  <code>BisectBatchOnFunctionError</code> - If the function returns an error, split the batch in two and retry.</p>
            </li>
            <li>
               <p>
                  <code>DestinationConfig</code> - Send discarded records to an Amazon SQS queue or Amazon SNS topic.</p>
            </li>
            <li>
               <p>
                  <code>MaximumRecordAgeInSeconds</code> - Discard records older than the specified age. The default value is infinite (-1). When set to infinite (-1), failed records are retried until the record expires</p>
            </li>
            <li>
               <p>
                  <code>MaximumRetryAttempts</code> - Discard records after the specified number of retries. The default value is infinite (-1). When set to infinite (-1), failed records are retried until the record expires.</p>
            </li>
            <li>
               <p>
                  <code>ParallelizationFactor</code> - Process multiple batches from each shard concurrently.</p>
            </li>
         </ul>
         <p>For information about which configuration parameters apply to each event source, see the following topics.</p>
         <ul>
            <li>
               <p>
                  <a href="https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html#services-ddb-params">
          Amazon DynamoDB Streams</a>
               </p>
            </li>
            <li>
               <p>
                  <a href="https://docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html#services-kinesis-params">
          Amazon Kinesis</a>
               </p>
            </li>
            <li>
               <p>
                  <a href="https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#services-sqs-params">
          Amazon SQS</a>
               </p>
            </li>
            <li>
               <p>
                  <a href="https://docs.aws.amazon.com/lambda/latest/dg/with-mq.html#services-mq-params">
          Amazon MQ and RabbitMQ</a>
               </p>
            </li>
            <li>
               <p>
                  <a href="https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html#services-msk-parms">
          Amazon MSK</a>
               </p>
            </li>
            <li>
               <p>
                  <a href="https://docs.aws.amazon.com/lambda/latest/dg/with-kafka.html#services-kafka-parms">
          Apache Kafka</a>
               </p>
            </li>
         </ul>
    

    Parameters

    Returns Promise<CreateEventSourceMappingCommandOutput>

  • Creates a mapping between an event source and an Lambda function. Lambda reads items from the event source and invokes the function.

    For details about how to configure different event sources, see the following topics.

    The following error handling options are available only for stream sources (DynamoDB and Kinesis):

    • BisectBatchOnFunctionError - If the function returns an error, split the batch in two and retry.

    • DestinationConfig - Send discarded records to an Amazon SQS queue or Amazon SNS topic.

    • MaximumRecordAgeInSeconds - Discard records older than the specified age. The default value is infinite (-1). When set to infinite (-1), failed records are retried until the record expires

    • MaximumRetryAttempts - Discard records after the specified number of retries. The default value is infinite (-1). When set to infinite (-1), failed records are retried until the record expires.

    • ParallelizationFactor - Process multiple batches from each shard concurrently.

    For information about which configuration parameters apply to each event source, see the following topics.

    Parameters

    Returns void

  • Creates a mapping between an event source and an Lambda function. Lambda reads items from the event source and invokes the function.

    For details about how to configure different event sources, see the following topics.

    The following error handling options are available only for stream sources (DynamoDB and Kinesis):

    • BisectBatchOnFunctionError - If the function returns an error, split the batch in two and retry.

    • DestinationConfig - Send discarded records to an Amazon SQS queue or Amazon SNS topic.

    • MaximumRecordAgeInSeconds - Discard records older than the specified age. The default value is infinite (-1). When set to infinite (-1), failed records are retried until the record expires

    • MaximumRetryAttempts - Discard records after the specified number of retries. The default value is infinite (-1). When set to infinite (-1), failed records are retried until the record expires.

    • ParallelizationFactor - Process multiple batches from each shard concurrently.

    For information about which configuration parameters apply to each event source, see the following topics.

    Parameters

    Returns void

  • Creates a mapping between an event source and an Lambda function. Lambda reads items from the event source and invokes the function.

    For details about how to configure different event sources, see the following topics.

         <p>The following error handling options are available only for stream sources (DynamoDB and Kinesis):</p>
         <ul>
            <li>
               <p>
                  <code>BisectBatchOnFunctionError</code> - If the function returns an error, split the batch in two and retry.</p>
            </li>
            <li>
               <p>
                  <code>DestinationConfig</code> - Send discarded records to an Amazon SQS queue or Amazon SNS topic.</p>
            </li>
            <li>
               <p>
                  <code>MaximumRecordAgeInSeconds</code> - Discard records older than the specified age. The default value is infinite (-1). When set to infinite (-1), failed records are retried until the record expires</p>
            </li>
            <li>
               <p>
                  <code>MaximumRetryAttempts</code> - Discard records after the specified number of retries. The default value is infinite (-1). When set to infinite (-1), failed records are retried until the record expires.</p>
            </li>
            <li>
               <p>
                  <code>ParallelizationFactor</code> - Process multiple batches from each shard concurrently.</p>
            </li>
         </ul>
         <p>For information about which configuration parameters apply to each event source, see the following topics.</p>
         <ul>
            <li>
               <p>
                  <a href="https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html#services-ddb-params">
          Amazon DynamoDB Streams</a>
               </p>
            </li>
            <li>
               <p>
                  <a href="https://docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html#services-kinesis-params">
          Amazon Kinesis</a>
               </p>
            </li>
            <li>
               <p>
                  <a href="https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#services-sqs-params">
          Amazon SQS</a>
               </p>
            </li>
            <li>
               <p>
                  <a href="https://docs.aws.amazon.com/lambda/latest/dg/with-mq.html#services-mq-params">
          Amazon MQ and RabbitMQ</a>
               </p>
            </li>
            <li>
               <p>
                  <a href="https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html#services-msk-parms">
          Amazon MSK</a>
               </p>
            </li>
            <li>
               <p>
                  <a href="https://docs.aws.amazon.com/lambda/latest/dg/with-kafka.html#services-kafka-parms">
          Apache Kafka</a>
               </p>
            </li>
         </ul>
    

    Parameters

    • args: CreateEventSourceMappingCommandInput
    • Optional options: __HttpHandlerOptions

    Returns Promise<CreateEventSourceMappingCommandOutput>

  • Creates a mapping between an event source and an Lambda function. Lambda reads items from the event source and invokes the function.

    For details about how to configure different event sources, see the following topics.

    The following error handling options are available only for stream sources (DynamoDB and Kinesis):

    • BisectBatchOnFunctionError - If the function returns an error, split the batch in two and retry.

    • DestinationConfig - Send discarded records to an Amazon SQS queue or Amazon SNS topic.

    • MaximumRecordAgeInSeconds - Discard records older than the specified age. The default value is infinite (-1). When set to infinite (-1), failed records are retried until the record expires

    • MaximumRetryAttempts - Discard records after the specified number of retries. The default value is infinite (-1). When set to infinite (-1), failed records are retried until the record expires.

    • ParallelizationFactor - Process multiple batches from each shard concurrently.

    For information about which configuration parameters apply to each event source, see the following topics.

    Parameters

    Returns void

  • Creates a mapping between an event source and an Lambda function. Lambda reads items from the event source and invokes the function.

    For details about how to configure different event sources, see the following topics.

    The following error handling options are available only for stream sources (DynamoDB and Kinesis):

    • BisectBatchOnFunctionError - If the function returns an error, split the batch in two and retry.

    • DestinationConfig - Send discarded records to an Amazon SQS queue or Amazon SNS topic.

    • MaximumRecordAgeInSeconds - Discard records older than the specified age. The default value is infinite (-1). When set to infinite (-1), failed records are retried until the record expires

    • MaximumRetryAttempts - Discard records after the specified number of retries. The default value is infinite (-1). When set to infinite (-1), failed records are retried until the record expires.

    • ParallelizationFactor - Process multiple batches from each shard concurrently.

    For information about which configuration parameters apply to each event source, see the following topics.

    Parameters

    Returns void

createFunction

  • Creates a Lambda function. To create a function, you need a deployment package and an execution role. The deployment package is a .zip file archive or container image that contains your function code. The execution role grants the function permission to use Amazon Web Services services, such as Amazon CloudWatch Logs for log streaming and X-Ray for request tracing.

         <p>You set the package type to <code>Image</code> if the deployment package is a
      <a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-images.html">container image</a>. For a container image,
      the code property must include the URI of a container image in the Amazon ECR registry.
      You do not need to specify the handler and runtime properties. </p>
    
         <p>You set the package type to <code>Zip</code> if the deployment package is a <a href="https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-package.html#gettingstarted-package-zip">.zip file
        archive</a>. For a .zip file archive, the code property specifies the location of the
      .zip file. You must also specify the handler and runtime properties. The code in the
      deployment package must be compatible with the target instruction set architecture of the
      function (<code>x86-64</code> or <code>arm64</code>). If you do not specify the architecture, the default value is
      <code>x86-64</code>.</p>
    
         <p>When you create a function, Lambda provisions an instance of the function and its supporting resources. If
      your function connects to a VPC, this process can take a minute or so. During this time, you can't invoke or
      modify the function. The <code>State</code>, <code>StateReason</code>, and <code>StateReasonCode</code> fields in
      the response from <a>GetFunctionConfiguration</a> indicate when the function is ready to invoke. For
      more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/functions-states.html">Function
        States</a>.</p>
    
         <p>A function has an unpublished version, and can have published versions and aliases. The unpublished version
      changes when you update your function's code and configuration. A published version is a snapshot of your function
      code and configuration that can't be changed. An alias is a named resource that maps to a version, and can be
      changed to map to a different version. Use the <code>Publish</code> parameter to create version <code>1</code> of
      your function from its initial configuration.</p>
    
         <p>The other parameters let you configure version-specific and function-level settings. You can modify
      version-specific settings later with <a>UpdateFunctionConfiguration</a>. Function-level settings apply
      to both the unpublished and published versions of the function, and include tags (<a>TagResource</a>)
      and per-function concurrency limits (<a>PutFunctionConcurrency</a>).</p>
    
         <p>You can use code signing if your deployment package is a .zip file archive. To enable code signing for this function,
      specify the ARN of a code-signing configuration. When a user
      attempts to deploy a code package with <a>UpdateFunctionCode</a>, Lambda checks that the code
      package has a valid signature from a trusted publisher. The code-signing configuration
      includes set set of signing profiles, which define the trusted publishers for this function.</p>
    
         <p>If another account or an Amazon Web Services service invokes your function, use <a>AddPermission</a> to grant
      permission by creating a resource-based IAM policy. You can grant permissions at the function level, on a version,
      or on an alias.</p>
    
         <p>To invoke your function directly, use <a>Invoke</a>. To invoke your function in response to events
      in other Amazon Web Services services, create an event source mapping (<a>CreateEventSourceMapping</a>), or configure a
      function trigger in the other service. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-invocation.html">Invoking Functions</a>.</p>
    

    Parameters

    Returns Promise<CreateFunctionCommandOutput>

  • Creates a Lambda function. To create a function, you need a deployment package and an execution role. The deployment package is a .zip file archive or container image that contains your function code. The execution role grants the function permission to use Amazon Web Services services, such as Amazon CloudWatch Logs for log streaming and X-Ray for request tracing.

    You set the package type to Image if the deployment package is a container image. For a container image, the code property must include the URI of a container image in the Amazon ECR registry. You do not need to specify the handler and runtime properties.

    You set the package type to Zip if the deployment package is a .zip file archive. For a .zip file archive, the code property specifies the location of the .zip file. You must also specify the handler and runtime properties. The code in the deployment package must be compatible with the target instruction set architecture of the function (x86-64 or arm64). If you do not specify the architecture, the default value is x86-64.

    When you create a function, Lambda provisions an instance of the function and its supporting resources. If your function connects to a VPC, this process can take a minute or so. During this time, you can't invoke or modify the function. The State, StateReason, and StateReasonCode fields in the response from GetFunctionConfiguration indicate when the function is ready to invoke. For more information, see Function States.

    A function has an unpublished version, and can have published versions and aliases. The unpublished version changes when you update your function's code and configuration. A published version is a snapshot of your function code and configuration that can't be changed. An alias is a named resource that maps to a version, and can be changed to map to a different version. Use the Publish parameter to create version 1 of your function from its initial configuration.

    The other parameters let you configure version-specific and function-level settings. You can modify version-specific settings later with UpdateFunctionConfiguration. Function-level settings apply to both the unpublished and published versions of the function, and include tags (TagResource) and per-function concurrency limits (PutFunctionConcurrency).

    You can use code signing if your deployment package is a .zip file archive. To enable code signing for this function, specify the ARN of a code-signing configuration. When a user attempts to deploy a code package with UpdateFunctionCode, Lambda checks that the code package has a valid signature from a trusted publisher. The code-signing configuration includes set set of signing profiles, which define the trusted publishers for this function.

    If another account or an Amazon Web Services service invokes your function, use AddPermission to grant permission by creating a resource-based IAM policy. You can grant permissions at the function level, on a version, or on an alias.

    To invoke your function directly, use Invoke. To invoke your function in response to events in other Amazon Web Services services, create an event source mapping (CreateEventSourceMapping), or configure a function trigger in the other service. For more information, see Invoking Functions.

    Parameters

    Returns void

  • Creates a Lambda function. To create a function, you need a deployment package and an execution role. The deployment package is a .zip file archive or container image that contains your function code. The execution role grants the function permission to use Amazon Web Services services, such as Amazon CloudWatch Logs for log streaming and X-Ray for request tracing.

    You set the package type to Image if the deployment package is a container image. For a container image, the code property must include the URI of a container image in the Amazon ECR registry. You do not need to specify the handler and runtime properties.

    You set the package type to Zip if the deployment package is a .zip file archive. For a .zip file archive, the code property specifies the location of the .zip file. You must also specify the handler and runtime properties. The code in the deployment package must be compatible with the target instruction set architecture of the function (x86-64 or arm64). If you do not specify the architecture, the default value is x86-64.

    When you create a function, Lambda provisions an instance of the function and its supporting resources. If your function connects to a VPC, this process can take a minute or so. During this time, you can't invoke or modify the function. The State, StateReason, and StateReasonCode fields in the response from GetFunctionConfiguration indicate when the function is ready to invoke. For more information, see Function States.

    A function has an unpublished version, and can have published versions and aliases. The unpublished version changes when you update your function's code and configuration. A published version is a snapshot of your function code and configuration that can't be changed. An alias is a named resource that maps to a version, and can be changed to map to a different version. Use the Publish parameter to create version 1 of your function from its initial configuration.

    The other parameters let you configure version-specific and function-level settings. You can modify version-specific settings later with UpdateFunctionConfiguration. Function-level settings apply to both the unpublished and published versions of the function, and include tags (TagResource) and per-function concurrency limits (PutFunctionConcurrency).

    You can use code signing if your deployment package is a .zip file archive. To enable code signing for this function, specify the ARN of a code-signing configuration. When a user attempts to deploy a code package with UpdateFunctionCode, Lambda checks that the code package has a valid signature from a trusted publisher. The code-signing configuration includes set set of signing profiles, which define the trusted publishers for this function.

    If another account or an Amazon Web Services service invokes your function, use AddPermission to grant permission by creating a resource-based IAM policy. You can grant permissions at the function level, on a version, or on an alias.

    To invoke your function directly, use Invoke. To invoke your function in response to events in other Amazon Web Services services, create an event source mapping (CreateEventSourceMapping), or configure a function trigger in the other service. For more information, see Invoking Functions.

    Parameters

    Returns void

  • Creates a Lambda function. To create a function, you need a deployment package and an execution role. The deployment package is a .zip file archive or container image that contains your function code. The execution role grants the function permission to use Amazon Web Services services, such as Amazon CloudWatch Logs for log streaming and X-Ray for request tracing.

         <p>You set the package type to <code>Image</code> if the deployment package is a
      <a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-images.html">container image</a>. For a container image,
      the code property must include the URI of a container image in the Amazon ECR registry.
      You do not need to specify the handler and runtime properties. </p>
    
         <p>You set the package type to <code>Zip</code> if the deployment package is a <a href="https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-package.html#gettingstarted-package-zip">.zip file
        archive</a>. For a .zip file archive, the code property specifies the location of the
      .zip file. You must also specify the handler and runtime properties. The code in the
      deployment package must be compatible with the target instruction set architecture of the
      function (<code>x86-64</code> or <code>arm64</code>). If you do not specify the architecture, the default value is
      <code>x86-64</code>.</p>
    
         <p>When you create a function, Lambda provisions an instance of the function and its supporting resources. If
      your function connects to a VPC, this process can take a minute or so. During this time, you can't invoke or
      modify the function. The <code>State</code>, <code>StateReason</code>, and <code>StateReasonCode</code> fields in
      the response from <a>GetFunctionConfiguration</a> indicate when the function is ready to invoke. For
      more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/functions-states.html">Function
        States</a>.</p>
    
         <p>A function has an unpublished version, and can have published versions and aliases. The unpublished version
      changes when you update your function's code and configuration. A published version is a snapshot of your function
      code and configuration that can't be changed. An alias is a named resource that maps to a version, and can be
      changed to map to a different version. Use the <code>Publish</code> parameter to create version <code>1</code> of
      your function from its initial configuration.</p>
    
         <p>The other parameters let you configure version-specific and function-level settings. You can modify
      version-specific settings later with <a>UpdateFunctionConfiguration</a>. Function-level settings apply
      to both the unpublished and published versions of the function, and include tags (<a>TagResource</a>)
      and per-function concurrency limits (<a>PutFunctionConcurrency</a>).</p>
    
         <p>You can use code signing if your deployment package is a .zip file archive. To enable code signing for this function,
      specify the ARN of a code-signing configuration. When a user
      attempts to deploy a code package with <a>UpdateFunctionCode</a>, Lambda checks that the code
      package has a valid signature from a trusted publisher. The code-signing configuration
      includes set set of signing profiles, which define the trusted publishers for this function.</p>
    
         <p>If another account or an Amazon Web Services service invokes your function, use <a>AddPermission</a> to grant
      permission by creating a resource-based IAM policy. You can grant permissions at the function level, on a version,
      or on an alias.</p>
    
         <p>To invoke your function directly, use <a>Invoke</a>. To invoke your function in response to events
      in other Amazon Web Services services, create an event source mapping (<a>CreateEventSourceMapping</a>), or configure a
      function trigger in the other service. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-invocation.html">Invoking Functions</a>.</p>
    

    Parameters

    • args: CreateFunctionCommandInput
    • Optional options: __HttpHandlerOptions

    Returns Promise<CreateFunctionCommandOutput>

  • Creates a Lambda function. To create a function, you need a deployment package and an execution role. The deployment package is a .zip file archive or container image that contains your function code. The execution role grants the function permission to use Amazon Web Services services, such as Amazon CloudWatch Logs for log streaming and X-Ray for request tracing.

    You set the package type to Image if the deployment package is a container image. For a container image, the code property must include the URI of a container image in the Amazon ECR registry. You do not need to specify the handler and runtime properties.

    You set the package type to Zip if the deployment package is a .zip file archive. For a .zip file archive, the code property specifies the location of the .zip file. You must also specify the handler and runtime properties. The code in the deployment package must be compatible with the target instruction set architecture of the function (x86-64 or arm64). If you do not specify the architecture, the default value is x86-64.

    When you create a function, Lambda provisions an instance of the function and its supporting resources. If your function connects to a VPC, this process can take a minute or so. During this time, you can't invoke or modify the function. The State, StateReason, and StateReasonCode fields in the response from GetFunctionConfiguration indicate when the function is ready to invoke. For more information, see Function States.

    A function has an unpublished version, and can have published versions and aliases. The unpublished version changes when you update your function's code and configuration. A published version is a snapshot of your function code and configuration that can't be changed. An alias is a named resource that maps to a version, and can be changed to map to a different version. Use the Publish parameter to create version 1 of your function from its initial configuration.

    The other parameters let you configure version-specific and function-level settings. You can modify version-specific settings later with UpdateFunctionConfiguration. Function-level settings apply to both the unpublished and published versions of the function, and include tags (TagResource) and per-function concurrency limits (PutFunctionConcurrency).

    You can use code signing if your deployment package is a .zip file archive. To enable code signing for this function, specify the ARN of a code-signing configuration. When a user attempts to deploy a code package with UpdateFunctionCode, Lambda checks that the code package has a valid signature from a trusted publisher. The code-signing configuration includes set set of signing profiles, which define the trusted publishers for this function.

    If another account or an Amazon Web Services service invokes your function, use AddPermission to grant permission by creating a resource-based IAM policy. You can grant permissions at the function level, on a version, or on an alias.

    To invoke your function directly, use Invoke. To invoke your function in response to events in other Amazon Web Services services, create an event source mapping (CreateEventSourceMapping), or configure a function trigger in the other service. For more information, see Invoking Functions.

    Parameters

    Returns void

  • Creates a Lambda function. To create a function, you need a deployment package and an execution role. The deployment package is a .zip file archive or container image that contains your function code. The execution role grants the function permission to use Amazon Web Services services, such as Amazon CloudWatch Logs for log streaming and X-Ray for request tracing.

    You set the package type to Image if the deployment package is a container image. For a container image, the code property must include the URI of a container image in the Amazon ECR registry. You do not need to specify the handler and runtime properties.

    You set the package type to Zip if the deployment package is a .zip file archive. For a .zip file archive, the code property specifies the location of the .zip file. You must also specify the handler and runtime properties. The code in the deployment package must be compatible with the target instruction set architecture of the function (x86-64 or arm64). If you do not specify the architecture, the default value is x86-64.

    When you create a function, Lambda provisions an instance of the function and its supporting resources. If your function connects to a VPC, this process can take a minute or so. During this time, you can't invoke or modify the function. The State, StateReason, and StateReasonCode fields in the response from GetFunctionConfiguration indicate when the function is ready to invoke. For more information, see Function States.

    A function has an unpublished version, and can have published versions and aliases. The unpublished version changes when you update your function's code and configuration. A published version is a snapshot of your function code and configuration that can't be changed. An alias is a named resource that maps to a version, and can be changed to map to a different version. Use the Publish parameter to create version 1 of your function from its initial configuration.

    The other parameters let you configure version-specific and function-level settings. You can modify version-specific settings later with UpdateFunctionConfiguration. Function-level settings apply to both the unpublished and published versions of the function, and include tags (TagResource) and per-function concurrency limits (PutFunctionConcurrency).

    You can use code signing if your deployment package is a .zip file archive. To enable code signing for this function, specify the ARN of a code-signing configuration. When a user attempts to deploy a code package with UpdateFunctionCode, Lambda checks that the code package has a valid signature from a trusted publisher. The code-signing configuration includes set set of signing profiles, which define the trusted publishers for this function.

    If another account or an Amazon Web Services service invokes your function, use AddPermission to grant permission by creating a resource-based IAM policy. You can grant permissions at the function level, on a version, or on an alias.

    To invoke your function directly, use Invoke. To invoke your function in response to events in other Amazon Web Services services, create an event source mapping (CreateEventSourceMapping), or configure a function trigger in the other service. For more information, see Invoking Functions.

    Parameters

    Returns void

createFunctionUrlConfig

deleteAlias

deleteCodeSigningConfig

deleteEventSourceMapping

deleteFunction

  • Deletes a Lambda function. To delete a specific function version, use the Qualifier parameter. Otherwise, all versions and aliases are deleted.

         <p>To delete Lambda event source mappings that invoke a function, use <a>DeleteEventSourceMapping</a>.
      For Amazon Web Services services and resources that invoke your function directly, delete the trigger in the service where you
      originally configured it.</p>
    

    Parameters

    Returns Promise<DeleteFunctionCommandOutput>

  • Deletes a Lambda function. To delete a specific function version, use the Qualifier parameter. Otherwise, all versions and aliases are deleted.

    To delete Lambda event source mappings that invoke a function, use DeleteEventSourceMapping. For Amazon Web Services services and resources that invoke your function directly, delete the trigger in the service where you originally configured it.

    Parameters

    Returns void

  • Deletes a Lambda function. To delete a specific function version, use the Qualifier parameter. Otherwise, all versions and aliases are deleted.

    To delete Lambda event source mappings that invoke a function, use DeleteEventSourceMapping. For Amazon Web Services services and resources that invoke your function directly, delete the trigger in the service where you originally configured it.

    Parameters

    Returns void

  • Deletes a Lambda function. To delete a specific function version, use the Qualifier parameter. Otherwise, all versions and aliases are deleted.

         <p>To delete Lambda event source mappings that invoke a function, use <a>DeleteEventSourceMapping</a>.
      For Amazon Web Services services and resources that invoke your function directly, delete the trigger in the service where you
      originally configured it.</p>
    

    Parameters

    • args: DeleteFunctionCommandInput
    • Optional options: __HttpHandlerOptions

    Returns Promise<DeleteFunctionCommandOutput>

  • Deletes a Lambda function. To delete a specific function version, use the Qualifier parameter. Otherwise, all versions and aliases are deleted.

    To delete Lambda event source mappings that invoke a function, use DeleteEventSourceMapping. For Amazon Web Services services and resources that invoke your function directly, delete the trigger in the service where you originally configured it.

    Parameters

    Returns void

  • Deletes a Lambda function. To delete a specific function version, use the Qualifier parameter. Otherwise, all versions and aliases are deleted.

    To delete Lambda event source mappings that invoke a function, use DeleteEventSourceMapping. For Amazon Web Services services and resources that invoke your function directly, delete the trigger in the service where you originally configured it.

    Parameters

    Returns void

deleteFunctionCodeSigningConfig

deleteFunctionConcurrency

deleteFunctionEventInvokeConfig

deleteFunctionUrlConfig

deleteLayerVersion

deleteProvisionedConcurrencyConfig

destroy

  • destroy(): void
  • Destroy underlying resources, like sockets. It's usually not necessary to do this. However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed. Otherwise, sockets might stay open for quite a long time before the server terminates them.

    Returns void

getAccountSettings

getAlias

getCodeSigningConfig

getEventSourceMapping

getFunction

  • Returns information about the function or function version, with a link to download the deployment package that's valid for 10 minutes. If you specify a function version, only details that are specific to that version are returned.

    Parameters

    Returns Promise<GetFunctionCommandOutput>

  • Returns information about the function or function version, with a link to download the deployment package that's valid for 10 minutes. If you specify a function version, only details that are specific to that version are returned.

    Parameters

    Returns void

  • Returns information about the function or function version, with a link to download the deployment package that's valid for 10 minutes. If you specify a function version, only details that are specific to that version are returned.

    Parameters

    Returns void

  • Returns information about the function or function version, with a link to download the deployment package that's valid for 10 minutes. If you specify a function version, only details that are specific to that version are returned.

    Parameters

    • args: GetFunctionCommandInput
    • Optional options: __HttpHandlerOptions

    Returns Promise<GetFunctionCommandOutput>

  • Returns information about the function or function version, with a link to download the deployment package that's valid for 10 minutes. If you specify a function version, only details that are specific to that version are returned.

    Parameters

    Returns void

  • Returns information about the function or function version, with a link to download the deployment package that's valid for 10 minutes. If you specify a function version, only details that are specific to that version are returned.

    Parameters

    Returns void

getFunctionCodeSigningConfig

getFunctionConcurrency

getFunctionConfiguration

getFunctionEventInvokeConfig

getFunctionUrlConfig

getLayerVersion

getLayerVersionByArn

getLayerVersionPolicy

getPolicy

getProvisionedConcurrencyConfig

invoke

  • Invokes a Lambda function. You can invoke a function synchronously (and wait for the response), or asynchronously. To invoke a function asynchronously, set InvocationType to Event.

         <p>For <a href="https://docs.aws.amazon.com/lambda/latest/dg/invocation-sync.html">synchronous invocation</a>,
      details about the function response, including errors, are included in the response body and headers. For either
      invocation type, you can find more information in the <a href="https://docs.aws.amazon.com/lambda/latest/dg/monitoring-functions.html">execution log</a> and <a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-x-ray.html">trace</a>.</p>
    
         <p>When an error occurs, your function may be invoked multiple times. Retry behavior varies by error type,
      client, event source, and invocation type. For example, if you invoke a function asynchronously and it returns an
      error, Lambda executes the function up to two more times. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/retries-on-errors.html">Retry Behavior</a>.</p>
    
         <p>For <a href="https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html">asynchronous invocation</a>,
      Lambda adds events to a queue before sending them to your function. If your function does not have enough capacity
      to keep up with the queue, events may be lost. Occasionally, your function may receive the same event multiple
      times, even if no error occurs. To retain events that were not processed, configure your function with a <a href="https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#dlq">dead-letter queue</a>.</p>
    
         <p>The status code in the API response doesn't reflect function errors. Error codes are reserved for errors that
      prevent your function from executing, such as permissions errors, <a href="https://docs.aws.amazon.com/lambda/latest/dg/limits.html">limit errors</a>, or issues with your function's code and configuration.
      For example, Lambda returns <code>TooManyRequestsException</code> if executing the function would cause you to
      exceed a concurrency limit at either the account level (<code>ConcurrentInvocationLimitExceeded</code>) or
      function level (<code>ReservedFunctionConcurrentInvocationLimitExceeded</code>).</p>
    
         <p>For functions with a long timeout, your client might be disconnected during synchronous invocation while it
      waits for a response. Configure your HTTP client, SDK, firewall, proxy, or operating system to allow for long
      connections with timeout or keep-alive settings.</p>
    
         <p>This operation requires permission for the <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/list_awslambda.html">lambda:InvokeFunction</a> action. For details on how to set up
      permissions for cross-account invocations, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html#permissions-resource-xaccountinvoke">Granting function
      access to other accounts</a>.</p>
    

    Parameters

    Returns Promise<InvokeCommandOutput>

  • Invokes a Lambda function. You can invoke a function synchronously (and wait for the response), or asynchronously. To invoke a function asynchronously, set InvocationType to Event.

    For synchronous invocation, details about the function response, including errors, are included in the response body and headers. For either invocation type, you can find more information in the execution log and trace.

    When an error occurs, your function may be invoked multiple times. Retry behavior varies by error type, client, event source, and invocation type. For example, if you invoke a function asynchronously and it returns an error, Lambda executes the function up to two more times. For more information, see Retry Behavior.

    For asynchronous invocation, Lambda adds events to a queue before sending them to your function. If your function does not have enough capacity to keep up with the queue, events may be lost. Occasionally, your function may receive the same event multiple times, even if no error occurs. To retain events that were not processed, configure your function with a dead-letter queue.

    The status code in the API response doesn't reflect function errors. Error codes are reserved for errors that prevent your function from executing, such as permissions errors, limit errors, or issues with your function's code and configuration. For example, Lambda returns TooManyRequestsException if executing the function would cause you to exceed a concurrency limit at either the account level (ConcurrentInvocationLimitExceeded) or function level (ReservedFunctionConcurrentInvocationLimitExceeded).

    For functions with a long timeout, your client might be disconnected during synchronous invocation while it waits for a response. Configure your HTTP client, SDK, firewall, proxy, or operating system to allow for long connections with timeout or keep-alive settings.

    This operation requires permission for the lambda:InvokeFunction action. For details on how to set up permissions for cross-account invocations, see Granting function access to other accounts.

    Parameters

    Returns void

  • Invokes a Lambda function. You can invoke a function synchronously (and wait for the response), or asynchronously. To invoke a function asynchronously, set InvocationType to Event.

    For synchronous invocation, details about the function response, including errors, are included in the response body and headers. For either invocation type, you can find more information in the execution log and trace.

    When an error occurs, your function may be invoked multiple times. Retry behavior varies by error type, client, event source, and invocation type. For example, if you invoke a function asynchronously and it returns an error, Lambda executes the function up to two more times. For more information, see Retry Behavior.

    For asynchronous invocation, Lambda adds events to a queue before sending them to your function. If your function does not have enough capacity to keep up with the queue, events may be lost. Occasionally, your function may receive the same event multiple times, even if no error occurs. To retain events that were not processed, configure your function with a dead-letter queue.

    The status code in the API response doesn't reflect function errors. Error codes are reserved for errors that prevent your function from executing, such as permissions errors, limit errors, or issues with your function's code and configuration. For example, Lambda returns TooManyRequestsException if executing the function would cause you to exceed a concurrency limit at either the account level (ConcurrentInvocationLimitExceeded) or function level (ReservedFunctionConcurrentInvocationLimitExceeded).

    For functions with a long timeout, your client might be disconnected during synchronous invocation while it waits for a response. Configure your HTTP client, SDK, firewall, proxy, or operating system to allow for long connections with timeout or keep-alive settings.

    This operation requires permission for the lambda:InvokeFunction action. For details on how to set up permissions for cross-account invocations, see Granting function access to other accounts.

    Parameters

    Returns void

  • Invokes a Lambda function. You can invoke a function synchronously (and wait for the response), or asynchronously. To invoke a function asynchronously, set InvocationType to Event.

         <p>For <a href="https://docs.aws.amazon.com/lambda/latest/dg/invocation-sync.html">synchronous invocation</a>,
      details about the function response, including errors, are included in the response body and headers. For either
      invocation type, you can find more information in the <a href="https://docs.aws.amazon.com/lambda/latest/dg/monitoring-functions.html">execution log</a> and <a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-x-ray.html">trace</a>.</p>
    
         <p>When an error occurs, your function may be invoked multiple times. Retry behavior varies by error type,
      client, event source, and invocation type. For example, if you invoke a function asynchronously and it returns an
      error, Lambda executes the function up to two more times. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/retries-on-errors.html">Retry Behavior</a>.</p>
    
         <p>For <a href="https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html">asynchronous invocation</a>,
      Lambda adds events to a queue before sending them to your function. If your function does not have enough capacity
      to keep up with the queue, events may be lost. Occasionally, your function may receive the same event multiple
      times, even if no error occurs. To retain events that were not processed, configure your function with a <a href="https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#dlq">dead-letter queue</a>.</p>
    
         <p>The status code in the API response doesn't reflect function errors. Error codes are reserved for errors that
      prevent your function from executing, such as permissions errors, <a href="https://docs.aws.amazon.com/lambda/latest/dg/limits.html">limit errors</a>, or issues with your function's code and configuration.
      For example, Lambda returns <code>TooManyRequestsException</code> if executing the function would cause you to
      exceed a concurrency limit at either the account level (<code>ConcurrentInvocationLimitExceeded</code>) or
      function level (<code>ReservedFunctionConcurrentInvocationLimitExceeded</code>).</p>
    
         <p>For functions with a long timeout, your client might be disconnected during synchronous invocation while it
      waits for a response. Configure your HTTP client, SDK, firewall, proxy, or operating system to allow for long
      connections with timeout or keep-alive settings.</p>
    
         <p>This operation requires permission for the <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/list_awslambda.html">lambda:InvokeFunction</a> action. For details on how to set up
      permissions for cross-account invocations, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html#permissions-resource-xaccountinvoke">Granting function
      access to other accounts</a>.</p>
    

    Parameters

    • args: InvokeCommandInput
    • Optional options: __HttpHandlerOptions

    Returns Promise<InvokeCommandOutput>

  • Invokes a Lambda function. You can invoke a function synchronously (and wait for the response), or asynchronously. To invoke a function asynchronously, set InvocationType to Event.

    For synchronous invocation, details about the function response, including errors, are included in the response body and headers. For either invocation type, you can find more information in the execution log and trace.

    When an error occurs, your function may be invoked multiple times. Retry behavior varies by error type, client, event source, and invocation type. For example, if you invoke a function asynchronously and it returns an error, Lambda executes the function up to two more times. For more information, see Retry Behavior.

    For asynchronous invocation, Lambda adds events to a queue before sending them to your function. If your function does not have enough capacity to keep up with the queue, events may be lost. Occasionally, your function may receive the same event multiple times, even if no error occurs. To retain events that were not processed, configure your function with a dead-letter queue.

    The status code in the API response doesn't reflect function errors. Error codes are reserved for errors that prevent your function from executing, such as permissions errors, limit errors, or issues with your function's code and configuration. For example, Lambda returns TooManyRequestsException if executing the function would cause you to exceed a concurrency limit at either the account level (ConcurrentInvocationLimitExceeded) or function level (ReservedFunctionConcurrentInvocationLimitExceeded).

    For functions with a long timeout, your client might be disconnected during synchronous invocation while it waits for a response. Configure your HTTP client, SDK, firewall, proxy, or operating system to allow for long connections with timeout or keep-alive settings.

    This operation requires permission for the lambda:InvokeFunction action. For details on how to set up permissions for cross-account invocations, see Granting function access to other accounts.

    Parameters

    Returns void

  • Invokes a Lambda function. You can invoke a function synchronously (and wait for the response), or asynchronously. To invoke a function asynchronously, set InvocationType to Event.

    For synchronous invocation, details about the function response, including errors, are included in the response body and headers. For either invocation type, you can find more information in the execution log and trace.

    When an error occurs, your function may be invoked multiple times. Retry behavior varies by error type, client, event source, and invocation type. For example, if you invoke a function asynchronously and it returns an error, Lambda executes the function up to two more times. For more information, see Retry Behavior.

    For asynchronous invocation, Lambda adds events to a queue before sending them to your function. If your function does not have enough capacity to keep up with the queue, events may be lost. Occasionally, your function may receive the same event multiple times, even if no error occurs. To retain events that were not processed, configure your function with a dead-letter queue.

    The status code in the API response doesn't reflect function errors. Error codes are reserved for errors that prevent your function from executing, such as permissions errors, limit errors, or issues with your function's code and configuration. For example, Lambda returns TooManyRequestsException if executing the function would cause you to exceed a concurrency limit at either the account level (ConcurrentInvocationLimitExceeded) or function level (ReservedFunctionConcurrentInvocationLimitExceeded).

    For functions with a long timeout, your client might be disconnected during synchronous invocation while it waits for a response. Configure your HTTP client, SDK, firewall, proxy, or operating system to allow for long connections with timeout or keep-alive settings.

    This operation requires permission for the lambda:InvokeFunction action. For details on how to set up permissions for cross-account invocations, see Granting function access to other accounts.

    Parameters

    Returns void

invokeAsync

listAliases

listCodeSigningConfigs

listEventSourceMappings

listFunctionEventInvokeConfigs

listFunctionUrlConfigs

listFunctions

  • Returns a list of Lambda functions, with the version-specific configuration of each. Lambda returns up to 50 functions per call.

    Set FunctionVersion to ALL to include all published versions of each function in addition to the unpublished version.

    The ListFunctions action returns a subset of the FunctionConfiguration fields. To get the additional fields (State, StateReasonCode, StateReason, LastUpdateStatus, LastUpdateStatusReason, LastUpdateStatusReasonCode) for a function or version, use GetFunction.

    Parameters

    Returns Promise<ListFunctionsCommandOutput>

  • Returns a list of Lambda functions, with the version-specific configuration of each. Lambda returns up to 50 functions per call.

    Set FunctionVersion to ALL to include all published versions of each function in addition to the unpublished version.

    The ListFunctions action returns a subset of the FunctionConfiguration fields. To get the additional fields (State, StateReasonCode, StateReason, LastUpdateStatus, LastUpdateStatusReason, LastUpdateStatusReasonCode) for a function or version, use GetFunction.

    Parameters

    Returns void

  • Returns a list of Lambda functions, with the version-specific configuration of each. Lambda returns up to 50 functions per call.

    Set FunctionVersion to ALL to include all published versions of each function in addition to the unpublished version.

    The ListFunctions action returns a subset of the FunctionConfiguration fields. To get the additional fields (State, StateReasonCode, StateReason, LastUpdateStatus, LastUpdateStatusReason, LastUpdateStatusReasonCode) for a function or version, use GetFunction.

    Parameters

    Returns void

  • Returns a list of Lambda functions, with the version-specific configuration of each. Lambda returns up to 50 functions per call.

    Set FunctionVersion to ALL to include all published versions of each function in addition to the unpublished version.

    The ListFunctions action returns a subset of the FunctionConfiguration fields. To get the additional fields (State, StateReasonCode, StateReason, LastUpdateStatus, LastUpdateStatusReason, LastUpdateStatusReasonCode) for a function or version, use GetFunction.

    Parameters

    • args: ListFunctionsCommandInput
    • Optional options: __HttpHandlerOptions

    Returns Promise<ListFunctionsCommandOutput>

  • Returns a list of Lambda functions, with the version-specific configuration of each. Lambda returns up to 50 functions per call.

    Set FunctionVersion to ALL to include all published versions of each function in addition to the unpublished version.

    The ListFunctions action returns a subset of the FunctionConfiguration fields. To get the additional fields (State, StateReasonCode, StateReason, LastUpdateStatus, LastUpdateStatusReason, LastUpdateStatusReasonCode) for a function or version, use GetFunction.

    Parameters

    Returns void

  • Returns a list of Lambda functions, with the version-specific configuration of each. Lambda returns up to 50 functions per call.

    Set FunctionVersion to ALL to include all published versions of each function in addition to the unpublished version.

    The ListFunctions action returns a subset of the FunctionConfiguration fields. To get the additional fields (State, StateReasonCode, StateReason, LastUpdateStatus, LastUpdateStatusReason, LastUpdateStatusReasonCode) for a function or version, use GetFunction.

    Parameters

    Returns void

listFunctionsByCodeSigningConfig

listLayerVersions

listLayers

listProvisionedConcurrencyConfigs

listTags

listVersionsByFunction

publishLayerVersion