{"id":19399026,"url":"https://github.com/poboisvert/serverlessaws","last_synced_at":"2025-08-11T17:34:38.230Z","repository":{"id":180325306,"uuid":"453577927","full_name":"poboisvert/ServerlessAWS","owner":"poboisvert","description":"[Python/API] A boilerplate to deploy API (dev, Staging and prod) on a AWS SAM (Serverless) service","archived":false,"fork":false,"pushed_at":"2022-02-01T12:49:31.000Z","size":6,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-07T11:25:05.151Z","etag":null,"topics":["api","aws","fastapi","serverless"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/poboisvert.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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":"2022-01-30T03:25:03.000Z","updated_at":"2022-10-23T23:40:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"b4a400f4-5bb6-4dd1-a61c-d44852cd7033","html_url":"https://github.com/poboisvert/ServerlessAWS","commit_stats":null,"previous_names":["poboisvert/serverlessaws"],"tags_count":0,"template":false,"template_full_name":"eliasbrange/aws-sam-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poboisvert%2FServerlessAWS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poboisvert%2FServerlessAWS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poboisvert%2FServerlessAWS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poboisvert%2FServerlessAWS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/poboisvert","download_url":"https://codeload.github.com/poboisvert/ServerlessAWS/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240572165,"owners_count":19822606,"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":["api","aws","fastapi","serverless"],"created_at":"2024-11-10T11:07:58.139Z","updated_at":"2025-02-24T23:23:30.104Z","avatar_url":"https://github.com/poboisvert.png","language":"Python","readme":"# AWS SAM Template\n\nA simple template to deploy an AWS SAM application in three different environments using GitHub Actions.\nThe template deploys a single AWS Lambda function that returns a random quote from https://api.quotable.io when invoked.\n\n## Setup\n### 1. Use this repository as a template\n\n### 2. Create GitHub environments\n\n- development\n- stage\n- production\n\n### 3. Install AWS SAM CLI\n\n```shell script\n$ pip3 install aws-sam-cli\n```\n\n### 4. Bootstrap infrastructure\nUse [SAM CLI to bootstrap](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-cli-command-reference-sam-pipeline-bootstrap.html) required infrastructure resources. \nIt would be preferable to bootstrap the different environments in different AWS accounts, \nbut for testing purposes they can all be bootstrapped into the same account.\n\n```shell script\n$ sam pipeline bootstrap --stage dev\n...\nThe following resources were created in your account:\n\t- Pipeline IAM user\n\t- Pipeline execution role\n\t- CloudFormation execution role\n\t- Artifact bucket\nPipeline IAM user credential:\n\tAWS_ACCESS_KEY_ID: XXXX\n\tAWS_SECRET_ACCESS_KEY: XXXX\n\n$ sam pipeline bootstrap --stage stage\n...\n\n$ sam pipeline bootstrap --stage prod\n...\n```\n### 5. Add secrets to GitHub environments\n\nFor each environment, add the following secrets:\n\n- **AWS_ACCESS_KEY_ID**: From the credentials shown in the bootstrap output.\n- **AWS_SECRET_ACCESS_KEY**: From the credentials shown in the bootstrap output.\n- **SAM_BUCKET**: The artifact bucket created for each environment by the bootstrap script.\n- **PIPELINE ROLE**: The pipeline execution role created for each environment by the bootstrap script.\n- **DEPLOY_ROLE**: The CloudFormation execution role for each environment by the bootstrap script.\n\n\u003e If the bootstraps from step #4 were performed in the same account, only one IAM user will have been created.\n\u003e In that case, use the same credentials in all environments.\n\n## Deploy\n\nDeployment to the different environments is handled by two different GitHub Actions workflows.\n\n### 1. Deploy to development\n\nDeployment to development is made by the *DevDeploy* workflow, which can be manually triggered.\n\n### 2. Deploy to stage \u0026 production\n\nDeployment to stage and production is made by the *StageProdDeploy* workflow, which is triggered whenever a GitHub release is published.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpoboisvert%2Fserverlessaws","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpoboisvert%2Fserverlessaws","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpoboisvert%2Fserverlessaws/lists"}