AWS Fundamentals Logo
AWS Fundamentals
aws lambda

AWS AWS Lambda CLI Commands

85 CLI commands available for AWS Lambda.

CommandSample
add-layer-version-permission

Adds permissions to the resource-based policy of a version of an Lambda layer. Use this action to grant layer usage permission to other accounts. You can grant permission to a single account, all accounts in an organization, or all Amazon Web Services accounts. To revoke permission, call RemoveLaye

add-permission

Grants a principal 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. N

checkpoint-durable-execution

Saves the progress of a durable function execution during runtime. This API is used by the Lambda durable functions SDK to checkpoint completed steps and schedule asynchronous operations. You typically don't need to call this API directly as the SDK handles checkpointing automatically. Each checkpoi

create-alias

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 th

create-capacity-provider

Creates a capacity provider that manages compute resources for Lambda functions

create-code-signing-config

Creates a code signing configuration. 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).

create-event-source-mapping

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. Amazon DynamoDB Streams Amazon Kinesis Amazon SQS Amazon MQ a

create-function

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 Amaz

create-function-url-config

Creates a Lambda function URL with the specified configuration parameters. A function URL is a dedicated HTTP(S) endpoint that you can use to invoke your function.

delete-alias

Deletes a Lambda function alias.

delete-capacity-provider

Deletes a capacity provider. You cannot delete a capacity provider that is currently being used by Lambda functions.

delete-code-signing-config

Deletes the code signing configuration. You can delete the code signing configuration only if no function is using it.

delete-event-source-mapping

Deletes an event source mapping. You can get the identifier of a mapping from the output of ListEventSourceMappings. When you delete an event source mapping, it enters a Deleting state and might not be completely deleted for several seconds.

delete-function

Deletes a Lambda function. To delete a specific function version, use the Qualifier parameter. Otherwise, all versions and aliases are deleted. This doesn't require the user to have explicit permissions for DeleteAlias. A deleted Lambda function cannot be recovered. Ensure that you specify the corr

delete-function-code-signing-config

Removes the code signing configuration from the function.

delete-function-concurrency

Removes a concurrent execution limit from a function.

delete-function-event-invoke-config

Deletes the configuration for asynchronous invocation for a function, version, or alias. To configure options for asynchronous invocation, use PutFunctionEventInvokeConfig.

delete-function-url-config

Deletes a Lambda function URL. When you delete a function URL, you can't recover it. Creating a new function URL results in a different URL address.

delete-layer-version

Deletes a version of an Lambda layer. Deleted versions can no longer be viewed or added to functions. To avoid breaking functions, a copy of the version remains in Lambda until no functions refer to it.

delete-provisioned-concurrency-config

Deletes the provisioned concurrency configuration for a function.

get-account-settings

Retrieves details about your account's limits and usage in an Amazon Web Services Region.

get-alias

Returns details about a Lambda function alias.

get-capacity-provider

Retrieves information about a specific capacity provider, including its configuration, state, and associated resources.

get-code-signing-config

Returns information about the specified code signing configuration.

get-durable-execution

Retrieves detailed information about a specific durable execution, including its current status, input payload, result or error information, and execution metadata such as start time and usage statistics.

get-durable-execution-history

Retrieves the execution history for a durable execution, showing all the steps, callbacks, and events that occurred during the execution. This provides a detailed audit trail of the execution's progress over time. The history is available while the execution is running and for a retention period aft

get-durable-execution-state

Retrieves the current execution state required for the replay process during durable function execution. This API is used by the Lambda durable functions SDK to get state information needed for replay. You typically don't need to call this API directly as the SDK handles state management automatical

get-event-source-mapping

Returns details about an event source mapping. You can get the identifier of a mapping from the output of ListEventSourceMappings.

get-function

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.

get-function-code-signing-config

Returns the code signing configuration for the specified function.

get-function-concurrency

Returns details about the reserved concurrency configuration for a function. To set a concurrency limit for a function, use PutFunctionConcurrency.

get-function-configuration

