Stack Name - AWS Lambda MongoDB

Synopsis

The is the base reusable implementation for AWS Lambda type tech stacks using MongoDB. 

The stack includes:

  • MongoDB:
    • A general purpose, document-based, distributed database built for modern application developers and for the cloud era
  • Morphia:
    • An Object to Document mapping framework to simplify persisting Plain Old Java Objects
  •  

Details

Authordev@harbormaster.ai
AccessPublic
Derived From.java.tech.stack
.lambda.tech.stack
.mongodb.tech.stack
Long NameAWS Lambda MongoDB
Short NameLambdaNoSQL
Language(s)Java 8+, NodeJS, YAML, XML, Velocity Macros
Git Urlhttps://github.com/Harbormaster-AI/techstacks/tree/main/AWS%20Lambda%20MongoDB
Example Project YAMLhttps://github.com/Harbormaster-AI/cli/blob/main/samples/yamls/project.as.code/aws-lambda-mongo-project-as-code.yml

Contents

Along with what is supported by the parent  tech stacks (.java.tech.stack, and .lambda.tech.stack) the following are overridden and additional capabilities:

  • Build:
    • Overloaded CI vendor specific macros to apply specifics for this tech stack, such as MongoDB settings, etc..
  • Persistence/DAO:
    • Data access layer used by a Lambda function in order to read/write to MongoDB.

Important AWS Considerations

Using Terraform

If Harbormaster is enabled to generate Terraform file(s) for AWS, it will create a secure EC2 instance with a running MongoDB database instance.  Each lambda function will have an environment variable assigned called mongoDbServerAddresses.  Its value is the URL(s) to the MongoDB instance(s) to be used by each lambda function for reading and writing.

Authentication

For any CI platform, be sure to assign environment variables USERAWSACCESSKEY and USERAWSSECRETKEY to their respective values as assigned by AWS.  Refer to the CI platform on how to assign environment variables.

Stack Options

See .lambda.tech.stack options

Usage

See .lambda.tech.stack usage