{"id":25228217,"url":"https://github.com/umaxcode/sam-springboot-lambda-with-dynamodb","last_synced_at":"2025-04-05T13:41:09.384Z","repository":{"id":269604531,"uuid":"907379361","full_name":"UmaxCode/sam-springboot-lambda-with-dynamodb","owner":"UmaxCode","description":"A spring boot crud project deployed on AWS lambda with DynamoDB integration using SAM","archived":false,"fork":false,"pushed_at":"2025-01-10T08:55:50.000Z","size":28,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-11T09:54:05.458Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/UmaxCode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-12-23T12:57:12.000Z","updated_at":"2024-12-30T16:24:42.000Z","dependencies_parsed_at":"2025-02-11T09:51:59.560Z","dependency_job_id":"5501b923-62e9-4587-b2ea-b552a959d328","html_url":"https://github.com/UmaxCode/sam-springboot-lambda-with-dynamodb","commit_stats":null,"previous_names":["umaxcode/sam-springboot-lambda-with-dynamodb"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UmaxCode%2Fsam-springboot-lambda-with-dynamodb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UmaxCode%2Fsam-springboot-lambda-with-dynamodb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UmaxCode%2Fsam-springboot-lambda-with-dynamodb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UmaxCode%2Fsam-springboot-lambda-with-dynamodb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/UmaxCode","download_url":"https://codeload.github.com/UmaxCode/sam-springboot-lambda-with-dynamodb/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247345587,"owners_count":20924097,"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":[],"created_at":"2025-02-11T09:51:54.413Z","updated_at":"2025-04-05T13:41:09.320Z","avatar_url":"https://github.com/UmaxCode.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# springboot-crud-with-lambda serverless API\nThe springboot-crud-with-lambda project, created with [`aws-serverless-java-container`](https://github.com/aws/serverless-java-container).\n\nThe starter project defines a simple `/ping` resource that can accept `GET` requests with its tests.\n\nThe project folder also includes a `template.yml` file. You can use this [SAM](https://github.com/awslabs/serverless-application-model) file to deploy the project to AWS Lambda and Amazon API Gateway or test in local with the [SAM CLI](https://github.com/awslabs/aws-sam-cli). \n\n## Pre-requisites\n* [AWS CLI](https://aws.amazon.com/cli/)\n* [SAM CLI](https://github.com/awslabs/aws-sam-cli)\n* [Gradle](https://gradle.org/) or [Maven](https://maven.apache.org/)\n\n## Building the project\nYou can use the SAM CLI to quickly build the project\n```bash\n$ mvn archetype:generate -DartifactId=springboot-crud-with-lambda -DarchetypeGroupId=com.amazonaws.serverless.archetypes -DarchetypeArtifactId=aws-serverless-jersey-archetype -DarchetypeVersion=2.1.0 -DgroupId=org.umaxcode -Dversion=1.0-SNAPSHOT -Dinteractive=false\n$ cd springboot-crud-with-lambda\n$ sam build\nBuilding resource 'SpringbootCrudWithLambdaFunction'\nRunning JavaGradleWorkflow:GradleBuild\nRunning JavaGradleWorkflow:CopyArtifacts\n\nBuild Succeeded\n\nBuilt Artifacts  : .aws-sam/build\nBuilt Template   : .aws-sam/build/template.yaml\n\nCommands you can use next\n=========================\n[*] Invoke Function: sam local invoke\n[*] Deploy: sam deploy --guided\n```\n\n## Testing locally with the SAM CLI\n\nFrom the project root folder - where the `template.yml` file is located - start the API with the SAM CLI.\n\n```bash\n$ sam local start-api\n\n...\nMounting com.amazonaws.serverless.archetypes.StreamLambdaHandler::handleRequest (java11) at http://127.0.0.1:3000/{proxy+} [OPTIONS GET HEAD POST PUT DELETE PATCH]\n...\n```\n\nUsing a new shell, you can send a test ping request to your API:\n\n```bash\n$ curl -s http://127.0.0.1:3000/ping | python -m json.tool\n\n{\n    \"pong\": \"Hello, World!\"\n}\n``` \n\n## Deploying to AWS\nTo deploy the application in your AWS account, you can use the SAM CLI's guided deployment process and follow the instructions on the screen\n\n```\n$ sam deploy --guided\n```\n\nOnce the deployment is completed, the SAM CLI will print out the stack's outputs, including the new application URL. You can use `curl` or a web browser to make a call to the URL\n\n```\n...\n-------------------------------------------------------------------------------------------------------------\nOutputKey-Description                        OutputValue\n-------------------------------------------------------------------------------------------------------------\nSpringbootCrudWithLambdaApi - URL for application            https://xxxxxxxxxx.execute-api.us-west-2.amazonaws.com/Prod/pets\n-------------------------------------------------------------------------------------------------------------\n```\n\nCopy the `OutputValue` into a browser or use curl to test your first request:\n\n```bash\n$ curl -s https://xxxxxxx.execute-api.us-west-2.amazonaws.com/Prod/ping | python -m json.tool\n\n{\n    \"pong\": \"Hello, World!\"\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fumaxcode%2Fsam-springboot-lambda-with-dynamodb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fumaxcode%2Fsam-springboot-lambda-with-dynamodb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fumaxcode%2Fsam-springboot-lambda-with-dynamodb/lists"}