{"id":37088351,"url":"https://github.com/raahii/serverless-app-local","last_synced_at":"2026-01-14T10:51:31.745Z","repository":{"id":140033068,"uuid":"191733312","full_name":"raahii/serverless-app-local","owner":"raahii","description":"An example for serverless application development on local machine  (AWS Lambda, DynamoDB)","archived":false,"fork":false,"pushed_at":"2019-06-13T10:08:40.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2023-03-11T18:42:39.776Z","etag":null,"topics":["api","aws","aws-dynamodb","aws-lambda","golang","serverless","serverless-applications","serverless-architectures","serverless-examples","serverless-functions","serverless-offline"],"latest_commit_sha":null,"homepage":"","language":"Go","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/raahii.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":"2019-06-13T09:32:39.000Z","updated_at":"2024-06-19T10:23:39.465Z","dependencies_parsed_at":null,"dependency_job_id":"bd31a12a-bd1d-467c-92ad-0df2e598ef19","html_url":"https://github.com/raahii/serverless-app-local","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/raahii/serverless-app-local","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raahii%2Fserverless-app-local","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raahii%2Fserverless-app-local/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raahii%2Fserverless-app-local/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raahii%2Fserverless-app-local/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/raahii","download_url":"https://codeload.github.com/raahii/serverless-app-local/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raahii%2Fserverless-app-local/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28417716,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T10:47:48.104Z","status":"ssl_error","status_checked_at":"2026-01-14T10:46:19.031Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","aws-dynamodb","aws-lambda","golang","serverless","serverless-applications","serverless-architectures","serverless-examples","serverless-functions","serverless-offline"],"created_at":"2026-01-14T10:51:31.030Z","updated_at":"2026-01-14T10:51:31.738Z","avatar_url":"https://github.com/raahii.png","language":"Go","readme":"# Local development environment for aws serverless application\n\nThis repository contains a json api server using *AWS Lambda Function* and *DynamoDB*. It also contains some lambda functions written in golang, but they are just examples.\n\n## About\n\nThis sample enables development of serverless application using AWS cloud services on your machine by using docker. The author has developed this on MacOS and has not considered other OS specific issues.\n\nHere, [aws-sam-cli](https://github.com/awslabs/aws-sam-cli) is used to reproduce *Lambda Function* and calling it from *API Gateway*. And we use [localstack](https://github.com/localstack/localstack) to reproduce DynamoDB.\n\nOther AWS services (ex. *S3*, *SQS*, etc) are also available as long as they are supported by localstack.\n\n## Required\n\n- aws-cli\n- docker-compose\n- golang (~1.11)\n  - `export GO111MODULE=on`\n\n\n## Getting Started\n\n- Start/Stop/Restart the appication\n\n  ```sh\n  make start\n  ```\n\n  ```sh\n  make stop\n  ```\n\n  ```sh\n  make restart\n  ```\n\n- Compile Go source codes\n\n  ```sh\n  make build\n  ```\n\n- Watch the api server logs\n\n  ```sh\n  docker-compose logs -f sam\n  ```\n\n## Make a request to DynamoDB\n\n  The port is 4569 by default.\n\n  ```sh\n  aws dynamodb list-tables --endpoint-url 'http://localhost:4569'\n  ```\n\n  ```sh\n  aws dynamodb create-table --endpoint-url 'http://localhost:4569' \\\n    --table-name 'dummy' \\\n    --attribute-definitions '[{\"AttributeName\":\"key\",\"AttributeType\": \"S\"}]' \\\n    --key-schema '[{\"AttributeName\":\"key\",\"KeyType\": \"HASH\"}]' \\\n    --provisioned-throughput '{\"ReadCapacityUnits\": 5,\"WriteCapacityUnits\": 5}'\n  ```\n\n## Make a request to api server\n\n  The port is 8000 by default. All of [api configuration](https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md) is specified in `lambda/template.yaml`. \n\n  - `/`: `lambda/hello`\n\n    Hello World function.\n\n    ```sh\n    curl localhost:8000/\n    ```\n    ```json\n    \"Hello, 60.61.189.189\"\n    ```\n\n  - `/tables`: `lambda/list-tables`\n\n    Return table names in dynamodb.\n\n    ```sh\n    curl localhost:8000/tables\n    ```\n\n    ```json\n    {\n        \"table_names\": [\n            \"dummy\"\n        ]\n    }\n    ```\n## Web user interface (dashboard)\n\n  The port is 8888. Access with your browser to watch localstack resources.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraahii%2Fserverless-app-local","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraahii%2Fserverless-app-local","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraahii%2Fserverless-app-local/lists"}