Giter Club home page Giter Club logo

aws-cloudformation-cognito-identity-pool's Introduction

โ—๏ธDEPRECATED as of 2017-04-28. Please use AWS::Cognito::IdentityPool

AWS CloudFormation Cognito Identity Pool

An AWS Lambda-backed Custom Resource for CRUD operations on Cognito Identity Pools

Codacy Badge Dependency Status devDependency Status Code Climate Test Coverage Issue Count Known Vulnerabilities Greenkeeper badge bitHound Code

  • Master: CircleCI
  • Develop: CircleCI

Background

Cognito Identity Pools are not currently supported within CloudFormation templates. However, CloudFormation provides extensibility via Custom Resources, which enable Create/Update/Delete operations. This is meant to replace having to manually create Cognito Identity Pools manually via the CLI or web console.

See the related blog post for more information.

Quick Start

  1. Ensure you have node.js >= 6 installed (preferably via nvm)
  2. Install gulp globally (yarn global add gulp)
  3. Clone this repository
  4. Run yarn
  5. Create an S3 bucket to hold your Lambda Function (skip this if you already have one)
  6. Create config.json (see below)
  7. Ensure you have the AWS SDK for Node.js configured correctly. Also, set the AWS_REGION environment variable.
  8. Run gulp this will:
  9. Build the Lambda function and place it in dist.zip
  10. Upload the function to S3
  11. Create the CloudFormation Stack
  12. Create your IAM Role Policy(ies). Examples are provided in cloudformation-role-policies-example.json, which provides managed policies that are attached to the IAM roles. This is necessary for your users to be able to use their credentials to do anything.

Example config.json

Create a config.json file. See The AWS-SDK for JavaScript docs on CognitoIdentity for options, or run aws cloudformation get-template-summary --template-body file:///path/to/cloudformation.json

{
	"IdentityPoolName": "IdentityPoolName",
	"AllowUnauthenticatedIdentities": false,
	"LambdaS3Bucket": "bucket-name",
	"LambdaS3Key": "CloudFormation-CustomResource-CognitoIdentityPool.zip",
	"DeveloperProviderName": "com.site"
}

All non-string values will be stringified for the CloudFormation template. If you're going to use the template directly (instead of using gulp), keep this in mind.

Testing

  1. Configure your environment
  • Run yarn install (yarn)
  • Create your Lambda S3 Bucket
  • Configure the AWS SDK for Node.js (or just set the AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and AWS_REGION environment variables)
  • Create your config.json
  1. Run yarn test

aws-cloudformation-cognito-identity-pool's People

Contributors

binoculars avatar chefren avatar greenkeeper[bot] avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.