Code Monkey home page Code Monkey logo

hands-on-with-aws-lambda's Introduction

Hands On Serverless Computing with Lambda

Sample Site | AWS Console | lab-001 | lab-002 | lab-003 | lab-004

Introduction

The topics for this hands-on session will be AWS Lambda, function as a service (FaaS). During this Playground you will create a website hosted on AWS S3 using AWS Lambda and Amazon API Gateway to add dynamic functionality to the site.

Steps

Each step will be associated with a Lab to complete build on the previous lab to progress. A Completed lab website is a available for view from the link above 'Sample Site'. All labs have been tested with the US Oregon region.

What is Serverless ?

A computing model where the existence of servers are hidden from developers. Within AWS eco-system Lambda is not the only serverless service. For the purpose of these labs we will look at S3, Lambda, and API Gateway to produce a functional website.

  • Storage - S3
  • Compute - Lambda
  • Database - DynamoDB, ElasticCache
  • API Proxy - API Gateway
  • Analytics - AWS Kinesis
  • Messaging & Queues - AWS SNS, SQS
  • State Management - AWS Step Functions
  • Diagnostics - AWS X-Ray

What Services Labs are covering?

  • S3 - Static Web hosting: Hosting a static website on S3 bucket.
  • Lambda: Creating a lambda function, that generates a random number and another function that processes form GET and PUT requests.
  • API Gateway: Using API Gateway to expose lambda function to static website hosted on S3 bucket.

Login

  • AWS Console: https://ecsd-training.signin.aws.amazon.com/console
  • Username: <TBA>
  • Password: <TBA>

Checkout code from GitHub

git clone https://github.com/ecsdigital/devopsplayground11-lambda.git
cd devopsplayground11-lambda

Download link for labs

wget --output-document  playground11.zip --quiet https://github.com/ecsdigital/devopsplayground11-lambda/archive/master.zip

Labs

  1. Lab-001 - Build Static Website with s3 Bucket
  2. Lab-002 - Sharing resources between s3 Buckets
  3. Lab-003 - Web Services with Lambda
  4. Lab-004 - Posting Data with Lambda

Prerequisites

  • Login to AWS account
  • Permissions to create S3 Buckets
  • Permissions to write and execute lambda functions
  • Permission to create API Gateway
  • Region: Oregon

IAM Roles needed for Labs

If you attempt the labs in your own AWS account you will need to create the following roles:

  • AWSS3FullAccess
  • AWSLambdaFullAccess
  • AmazonAPIGatewayAdministrator
  • AWSLambdaExecute

IAM Roles needed for Labs

Safari: Enable the hidden Develop menu

Some labs will require having access to a web browser console to see Browser errors like lab-002 and labb-003 for Cross Origin Resource Sharing. Safari has these development tools built-in however they need to be enabled.

Steps

  1. Safari > Preferences
  2. Check 'Show Develop menu in menu bar' (see image Safari Advanced Preferences red box)
  3. Safari menu bar should now show as in 'Safari Menu Bar' image below

Image: Safari Advanced Preferences

Safari Advanced Preferences Pane

Image: Safari Menu bar

Safari Menu

hands-on-with-aws-lambda's People

Contributors

micheldlebeau avatar sunil-tailor 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.