Returns a list of versions, with the version-specific configuration of each. Lambda returns up to 50 versions per call.
GET /2015-03-31/functions/FunctionName/versions?Marker=Marker&MaxItems=MaxItems HTTP/1.1
The request uses the following URI parameters.
** FunctionName ** The name of the Lambda function.
Name formats
- Function name -
MyFunction
. - Function ARN -
arn:aws:lambda:us-west-2:123456789012:function:MyFunction
. - Partial ARN -
123456789012:function:MyFunction
. The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.
Length Constraints: Minimum length of 1. Maximum length of 170.
Pattern:(arn:(aws[a-zA-Z-]*)?:lambda:)?([a-z]{2}(-gov)?-[a-z]+-\d{1}:)?(\d{12}:)?(function:)?([a-zA-Z0-9-_\.]+)(:(\$LATEST|[a-zA-Z0-9-_]+))?
Required: Yes
** Marker ** Specify the pagination token that's returned by a previous request to retrieve the next page of results.
** MaxItems **
The maximum number of versions to return.
Valid Range: Minimum value of 1. Maximum value of 10000.
The request does not have a request body.
HTTP/1.1 200
Content-type: application/json
{
"[NextMarker](#SSS-ListVersionsByFunction-response-NextMarker)": "string",
"[Versions](#SSS-ListVersionsByFunction-response-Versions)": [
{
"[CodeSha256](API_FunctionConfiguration.md#SSS-Type-FunctionConfiguration-CodeSha256)": "string",
"[CodeSize](API_FunctionConfiguration.md#SSS-Type-FunctionConfiguration-CodeSize)": number,
"[DeadLetterConfig](API_FunctionConfiguration.md#SSS-Type-FunctionConfiguration-DeadLetterConfig)": {
"[TargetArn](API_DeadLetterConfig.md#SSS-Type-DeadLetterConfig-TargetArn)": "string"
},
"[Description](API_FunctionConfiguration.md#SSS-Type-FunctionConfiguration-Description)": "string",
"[Environment](API_FunctionConfiguration.md#SSS-Type-FunctionConfiguration-Environment)": {
"[Error](API_EnvironmentResponse.md#SSS-Type-EnvironmentResponse-Error)": {
"[ErrorCode](API_EnvironmentError.md#SSS-Type-EnvironmentError-ErrorCode)": "string",
"[Message](API_EnvironmentError.md#SSS-Type-EnvironmentError-Message)": "string"
},
"[Variables](API_EnvironmentResponse.md#SSS-Type-EnvironmentResponse-Variables)": {
"string" : "string"
}
},
"[FileSystemConfigs](API_FunctionConfiguration.md#SSS-Type-FunctionConfiguration-FileSystemConfigs)": [
{
"[Arn](API_FileSystemConfig.md#SSS-Type-FileSystemConfig-Arn)": "string",
"[LocalMountPath](API_FileSystemConfig.md#SSS-Type-FileSystemConfig-LocalMountPath)": "string"
}
],
"[FunctionArn](API_FunctionConfiguration.md#SSS-Type-FunctionConfiguration-FunctionArn)": "string",
"[FunctionName](API_FunctionConfiguration.md#SSS-Type-FunctionConfiguration-FunctionName)": "string",
"[Handler](API_FunctionConfiguration.md#SSS-Type-FunctionConfiguration-Handler)": "string",
"[KMSKeyArn](API_FunctionConfiguration.md#SSS-Type-FunctionConfiguration-KMSKeyArn)": "string",
"[LastModified](API_FunctionConfiguration.md#SSS-Type-FunctionConfiguration-LastModified)": "string",
"[LastUpdateStatus](API_FunctionConfiguration.md#SSS-Type-FunctionConfiguration-LastUpdateStatus)": "string",
"[LastUpdateStatusReason](API_FunctionConfiguration.md#SSS-Type-FunctionConfiguration-LastUpdateStatusReason)": "string",
"[LastUpdateStatusReasonCode](API_FunctionConfiguration.md#SSS-Type-FunctionConfiguration-LastUpdateStatusReasonCode)": "string",
"[Layers](API_FunctionConfiguration.md#SSS-Type-FunctionConfiguration-Layers)": [
{
"[Arn](API_Layer.md#SSS-Type-Layer-Arn)": "string",
"[CodeSize](API_Layer.md#SSS-Type-Layer-CodeSize)": number
}
],
"[MasterArn](API_FunctionConfiguration.md#SSS-Type-FunctionConfiguration-MasterArn)": "string",
"[MemorySize](API_FunctionConfiguration.md#SSS-Type-FunctionConfiguration-MemorySize)": number,
"[RevisionId](API_FunctionConfiguration.md#SSS-Type-FunctionConfiguration-RevisionId)": "string",
"[Role](API_FunctionConfiguration.md#SSS-Type-FunctionConfiguration-Role)": "string",
"[Runtime](API_FunctionConfiguration.md#SSS-Type-FunctionConfiguration-Runtime)": "string",
"[State](API_FunctionConfiguration.md#SSS-Type-FunctionConfiguration-State)": "string",
"[StateReason](API_FunctionConfiguration.md#SSS-Type-FunctionConfiguration-StateReason)": "string",
"[StateReasonCode](API_FunctionConfiguration.md#SSS-Type-FunctionConfiguration-StateReasonCode)": "string",
"[Timeout](API_FunctionConfiguration.md#SSS-Type-FunctionConfiguration-Timeout)": number,
"[TracingConfig](API_FunctionConfiguration.md#SSS-Type-FunctionConfiguration-TracingConfig)": {
"[Mode](API_TracingConfigResponse.md#SSS-Type-TracingConfigResponse-Mode)": "string"
},
"[Version](API_FunctionConfiguration.md#SSS-Type-FunctionConfiguration-Version)": "string",
"[VpcConfig](API_FunctionConfiguration.md#SSS-Type-FunctionConfiguration-VpcConfig)": {
"[SecurityGroupIds](API_VpcConfigResponse.md#SSS-Type-VpcConfigResponse-SecurityGroupIds)": [ "string" ],
"[SubnetIds](API_VpcConfigResponse.md#SSS-Type-VpcConfigResponse-SubnetIds)": [ "string" ],
"[VpcId](API_VpcConfigResponse.md#SSS-Type-VpcConfigResponse-VpcId)": "string"
}
}
]
}
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
** NextMarker **
The pagination token that's included if more results are available.
Type: String
** Versions **
A list of Lambda function versions.
Type: Array of FunctionConfiguration objects
InvalidParameterValueException
One of the parameters in the request is invalid.
HTTP Status Code: 400
ResourceNotFoundException
The resource specified in the request does not exist.
HTTP Status Code: 404
ServiceException
The AWS Lambda service encountered an internal error.
HTTP Status Code: 500
TooManyRequestsException
The request throughput limit was exceeded.
HTTP Status Code: 429
For more information about using this API in one of the language-specific AWS SDKs, see the following: