View a markdown version of this page

RestoreRuntime - AWS Lambda Core

RestoreRuntime

Cancels a pending scheduled deletion, returning the resource to the ACTIVE state. Scope is determined by the RuntimeName path parameter plus an optional, mutually exclusive RuntimeVersion or RuntimeAlias query parameter: with neither, the runtime itself is restored; with RuntimeVersion, the named runtime version; with RuntimeAlias, the named runtime alias. Restoring a resource that is already ACTIVE is a no-op success. Restore only works while the target is PENDING_DELETION; once the scheduled deletion has begun executing (DELETING) or has completed, the call fails.

Request Syntax

POST /2026-10-01/runtimes/RuntimeName/restore?RuntimeAlias=RuntimeAlias&RuntimeVersion=RuntimeVersion HTTP/1.1

URI Request Parameters

The request uses the following URI parameters.

RuntimeAlias

Optional. Restores the named RuntimeAlias under RuntimeName. Mutually exclusive with RuntimeVersion; supplying both is rejected with InvalidParameterValueException.

Length Constraints: Minimum length of 1. Maximum length of 128.

Pattern: [A-Za-z0-9_]([A-Za-z0-9_.-]{0,126}[A-Za-z0-9_])?

RuntimeName

The name or ARN of the runtime to restore. When RuntimeVersion or RuntimeAlias is specified, the runtime that owns the runtime version or runtime alias to restore.

Length Constraints: Minimum length of 2. Maximum length of 2048.

Pattern: (arn:(aws[a-zA-Z-]*):lambda:(eusc-)?[a-z]{2}((-gov)|(-iso([a-z]?)))?-[a-z]+-\d{1}:\d{12}:runtime/)?[a-z0-9]([a-z0-9_.-]{0,126})?[a-z0-9]

Required: Yes

RuntimeVersion

Optional. Restores the named RuntimeVersion under RuntimeName. Mutually exclusive with RuntimeAlias; supplying both is rejected with InvalidParameterValueException.

Length Constraints: Minimum length of 1. Maximum length of 128.

Pattern: [A-Za-z0-9_]([A-Za-z0-9_.-]{0,126}[A-Za-z0-9_])?

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200 Content-type: application/json { "Arn": "string", "LastModified": "string", "RuntimeAlias": "string", "RuntimeName": "string", "RuntimeVersion": "string", "State": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

Arn

The fully qualified ARN of the resource that was restored (runtime, version, or alias).

Type: String

Length Constraints: Minimum length of 48. Maximum length of 2048.

Pattern: arn:(aws[a-zA-Z-]*):lambda:(eusc-)?[a-z]{2}((-gov)|(-iso([a-z]?)))?-[a-z]+-\d{1}:\d{12}:runtime/[a-z0-9]([a-z0-9_.-]{0,126})?[a-z0-9](/(version|alias)/[^/]{1,128})?

LastModified

The date and time when the restored resource was last modified.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

RuntimeAlias

Echoed back only when the request supplied a RuntimeAlias qualifier.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 128.

Pattern: [A-Za-z0-9_]([A-Za-z0-9_.-]{0,126}[A-Za-z0-9_])?

RuntimeName

The name or ARN of the runtime.

Type: String

Length Constraints: Minimum length of 2. Maximum length of 2048.

Pattern: (arn:(aws[a-zA-Z-]*):lambda:(eusc-)?[a-z]{2}((-gov)|(-iso([a-z]?)))?-[a-z]+-\d{1}:\d{12}:runtime/)?[a-z0-9]([a-z0-9_.-]{0,126})?[a-z0-9]

RuntimeVersion

Echoed back only when the request supplied a RuntimeVersion qualifier.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 128.

Pattern: [A-Za-z0-9_]([A-Za-z0-9_.-]{0,126}[A-Za-z0-9_])?

State

The state of the restored resource, ACTIVE on success.

Type: String

Valid Values: ACTIVE | PENDING_DELETION | DELETING | FAILED

Errors

For information about the errors that are common to all actions, see Common Error Types.

InvalidParameterValueException

One of the parameters in the request is not valid. Check the error message for details about which parameter failed validation.

message

The error message that describes the exception.

Type

The exception type.

HTTP Status Code: 400

ResourceConflictException

The request could not be completed due to a conflict with the current state of the resource. For example, attempting to modify a resource that is not in a state that permits the operation.

message

The error message that describes the exception.

Type

The exception type.

HTTP Status Code: 409

ResourceNotFoundException

The specified resource does not exist. Verify the identifier and Region.

Message

The error message that describes the exception.

Type

The exception type.

HTTP Status Code: 404

ServiceException

An internal service error occurred. Retry the request with exponential backoff.

Message

The error message that describes the exception.

Type

The exception type.

HTTP Status Code: 500

TooManyRequestsException

The request was throttled due to exceeding the allowed request rate. Retry the request after a brief wait using exponential backoff.

message

The error message that describes the exception.

Reason

The reason for the throttling.

retryAfterSeconds

The number of seconds to wait before retrying the request.

Type

The exception type.

HTTP Status Code: 429

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: