{"id":24835798,"url":"https://github.com/tobilg/cfn-cognito-resource-server","last_synced_at":"2026-05-17T17:00:56.310Z","repository":{"id":86825581,"uuid":"233370322","full_name":"tobilg/cfn-cognito-resource-server","owner":"tobilg","description":"A custom CloudFormation resource for Cognito Resource Servers","archived":false,"fork":false,"pushed_at":"2020-01-17T17:51:33.000Z","size":18,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-26T03:41:33.918Z","etag":null,"topics":["aws","cloudformation","cognito","customresource","resourceserver"],"latest_commit_sha":null,"homepage":null,"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/tobilg.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}},"created_at":"2020-01-12T09:50:28.000Z","updated_at":"2022-11-15T04:19:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"9e480094-2404-4e2f-baba-28205c9e498a","html_url":"https://github.com/tobilg/cfn-cognito-resource-server","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/tobilg/cfn-cognito-resource-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobilg%2Fcfn-cognito-resource-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobilg%2Fcfn-cognito-resource-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobilg%2Fcfn-cognito-resource-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobilg%2Fcfn-cognito-resource-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tobilg","download_url":"https://codeload.github.com/tobilg/cfn-cognito-resource-server/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobilg%2Fcfn-cognito-resource-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278686949,"owners_count":26028395,"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-10-06T02:00:05.630Z","response_time":65,"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":["aws","cloudformation","cognito","customresource","resourceserver"],"created_at":"2025-01-31T04:51:49.874Z","updated_at":"2025-10-06T22:09:51.542Z","avatar_url":"https://github.com/tobilg.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cfn-cognito-resource-server\nA custom CloudFormation resource for Cognito Resource Servers for the usage with CloudFormation stacks, as well as the Serverless framework.\n\n## Usage\n\n### CloudFormation\n\nIf you just want to use the custom resource, copy the [dist/cfn-cognito-resource-server.yml](dist/cfn-cognito-resource-server.yml) file to your CloudFormation project.\n\nAdditionally, you need to add another resource to the stack in whcih you configure the Cognito Resource Server (this assumes you have a Cognito UserPool resource named `CognitoUserPool` in your stack):\n\n```yaml\nResources:\n  CognitoResourceServer:\n    Type: 'Custom::CognitoResourceServer'\n    Properties:\n      Name: 'example.com API Cognito Resource Server'\n      Identifier: 'https://api.example.com'\n      UserPoolId: !Ref CognitoUserPool\n      Scopes:\n        - Name: 'myscope:read'\n          Description: 'Read permissions'\n        - Name: 'myscope:write'\n          Description: 'Write permissions'\n      ServiceToken: !GetAtt CustomResourceServerLambda.Arn\n```\n\nYou should configure the `Name`, `Identifier` and `Scopes` with your desired values. After that, the custom resource should be usable.\n\n### Serverless\n\nFor an example configuration with the Serverless framework, you can have a look in the [test](test/) subfolder. This contains a valid [serverless.yml](test/serverless.yml) file with a configuration that can be customized.\n\nYou basically need three resources:\n\n* A Cognito UserPool\n* The custom resource for the Cognito Resource Server (see [dist/sls-cognito-resource-server.yml](dist/sls-cognito-resource-server.yml))\n* A resource which configures/uses the custom resource for the Cognito Resource Server\n\nIt could look like the following once you created the above named resources as files in the `resources` subfolder of your Serverless project:\n\n```yaml\nservice:\n    name: 'test-custom-cognito-resource-server'\n\nprovider:\n  name: aws\n  runtime: nodejs10.x\n  region: ${opt:region, 'us-east-1'}\n  stage: ${opt:stage, 'dev'}\n  \nresources:\n  - ${file(resources/cognito.yml)}\n  - ${file(resources/sls-cognito-resource-server.yml)}\n  - ${file(resources/cognito-resource-server.yml)}\n```\n\nThe `resources/cognito-resource-server.yml` could for example look like this:\n\n```yaml\nResources:\n  CognitoResourceServer:\n    Type: 'Custom::CognitoResourceServer'\n    Properties:\n      Name: 'example.com API Cognito Resource Server'\n      Identifier: 'https://api.example.com'\n      UserPoolId: \n        Ref: CognitoUserPool\n      Scopes:\n        - Name: 'myscope:read'\n          Description: 'Read permissions'\n        - Name: 'myscope:write'\n          Description: 'Write permissions'\n      ServiceToken: \n        'Fn::GetAtt': [CustomResourceServerLambda, Arn]\n```\n\nYou should configure the `Name`, `Identifier` and `Scopes` with your desired values. After that, the custom resource should be usable.\n\n## Building\nAfter cloning the repo, and running `npm i` in the project's path, you can run the build of the custom CloudFormation resources by running `npm run build`.\n\nThis will created/update the following files in the `dist` subfolder:\n\n* `cfn-cognito-resource-server.yml`: The basic custom CloudFormation resource for the creation of Cognito Resource Servers\n* `sls-cognito-resource-server.yml`: The same resource, but ready for the usage with the Serverless framework\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftobilg%2Fcfn-cognito-resource-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftobilg%2Fcfn-cognito-resource-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftobilg%2Fcfn-cognito-resource-server/lists"}