Cómo usar funciones Lambda con Qumulo (Parte 1)

Esta es la primera publicación de una serie de dos partes sobre cómo comenzar a usar las funciones de Lambda con Qumulo.

En esta publicación, recorreremos una capa de Lambda de la API de Qumulo. Esta capa se puede usar en futuros proyectos de Lambda. Esta publicación asume que pip y AWS CLI están instalados y configurados.

API de Qumulo abre posibilidades para que tu sistema de archivos funcione para ti. En la nube pública, los microservicios facilitan el aprovechamiento de la API de Qumulo para integrarse con otras herramientas. Estos servicios son rápidos de implementar y fáciles de administrar.

Uso de funciones Lambda con Qumulo

Primero, empaquetamos la API de Qumulo para subir a AWS Lambda:

  1. mkdir python
  2. cd python
  3. pip install qumulo-api –target.
  4. chmod + x. -R
  5. zip -r9 ../python.zip.
  6. discos compactos ..
  7. Creamos una capa con nombre de este paquete: 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.

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!

Share this post