), message queues (SQS
), storage (S3
), push messaging (SNS
), and Web identity federation (IAM
This is incredibly
powerful, allowing developers to build industrial strength apps cheaply and securely without managing any backend infrastructure.
The main hurdle is navigating the required configuration and provisioning, which can feel vast and byzantine for a newcomer who just wants to quickly get started with a new app.
To fix this, I wrote an extensible Yeoman generator for AWS
that will generate a boilerplate HTML5/JS application, provision an entire AWS infrastructure with proper permissions to back it, and dynamically configure your app for use
immediately. (And if you're not using Yeoman
to build your HTML5 apps, well, you probably should be
How much time does this actually save? Well, consider the reference application
for the new SDK, presented at AWS re:Invent 2013
- An S3 bucket with CORS configured properly
- A User representing the anonymous user
- A Role representing the logged in user, configured to allow Facebook login
- Web Identity Federation scoped to the right Facebook app and users
- A DynamoDB table with the proper key schema and permissions set
If you've just got passing familiarity with the nitty-gritty of configuring DynamoDB, Users, Roles, and Web Identity Federation on AWS, looking at the sample
code and reverse engineering the needed permissions, resources, and schemas will definitely take a few hours. Even after figuring things out the first time, actually going through the various management consoles will probably take 15-30 minutes.
Now, creating the same application takes about 3 minutes, including provisioning. More to the point, this provisioning and configuration is now automated and integrated into a proper workflow.
So how does it work? The generator has a collection of "stacks." Each stack is a CloudFormation
template, a CORS configuration file, and a bundle of assets. The generator converts the CloudFormation template into a series of Yeoman
prompts, gathers the parameters, provisions the resources described in the CloudFormation template, sets the CORS configuration for your S3 bucket, generates your local app, and injects the configuration into it.
This is definitely an early release
(needs more tests and error handling), but it's built to be easy to use and extend, so please give it a spin and let me know what you think!