Returns the version-specific settings of a Lambda function or version. The output includes only options that can vary between versions of a function. To modify these settings, use UpdateFunctionConfiguration. To get all of a function's details, including function-level settings, use GetFunction.

get-function-event-invoke-config

Retrieves the configuration for asynchronous invocation for a function, version, or alias. To configure options for asynchronous invocation, use PutFunctionEventInvokeConfig.

get-function-recursion-config

Returns your function's recursive loop detection configuration.

get-function-scaling-config

Retrieves the scaling configuration for a Lambda Managed Instances function.

get-function-url-config

Returns details about a Lambda function URL.

get-layer-version

Returns information about a version of an Lambda layer, with a link to download the layer archive that's valid for 10 minutes.

get-layer-version-by-arn

Returns information about a version of an Lambda layer, with a link to download the layer archive that's valid for 10 minutes.

get-layer-version-policy

Returns the permission policy for a version of an Lambda layer. For more information, see AddLayerVersionPermission.

get-policy

Returns the resource-based IAM policy for a function, version, or alias.

get-provisioned-concurrency-config

Retrieves the provisioned concurrency configuration for a function's alias or version.

get-runtime-management-config

Retrieves the runtime management configuration for a function's version. If the runtime update mode is Manual, this includes the ARN of the runtime version and the runtime update mode. If the runtime update mode is Auto or Function update, this includes the runtime update mode and null is returned f

invoke

Invokes a Lambda function. You can invoke a function synchronously (and wait for the response), or asynchronously. By default, Lambda invokes your function synchronously (i.e. theInvocationType is RequestResponse). To invoke a function asynchronously, set InvocationType to Event. Lambda passes the C

invoke-async

For asynchronous function invocation, use Invoke. Invokes a function asynchronously. The payload limit is 256KB. For larger payloads, for up to 1MB, use Invoke. If you do use the InvokeAsync action, note that it doesn't support the use of X-Ray active tracing. Trace ID is not propagated to the

invoke-with-response-stream

Configure your Lambda functions to stream response payloads back to clients. For more information, see Configuring a Lambda function to stream responses. This operation requires permission for the lambda:InvokeFunction action. For details on how to set up permissions for cross-account invocations, s

list-aliases

Returns a list of aliases for a Lambda function.

list-capacity-providers

Returns a list of capacity providers in your account.

list-code-signing-configs

Returns a list of code signing configurations. A request returns up to 10,000 configurations per call. You can use the MaxItems parameter to return fewer configurations per call.

list-durable-executions-by-function

Returns a list of durable executions for a specified Lambda function. You can filter the results by execution name, status, and start time range. This API supports pagination for large result sets.

list-event-source-mappings

Lists event source mappings. Specify an EventSourceArn to show only event source mappings for a single event source.

list-function-event-invoke-configs

Retrieves a list of configurations for asynchronous invocation for a function. To configure options for asynchronous invocation, use PutFunctionEventInvokeConfig.

list-function-url-configs

Returns a list of Lambda function URLs for the specified function.

list-function-versions-by-capacity-provider

Returns a list of function versions that are configured to use a specific capacity provider.

list-functions

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 operation returns a subset of the

list-functions-by-code-signing-config

List the functions that use the specified code signing configuration. You can use this method prior to deleting a code signing configuration, to verify that no functions are using it.

list-layer-versions

Lists the versions of an Lambda layer. Versions that have been deleted aren't listed. Specify a runtime identifier to list only versions that indicate that they're compatible with that runtime. Specify a compatible architecture to include only layer versions that are compatible with that architectur

list-layers

Lists Lambda layers and shows information about the latest version of each. Specify a runtime identifier to list only layers that indicate that they're compatible with that runtime. Specify a compatible architecture to include only layers that are compatible with that instruction set architecture.

list-provisioned-concurrency-configs

Retrieves a list of provisioned concurrency configurations for a function.

list-tags

Returns a function, event source mapping, or code signing configuration's tags. You can also view function tags with GetFunction.

list-versions-by-function

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

publish-layer-version

Creates an Lambda layer from a ZIP archive. Each time you call PublishLayerVersion with the same layer name, a new version is created. Add layers to your function with CreateFunction or UpdateFunctionConfiguration.

