Canonical: https://weaveos.com/reference/aws-lambda/list-function-versions

1. [Software capabilities](https://weaveos.com/reference)
2. /[AWS Lambda](https://weaveos.com/reference/aws-lambda)
3. /List versions of an AWS Lambda function

[![](https://weaveos.com/reference/logos/aws-lambda.svg)AWS Lambda](https://weaveos.com/reference/aws-lambda)

# List versions of an AWS Lambda function

Use the AWS CLI to inspect the versions of a function from your terminal. The Go SDK’s paginator lets a script process each page of version configurations.

Documentation reviewed November 27, 2026 · 2 methods with sources

## Ways to do it

1. [1CLI: aws lambda list-versions-by-function](https://weaveos.com/reference/aws-lambda/list-function-versions#method-1)
2. [2SDK: lambda.NewListVersionsByFunctionPaginator](https://weaveos.com/reference/aws-lambda/list-function-versions#method-2)

CLI

### aws lambda list-versions-by-function

Pass the function name or ARN to retrieve version numbers and their associated configuration.

[Read source: AWS CLI list-versions-by-function](https://docs.aws.amazon.com/cli/latest/reference/lambda/list-versions-by-function.html)

- Requirements

  AWS CLI credentials with lambda:ListVersionsByFunction and the function’s name or ARN and Region.

- Limitations

  With --no-paginate, the CLI makes only one service call. Lambda returns up to 50 versions per call.

Example shell

Copy

```
aws lambda list-versions-by-function --function-name "$FUNCTION_NAME" --query 'Versions[].Version'
```

SDK

### lambda.NewListVersionsByFunctionPaginator

Initialize the paginator with ListVersionsByFunctionInput and call NextPage while HasMorePages reports more results.

[Read source: AWS SDK for Go v2 ListVersionsByFunction](https://github.com/aws/aws-sdk-go-v2/blob/fab6ce7049daa93f9ace2bb14039f41c8a00504a/service/lambda/api_op_ListVersionsByFunction.go)

- Requirements

  An AWS SDK for Go v2 Lambda client with regional credentials, lambda:ListVersionsByFunction permission, and FunctionName set.

- Limitations

  A single ListVersionsByFunction call returns up to 50 items even when you request a larger MaxItems value.

## More from AWS Lambda

[View all 1 AWS Lambda tasks](https://weaveos.com/reference/aws-lambda)

## The same task in other apps

- [![](https://weaveos.com/reference/logos/azure-blob-storage.svg)Azure Blob Storage](https://weaveos.com/reference/azure-blob-storage)

  ### [How to list Azure Blob Storage versions](https://weaveos.com/reference/azure-blob-storage/list-blob-versions)

  Use List Blobs with include=versions for a programmatic inventory, or use az storage blob list --include v for a terminal inspection.

  API, CLI

- [![](https://weaveos.com/reference/logos/amazon-s3.svg)Amazon S3](https://weaveos.com/reference/amazon-s3)

  ### [List Amazon S3 object versions and delete markers](https://weaveos.com/reference/amazon-s3/list-object-versions)

  Use ListObjectVersions when a bucket has versioning and an operator needs historical object versions or delete markers. Follow both key and version markers when the response is truncated.

  API, CLI
