Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Serverless Architectures with AWS

You're reading from   Serverless Architectures with AWS Discover how you can migrate from traditional deployments to serverless architectures with AWS

Arrow left icon
Product type Paperback
Published in Dec 2018
Publisher Packt
ISBN-13 9781789805024
Length 226 pages
Edition 1st Edition
Tools
Concepts
Arrow right icon
Author (1):
Arrow left icon
Mohit Gupta Mohit Gupta
Author Profile Icon Mohit Gupta
Mohit Gupta
Arrow right icon
View More author details
Toc

Chapter 1: AWS, Lambda, and Serverless Applications

Solution for Activity 1: Creating a New Lambda Function That Finds the Square Root of the Average of Two Input Numbers

  1. Click on Create a function to create your first Lambda function on the AWS Lambda page.
  2. On the Create function page, select Author from scratch.
  3. In the Author from scratch window, fill in the following details:

    Name: Enter myFirstLambdaFunction.

    Runtime: Choose Node.js 6.10. The Runtime window dropdown shows the list of languages that are supported by AWS Lambda and you can author your Lambda function code in any of the listed options. For this activity, we will author our code in Node.js.

    Role: Choose Create new role from template(s). In this section, you specify an IAM role.

    Role name: Enter lambda_basic_execution.

    Policy templates: Select Simple Microservice permissions.

  4. Now click on Create function.
  5. Go to the Function code section.
  6. Use the Edit code inline option, and enter this code:
    exports...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image