{"id":18497703,"url":"https://github.com/schadokar/basic-crud-sls-node","last_synced_at":"2025-05-14T05:16:31.566Z","repository":{"id":113982588,"uuid":"291499932","full_name":"schadokar/basic-crud-sls-node","owner":"schadokar","description":"Basic CRUD serverless operation on dynamoDB in nodejs ","archived":false,"fork":false,"pushed_at":"2020-09-01T17:09:37.000Z","size":7,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-12-25T17:42:18.716Z","etag":null,"topics":["aws","aws-dynamodb","aws-lambda","nodejs","serverless","serverless-framework"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/schadokar.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":"2020-08-30T15:41:45.000Z","updated_at":"2024-07-08T06:43:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"1cead4db-6b9c-4c78-b5db-b20ab54584c8","html_url":"https://github.com/schadokar/basic-crud-sls-node","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/schadokar%2Fbasic-crud-sls-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schadokar%2Fbasic-crud-sls-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schadokar%2Fbasic-crud-sls-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schadokar%2Fbasic-crud-sls-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/schadokar","download_url":"https://codeload.github.com/schadokar/basic-crud-sls-node/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239213698,"owners_count":19601023,"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":["aws","aws-dynamodb","aws-lambda","nodejs","serverless","serverless-framework"],"created_at":"2024-11-06T13:35:27.585Z","updated_at":"2025-02-17T00:20:33.979Z","avatar_url":"https://github.com/schadokar.png","language":"JavaScript","readme":"# Basic CRUD serverless operation on DynamoDB in Nodejs\r\n\r\nThis is a simple serverless CRUD application in nodejs.\r\n\r\n## Details\r\n\r\n- Serverless Computing: AWS Lambda\r\n- Database: AWS DynamoDB\r\n- API: AWS API Gateway\r\n- Serverless CLI: [Serverless Framework](https://serverless.com)\r\n\r\n# Prerequisites\r\n\r\n1. AWS account\r\n2. Nodejs installed in your machine\r\n3. Install serverless `npm install --global serverless`\r\n4. Basic understanding of nodejs and javascript syntax\r\n5. Configure AWS credentials in serverless\r\n\r\n## Configuring AWS credentials in the serverless\r\n\r\nOpen **IAM** in your AWS account. Create a new user and give **AdministratorAccess**.  \r\nDownload the Key pair csv. Save it properly, as if lost there is no way to retrieve it.\r\n\r\n\u003e This is an educational project. For production, please configure the user access accordingly.\r\n\r\nThere are 2 ways configure the AWS credentials in the serverless framework.\r\n\r\n### 1. Serverless CLI (local to the machine)\r\n\r\nThis will configure the AWS credentials to the local instance of the serverless CLI.\r\n\r\nTo configure run the below command with the correct access key and secret.\r\n\r\n```js\r\nserverless config credentials --provider aws --key \u003cACCESS KEY\u003e --secret \u003cSecret Access key\u003e\r\n```\r\n\r\n\u003e Check out this quick tutorial - [Link](https://schadokar.dev/posts/create-your-first-serverless-application/)\r\n\r\n### 2. Serverless Web application\r\n\r\nCreate an account in the [https://serverless.com](https://serverless.com).\r\n\r\nCreate a new app.\r\n\r\nSelect **serverless framework** template.  \r\nEnter the app name.\r\n\r\nCopy the app properties\r\n\r\n```\r\norg: \u003corg-name\u003e\r\napp: \u003capp-name\u003e\r\n```\r\n\r\nOpen the `serverless.yml` and paste the app properties in the top.\r\n\r\n```\r\norg: \u003corg-name\u003e\r\napp: \u003capp-name\u003e\r\nservice: basic-sls-crud-service-node\r\n```\r\n\r\nOpen the terminal in the directory of the serverless project.\r\n\r\nLogin to serverless account from serverless CLI\r\n\r\n```\r\nserverless login\r\n```\r\n\r\n**Connect with AWS**\r\n\r\nOpen the app setting from the serverless dashboard. There is a 3 dots menu in the app card.\r\n\r\nGo to **stages** \u003e Select **default** \u003e Connect AWS\r\n\r\nYou can create multiple stages according to the application environment.\r\n\r\n# Deploy the application\r\n\r\nTo deploy the application run the below command\r\n\r\n```\r\nserverless deploy\r\n```\r\n\r\nIt will create all the API routes configured in the `serverless.yml`.\r\n\r\nTest the endpoints using the `curl` command or **Postman**.\r\n\r\n# References:\r\n\r\nTo learn more on serverless [check out my latest tutorials](https://schadokar.dev/categories/serverless/).\r\n\r\n---\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschadokar%2Fbasic-crud-sls-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fschadokar%2Fbasic-crud-sls-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschadokar%2Fbasic-crud-sls-node/lists"}