{"id":14956560,"url":"https://github.com/mongodb/cookiecutter-aws-sam-python-mongodb-atlas","last_synced_at":"2025-11-11T21:01:59.265Z","repository":{"id":66021565,"uuid":"347996749","full_name":"mongodb/cookiecutter-aws-sam-python-mongodb-atlas","owner":"mongodb","description":"A Cookiecutter template to create a Serverless App based on Serverless Application Model (SAM) and Python 3.6 for MongoDB Atlas","archived":false,"fork":false,"pushed_at":"2023-04-10T12:51:15.000Z","size":51,"stargazers_count":5,"open_issues_count":0,"forks_count":4,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-01-29T09:43:37.275Z","etag":null,"topics":["atlas","aws","cfn","cloudformation","databases","mongo","mongodb","sam-cli","serverless"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit-0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mongodb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-15T14:14:36.000Z","updated_at":"2023-07-25T14:44:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"3682938d-e616-4470-9e98-fd098b21e83b","html_url":"https://github.com/mongodb/cookiecutter-aws-sam-python-mongodb-atlas","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongodb%2Fcookiecutter-aws-sam-python-mongodb-atlas","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongodb%2Fcookiecutter-aws-sam-python-mongodb-atlas/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongodb%2Fcookiecutter-aws-sam-python-mongodb-atlas/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongodb%2Fcookiecutter-aws-sam-python-mongodb-atlas/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mongodb","download_url":"https://codeload.github.com/mongodb/cookiecutter-aws-sam-python-mongodb-atlas/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237088419,"owners_count":19253565,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["atlas","aws","cfn","cloudformation","databases","mongo","mongodb","sam-cli","serverless"],"created_at":"2024-09-24T13:13:08.516Z","updated_at":"2025-10-19T07:31:05.182Z","avatar_url":"https://github.com/mongodb.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cookiecutter SAM for MongoDB Atlas with Python Lambda functions\n\n:warning: **THIS is ALPHA SOFTWARE in active DEVELOPMENT use at own risk and not in production, yet.** :warning:\n\nThis is a [Cookiecutter](https://github.com/audreyr/cookiecutter) template to create a Serverless App based on Serverless Application Model (SAM) and Python 3.8 which uses MongoDB Atlas.\n\nIt is important to note that you should not try to `git clone` this project but use `SAM` CLI instead as ``{{cookiecutter.project_slug}}`` will be rendered based on your input and therefore all variables and files will be rendered properly.\n\n## tldr\n\n```bash\ncurl https://raw.githubusercontent.com/mongodb-developer/get-started-aws-cfn/main/get-setup.sh | bash -s us-east-2\nsam init --location gh:mongodb/cookiecutter-mongodb-atlas-aws-sam-python\n# cd to your project\n```\n\n```bash\nsam build --use-container\nsam deploy --extra-parameters $(./export-mongocli-parameters.sh)\n# sam deploy --guided     # Have you apikey ready\n```\n\n## Pre-requisite\n\nThe project will deploy the MongoDB Atlas AWS Quick Start which provisions complete MongoDB Atlas deployments through CloudFormation using official MongoDB Atlas AWS CloudFormation Resource Types.\n\nUntil these resources a more easily available you can use the [get-started-aws-cfn](https://github.com/mongodb-developer/get-started-aws-cfn) project to bootstrap each AWS region with the Atlas CFN Resource Types:\n\n```bash\ncurl https://raw.githubusercontent.com/mongodb-developer/get-started-aws-cfn/main/get-setup.sh | bash -s us-west-2\n```\n\nThe above command will deploy and seutp the MongoDB Atlas CFN resources into the `us-west-2` region. \nFor advanced use, including sample AWS IAM policy suitable for `aws sts assume-role`, see: the [aws-iam-permissions](https://github.com/mongodb-developer/get-started-aws-cfn#aws-iam-permissions) note in the Get-Started project.\n\n## Usage\n\nGenerate a new SAM based Serverless App: `sam init --location gh:mongodb/cookiecutter-mongodb-atlas-aws-sam-python`\n\nYou'll be prompted a few questions to help this cookiecutter template to scaffold this project and after its completed you should see a new folder at your current path with the name of the project you gave as input.\n\n* Create an organizational-level [MongoDB Atlas Programmatic API](https://docs.atlas.mongodb.com/configure-api-access#programmatic-api-keys). The key needs `Project Creator` permissions.\n\n* The aws and sam cli's setup and configured on your development machine. \n\n* We also recommend [mongocli](https://github.com/mongodb/mongocli) for the easiest way to manage all your MongoDB Atlas needs, cluster and apikeys included!\n\nYou can then deploy your SAM app directly using your mongocli configuration - this will create the sam app, stack-name, and Atlas Project all with \u003cAPP_NAME\u003e:\n\n```bash\nOVERRIDES=$(curl https://raw.githubusercontent.com/monogdb-developer/get-started-aws-cfn/main/export-mongocli-config.py | bash -s --  default parameter-override \u003cAPP_NAME\u003e)\nsam deploy --guided --parameter-overrides ${OVERRIDES} --stack-name \u003cAPP_NAME\u003e\n```\n## Options\n\nOption | Description\n------------------------------------------------- | ---------------------------------------------------------------------------------\n`include_safe_deployment` | Sends by default 10% of traffic for every 1 minute to a newly deployed function using [CodeDeploy + SAM integration](https://github.com/awslabs/serverless-application-model/blob/master/docs/safe_lambda_deployments.rst) - Linear10PercentEvery1Minute\n\n## Deployment Parameters\n\nTo deploy your serverless app you will need to supply the following:\n\nParameter  | Required | Description | Default\n-----------| - | --------------------------------- | ------------------------------\nPublicKey  | Y | Your MongoDB Cloud Public API Key | \nPrivateKey | Y | Your MongoDB Cloud Private API Key |\nOrgId      | Y | Your MongoDB Cloud Organization Id | \nProjectName | N | The name of the project.\" | `get-started-aws-lambda-python`\nClusterName | N | Name of the cluster as it appears in Atlas. Once the cluster is created, its name cannot be changed. | `Cluster-1`\nClusterInstanceSize | N | Atlas Cluster Tier | `M10` \nClusterRegion | N | The AWS Region where the Atlas DB Cluster will run. (AWS Region format) | `us-east-1`\nClusterMongoDBMajorVersion | N The version of MongoDB | `latest`\n\n# Credits\n\n* This project was copied and started from [coookiecutter-aws-sam-python](https://github.com/aws-samples/cookiecutter-aws-sam-python) project.\n\n* This project has been generated with [Cookiecutter](https://github.com/audreyr/cookiecutter)\n\n* [Bruno Alla's Lambda function template](https://github.com/browniebroke/cookiecutter-lambda-function)\n\nLicense\n-------\n\nThis project is licensed under the terms of the [MIT License with no attribution](/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmongodb%2Fcookiecutter-aws-sam-python-mongodb-atlas","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmongodb%2Fcookiecutter-aws-sam-python-mongodb-atlas","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmongodb%2Fcookiecutter-aws-sam-python-mongodb-atlas/lists"}