Search
Close this search box.

Azure Native Qumulo Now available in the EU, UK, and Canada – Learn More

How to Use Lambda Functions with Qumulo (Part 1)

Authored by:
Here's how to use Lambda functions to package up python bindings for the Qumulo API, and upload them to AWS Lambda as a layer.

This is the first post in a 2-part series about how to start using Lambda functions with Qumulo.

In this post, we will walk through a Lambda layer of the Qumulo API. This layer can then be used in future Lambda projects. This post assumes that pip and the AWS CLI are installed and configured.

Qumulo’s API opens up possibilities for making your file system work for you. In the public cloud, microservices make it easy to take advantage of the Qumulo API to integrate with other tools. These services are quick to deploy and easy to manage.

Using Lambda Functions with Qumulo

First, we package the Qumulo API for upload to AWS Lambda:

  1. mkdir python
  2. cd python
  3. pip install qumulo-api –target .
  4. chmod +x . -R
  5. zip -r9 ../python.zip .
  6. cd ..
  7. We create a named layer from this package: aws lambda publish-layer-version --layer-name qumulo-api --description "Qumulo API" --content ./python.zip --compatible-runtimes python2.7</var/www/wordpress>

Using this layer, you can write Lambda functions that make use of the Qumulo API as easily as a local script: simply `Import Qumulo` at the top of your function that includes the layer. Take a look at our API samples for some ideas about how the Qumulo API can be used.

Now that we packaged up python bindings for the Qumulo API and uploaded them to AWS Lambda as a layer, let’s use this layer! To get started with the Qumulo API in AWS Lambda, in part 2, we make a Lambda function to rotate the admin password of the cluster. We’ll integrate with AWS Secrets Manager, a microservice to store and manage credentials, and then provide sample code and directions to set up scheduled admin password rotation for a Qumulo cluster in AWS.

With credentials stored in Secrets Manager, a Lambda function can securely authenticate with Qumulo and perform any file system or management operation. In a subsequent post, we build on this with sample code and instructions to write a Lambda function that listens to changes to an S3 bucket and performs Qumulo file system operations as a result. Stay tuned!

Related Posts

Scroll to Top