This is the implementation of a typical web app backend where the MongoDB Atlas is leveraged to store data.
Overview of My Submission
The SAM app uses MongoDB Atlas for database choice which contains two collections - shield_agents
and shield_locations
. This stores the S.H.I.E.L.D info such as the database of all agents and non classified locations. The operation of INSERT
and GET
is integrated with MongoDB Atlas Data APIs where the API credentials are created and passed into AWS Lambda fns as environment variables with CloudFormation Parameters. The APIs from SAM app are exposed with AWS API Gateway. Also have the Search enabled with indexes.
Submission Category:
Choose Your Own Adventure, the first time I'm using MongoDB and Data APIs so went a step to adapt it into my usual tech-stack (AWS Serverless) with a AWS SAM application.
Link to Code
shield-database
This is a repository which uses MongoDB Atlas Data APIs for CRUD operations with AWS SAM application.
Deployment commands
Create a new directory, navigate to that directory in a terminal and clone the GitHub repository
git clone https://github.com/zachjonesnoel/shield-database
Change directory to the pattern directory:
cd shield
From the command line, use AWS SAM to deploy the AWS resources for the pattern as specified in the template.yml file:
sam build
sam deploy --guided
Recouces
Screenshots
Creating an agent with insertOne
API
Getting one of the created agent with findOne
API
Creating a location with insertOne
API
Getting one of the created location with findOne
API
MongoDB Atlas Search helps in creating an index
for a collection and using the index to query and check if the filter pattern matches any record. The matching records also return a match score.
MongoDB Atlas Charts can help you visualize data.
No of locations -
Agents with security clearance level-
Top comments (1)
Is there a public link to the node layer or any comments on how to replicate please?