List all S3 buckets from an AWS Lambda function using aws-sdk You can require 'aws-sdk' and use the AWS package. You have to adjust the permissions of the function to read the buckets in this function.