{"id":16810947,"url":"https://github.com/johnf/serverless-cognito-demo","last_synced_at":"2025-10-19T13:26:30.405Z","repository":{"id":140631151,"uuid":"76749672","full_name":"johnf/serverless-cognito-demo","owner":"johnf","description":"Serverless Cognito Demo","archived":false,"fork":false,"pushed_at":"2017-06-25T00:22:40.000Z","size":237,"stargazers_count":50,"open_issues_count":2,"forks_count":8,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-18T07:12:15.195Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/johnf.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":"2016-12-17T22:20:33.000Z","updated_at":"2024-08-23T08:58:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"dc211d08-a1f7-4dd6-a635-32931229e9f3","html_url":"https://github.com/johnf/serverless-cognito-demo","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/johnf%2Fserverless-cognito-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnf%2Fserverless-cognito-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnf%2Fserverless-cognito-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnf%2Fserverless-cognito-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johnf","download_url":"https://codeload.github.com/johnf/serverless-cognito-demo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244898187,"owners_count":20528331,"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":"2024-10-13T10:17:12.060Z","updated_at":"2025-10-19T13:26:25.363Z","avatar_url":"https://github.com/johnf.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NOTE: This was a demo for a pull request into serverless.\n\nIf you are wondering what you need to do client side, check out https://github.com/aws/amazon-cognito-identity-js\n\n# Serverless Test\n\nThis testing assume that you have default AWS credentials set up in ~/.aws or\nyou are running on an EC2 instance with an EC2 role with the appropriate\npermissions.\n\n# Testing\n\n## Create the pool\n\nFirst you need to create a userpool\n```\nbin/create_user_pool\n```\n\nthis will output the ARN\n```\nUser Pool ARN is arn:aws:cognito-idp:us-east-1:123456789:userpool/us-east-1_XXXXXX\n```\n\n## Configure Serverless\n\nCopy this ARN into `arn:` section of `serverless.yml`\n\nConfigure serverless to use your AWS credential.\n\n\n## Bring up the stack\n\n```\nsls deploy\n```\n\n## Verify\n\n* Browse to https://console.aws.amazon.com/apigateway/home?region=us-east-1#/apis\n* Click on *dev-serverless-cognito-demo*\n* Click on *Authorizers*\n* You should see an authorizer configured as per ![Authorizer](images/authorizer.png)\n* Click on *Resources*\n* Click on */hello*\n* You should see the method is protected by the cognito pool as per ![Pool](images/method.png)\n\n## Cleanup\n\nBring down the stack\n```\nsls remove\n```\n\nDelete the pool, you need to pass in the ID. The bit at the end of the ARN.\n\n```\nbin/delete_user_pool us-east-1_XX\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnf%2Fserverless-cognito-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohnf%2Fserverless-cognito-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnf%2Fserverless-cognito-demo/lists"}