Skip to content

Architecture

This solution has three components:

architecture

API Tier

  • Amazon API Gateway is the initial entrypoint into the vault. API Gateway supports both private configurations accessible only from within a VPC, or public access by integrating with an authentication solution such as Amazon Cognito (Note: this use case is not supported by this sample).
  • AWS Lambda function written in Python and uses the Powertools for AWS Lambda library to serve the API endpoints. The Lambda function uses Amazon DynamoDB for persistance of metadata and an audit log of vault operations.
  • Amazon DynamoDB table to persist the vault metadata (public key, encrypted secret key, encrypted attributes) and audit log.

Decryption Tier

EC2 Instance

Enclave Tier

Runs within a Nitro Enclave on an EC2 instance.

  • kmstool-enclave-cli is used to decrypt the secret key using AWS KMS with the IAM credentials included in the request.
  • Enclave Application written in Rust that decrypts the secret key in the request, then decrypts each encrypted attribute that was provided in the request. Attributes can be transformed using the Common Expression Language (CEL).