{"id":19151466,"url":"https://github.com/sc5/serverless-blog-workshop","last_synced_at":"2025-09-08T15:39:05.819Z","repository":{"id":84016315,"uuid":"52770849","full_name":"SC5/serverless-blog-workshop","owner":"SC5","description":"AWS -Serverless Blog Workshop","archived":false,"fork":false,"pushed_at":"2017-01-10T09:43:48.000Z","size":72,"stargazers_count":13,"open_issues_count":1,"forks_count":5,"subscribers_count":18,"default_branch":"master","last_synced_at":"2025-05-07T05:28:22.551Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://www.sc5.io","language":"JavaScript","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/SC5.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,"zenodo":null}},"created_at":"2016-02-29T06:57:11.000Z","updated_at":"2022-02-09T17:31:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"635812ff-9b0c-44f2-8166-c45dbbc0e504","html_url":"https://github.com/SC5/serverless-blog-workshop","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SC5/serverless-blog-workshop","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SC5%2Fserverless-blog-workshop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SC5%2Fserverless-blog-workshop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SC5%2Fserverless-blog-workshop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SC5%2Fserverless-blog-workshop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SC5","download_url":"https://codeload.github.com/SC5/serverless-blog-workshop/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SC5%2Fserverless-blog-workshop/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274208044,"owners_count":25241544,"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","status":"online","status_checked_at":"2025-09-08T02:00:09.813Z","response_time":121,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-11-09T08:14:46.493Z","updated_at":"2025-09-08T15:39:05.797Z","avatar_url":"https://github.com/SC5.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Serverless Blog Workshop by SC5\n\nExample backend project for AWS - Serverless hackathon.\n\nProject is compatible with Serverless v1\n\n## Step by step instructions for building the project with Serverless Framework v1.5\n\n### Setup project\n\n* Create the service from the `sc5-serverless-boilerplate`\n```bash\n\u003e sls install -u https://github.com/SC5/sc5-serverless-boilerplate -n serverless-blog\n\u003e cd serverless-blog\n\u003e npm install\n```\n\n### Set up storage (DynamoDB)\n\n* Un-comment `Resources:` and `resources:` in `serverless.yml`.\n\n```\n# DynamoDB Blog table for workshop\n    BlogTable:\n      Type: AWS::DynamoDB::Table\n      DeletionPolicy: Retain\n      Properties:\n        AttributeDefinitions:\n          - AttributeName: id\n            AttributeType: S\n        KeySchema:\n          - AttributeName: id\n            KeyType: HASH\n        ProvisionedThroughput:\n          ReadCapacityUnits: 1\n          WriteCapacityUnits: 1\n        TableName: ${self:provider.environment.TABLE_NAME}\n```\n\n### Create function and endpoints\n\n* Create the function\n```bash\nsls create function -f posts --handler posts/index.handler\n```\n\n* Register HTTP endpoints by adding the following to the function definition in `serverless.yml`\n```\n    events:\n      - http:\n          path: posts\n          method: get          \n          cors: true\n          integration: lambda\n      - http:\n          path: posts\n          method: posts\n          cors: true\n          integration: lambda\n       - http:\n          path: posts/{id}\n          method: put\n          cors: true\n          integration: lambda\n      - http:\n          path: posts/{id}\n          method: delete\n          cors: true\n          integration: lambda\n```\n\n### Implement the functionality\n\n* Copy `posts/index.js` and `posts/BlogStorage.js` from this repo to your service (`posts` folder)\n\n### Deploy and test\n\n* Deploy the resources (and functions) using\n\n```\nsls deploy\n````\n\n* Copy tests from `test/posts.js` in this repo to your service\n* Run `serveless-mocha-plugin` tests\n\n```\nsls invoke test --region us-east-1 --stage dev\n```\n\n### Set up your blog application\n\n* Launch the blog application\n* Enter the service Url (https://..../posts). The service URL can be retrieved using\n```\nsls info\n```\n\n#### Enjoy, your ready to go!\n\n# Feedback\nmikael.puittinen@sc5.io\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsc5%2Fserverless-blog-workshop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsc5%2Fserverless-blog-workshop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsc5%2Fserverless-blog-workshop/lists"}