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.
This is the first post in a 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.
First, we package the Qumulo API for upload to AWS Lambda:
- mkdir python
- cd python
- pip install qumulo-api –target .
- chmod +x . -R
- zip -r9 ../python.zip .
- cd ..
We create a named layer from this package:
7. aws lambda publish-layer-version –layer-name qumulo-api –description “Qumulo API” –content ./python.zip –compatible-runtimes python2.7
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.
In the coming weeks, we’ll post two recipes to get started to get started with the Qumulo API in AWS Lambda.
First, we’ll integrate with AWS Secrets Manger, a microservice to store and manage credentials. We’ll provide sample code and directions to set up scheduled admin password rotation for a Qumulo cluster in AWS.
With credentials stored in Secrets Manger, 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.
Nick Carter is a member of Qumulo’s Technical Staff.