publish-version

Creates a version from the current code and configuration of a function. Use versions to create a snapshot of your function code and configuration that doesn't change. Lambda doesn't publish a version if the function's configuration and code haven't changed since the last version. Use UpdateFunction

put-function-code-signing-config

Update the code signing configuration for the function. Changes to the code signing configuration take effect the next time a user tries to deploy a code package to the function.

put-function-concurrency

Sets the maximum number of simultaneous executions for a function, and reserves capacity for that concurrency level. Concurrency settings apply to the function as a whole, including all published versions and the unpublished version. Reserving concurrency both ensures that your function has capacity

put-function-event-invoke-config

Configures options for asynchronous invocation on a function, version, or alias. If a configuration already exists for a function, version, or alias, this operation overwrites it. If you exclude any settings, they are removed. To set one option without affecting existing settings for other options,

put-function-recursion-config

Sets your function's recursive loop detection configuration. When you configure a Lambda function to output to the same service or resource that invokes the function, it's possible to create an infinite recursive loop. For example, a Lambda function might write a message to an Amazon Simple Queue Se

put-function-scaling-config

Sets the scaling configuration for a Lambda Managed Instances function. The scaling configuration defines the minimum and maximum number of execution environments that can be provisioned for the function, allowing you to control scaling behavior and resource allocation.

put-provisioned-concurrency-config

Adds a provisioned concurrency configuration to a function's alias or version.

put-runtime-management-config

Sets the runtime management configuration for a function's version. For more information, see Runtime updates.

remove-layer-version-permission

Removes a statement from the permissions policy for a version of an Lambda layer. For more information, see AddLayerVersionPermission.

remove-permission

Revokes function-use permission from an Amazon Web Services service or another Amazon Web Services account. You can get the ID of the statement from the output of GetPolicy.

send-durable-execution-callback-failure

Sends a failure response for a callback operation in a durable execution. Use this API when an external system cannot complete a callback operation successfully.

send-durable-execution-callback-heartbeat

Sends a heartbeat signal for a long-running callback operation to prevent timeout. Use this API to extend the callback timeout period while the external operation is still in progress.

send-durable-execution-callback-success

Sends a successful completion response for a callback operation in a durable execution. Use this API when an external system has successfully completed a callback operation.

stop-durable-execution

Stops a running durable execution. The execution transitions to STOPPED status and cannot be resumed. Any in-progress operations are terminated.

tag-resource

Adds tags to a function, event source mapping, or code signing configuration.

untag-resource

Removes tags from a function, event source mapping, or code signing configuration.

update-alias

Updates the configuration of a Lambda function alias.

update-capacity-provider

Updates the configuration of an existing capacity provider.

update-code-signing-config

Update the code signing configuration. Changes to the code signing configuration take effect the next time a user tries to deploy a code package to the function.

update-event-source-mapping

Updates an event source mapping. You can change the function that Lambda invokes, or pause invocation and resume later from the same location. For details about how to configure different event sources, see the following topics. Amazon DynamoDB Streams Amazon Kinesis Amazon SQS A

update-function-code

Updates a Lambda function's code. If code signing is enabled for the function, the code package must be signed by a trusted publisher. For more information, see Configuring code signing for Lambda. If the function's package type is Image, then you must specify the code package in ImageUri as the URI

update-function-configuration

Modify the version-specific settings of a Lambda function. When you update 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. During this time, you can't modify the function, but you can still in

update-function-event-invoke-config

Updates the configuration for asynchronous invocation for a function, version, or alias. To configure options for asynchronous invocation, use PutFunctionEventInvokeConfig.

update-function-url-config

Updates the configuration for a Lambda function URL.

Get the AWS Lambda Cheat Sheet

Everything you need to know about AWS Lambda on one page. HD quality, print-friendly.

Download Free Infographic

Get the AWS Lambda Cheat Sheet

Everything you need to know about AWS Lambda on one page. HD quality, print-friendly.

Download Free Infographic

Quick Stats

Total Commands85
ServiceLambda