Skip to content
This repository has been archived by the owner on Dec 18, 2024. It is now read-only.

Latest commit

 

History

History
12 lines (8 loc) · 730 Bytes

README.md

File metadata and controls

12 lines (8 loc) · 730 Bytes

Rotate HashiCorp Vault Token with AWS Lambda using Python

A simple example written in Python 3 that uses AWS Lambda to perform a task.

Goal: Rotate a Rubrik API token into HashiCorp Vault so that downstream tools can use the token for automated tasks.

  1. Store environmental variables stored in the Lambda function using os.environ calls.
  2. Grab a new Rubrik API token.
  3. Store the new Rubrik API token in Vault.
  4. Repeat every 24 hours by using a CloudWatch event.

Note: The requests module is no longer a part of the boto3 module set that is native to AWS Lambda. You'll need to use a layer. Either add the module yourself to your own layer or use someone else's layer.