Successfully reported this slideshow.
Your SlideShare is downloading. ×

Create a Website and API with AWS Lambda

Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
CREATE A WEBSITE AND API WITH AWS
LAMBDA
A starting guide on the serverless stack
WHY SERVERLESS
• No server infrastructure management
• Scaling is simple and precise, only pay for what you
use
• Decouple...
WHAT ISTHE SERVERLESS
STACK
• Route53 provides DNS
• CloudFront provides CDN/
HTTPS
• S3 Hosts Static Web Content
• Dynamo...

YouTube videos are no longer supported on SlideShare

View original on YouTube

Check these out next

1 of 12 Ad

Create a Website and API with AWS Lambda

Download to read offline

A sample of a serverless stack using AWS presented a the Columbia AWS Meetup on October 20th, 2010. Find more details, a video presentation, and the resources used in this presentation @ https://www.thorntech.com/2016/10/serverless-website-aws-lambda/

A sample of a serverless stack using AWS presented a the Columbia AWS Meetup on October 20th, 2010. Find more details, a video presentation, and the resources used in this presentation @ https://www.thorntech.com/2016/10/serverless-website-aws-lambda/

Advertisement
Advertisement

More Related Content

Recently uploaded (20)

Advertisement

Create a Website and API with AWS Lambda

  1. 1. CREATE A WEBSITE AND API WITH AWS LAMBDA A starting guide on the serverless stack
  2. 2. WHY SERVERLESS • No server infrastructure management • Scaling is simple and precise, only pay for what you use • Decoupled architecture keeps you agile
  3. 3. WHAT ISTHE SERVERLESS STACK • Route53 provides DNS • CloudFront provides CDN/ HTTPS • S3 Hosts Static Web Content • DynamoDB or RDS provides database • API Gateway provides http(s) endpoints • Lambda executes business logic
  4. 4. VOTING APP ARCHITECTURE Created with https://cloudcraft.co/
  5. 5. STEP 1: SET UP DYNAMODB • CreateVotesTable in DynamoDB
  6. 6. STEP 2: SET UP LAMBDA FUNCTION 1,THEVOTE CASTER • Create a new Lambda with microservice-http-endpoint blueprint • Modify code to update Votes table
  7. 7. STEP 3: CONFIGURE API GATEWAY • The endpoint provided by the Lambda blueprint is broken • Delete the given endpoint and create one from scratch • Create Body MappingTemplate to transform x-www-form-url- encoded request • Could add security layer with Cognito User Pools and logging to CloudWatch
  8. 8. STEP 4: SET UP S3 BUCKET • Enable Static Website Hosting • Set bucket policy to enable public access • Upload html file
  9. 9. STEP 5: LAMBDA FUNCTION 2, THEVOTETALLY READER • Trigger from DynamoDB table updates • Write data.json file in S3
  10. 10. FRAMEWORKS • Serverless: https://serverless.com/ • apex: http://apex.run/ • chalice (python): https://github.com/awslabs/chalice • aws-serverless-express: https://github.com/awslabs/ aws-serverless-express
  11. 11. THANKYOU! QUESTIONS? Dan Rusk danrusk@thorntech.com

×