AWS Lambda Quick Start Guide
eBook - ePub

AWS Lambda Quick Start Guide

Learn how to build and deploy serverless applications on AWS

Markus Klems

Partager le livre
  1. 184 pages
  2. English
  3. ePUB (adapté aux mobiles)
  4. Disponible sur iOS et Android
eBook - ePub

AWS Lambda Quick Start Guide

Learn how to build and deploy serverless applications on AWS

Markus Klems

DĂ©tails du livre
Aperçu du livre
Table des matiĂšres
Citations

À propos de ce livre

Discover techniques and tools for building serverless applications with AWS LambdaAbout This Book‱ Learn to write, run, and deploy Lambda functions in the AWS cloud‱ Make the most of AWS Lambda functions to build scalable and cost-efficient systems‱ A practical guide to developing serverless services and applications in Node.js, Java, Python, and C#Who This Book Is ForThis book is primarily for IT architects and developers who want to build scalable systems and deploy serverless applications with AWS Lambda. No prior knowledge of AWS is necessary. What You Will Learn‱ Understand the fundamental concepts of AWS Lambda‱ Get to grips with the Serverless Framework and how to create a serverless project‱ Testing and debugging Lambda functions‱ Create a stateful, serverless backend with DynamoDB‱ Program AWS Lambda with Java, Python, and C#‱ Program a lambda function with Node.jsIn DetailAWS Lambda is a part of AWS that lets you run your code without provisioning or managing servers. This enables you to deploy applications and backend services that operate with no upfront cost. This book gets you up to speed on how to build scalable systems and deploy serverless applications with AWS Lambda.The book starts with the fundamental concepts of AWS Lambda, and then teaches you how to combine your applications with other AWS services, such as AmazonAPI Gateway and DynamoDB. This book will also give a quick walk through on how to use the Serverless Framework to build larger applications that can structure code or autogenerate boilerplate code that can be used to get started quickly for increased productivity.Toward the end of the book, you will learn how to write, run, and test Lambda functions using Node.js, Java, Python, and C#.Style and approachThis book will provide clear instructions that introduce the viewer to programming AWS Lambda with Node.js, Java, Python, and C#. Moreover, readers will learn how to deploy and test Lambda functions, and how to set up and use the serverless framework.

Foire aux questions

Comment puis-je résilier mon abonnement ?
Il vous suffit de vous rendre dans la section compte dans paramĂštres et de cliquer sur « RĂ©silier l’abonnement ». C’est aussi simple que cela ! Une fois que vous aurez rĂ©siliĂ© votre abonnement, il restera actif pour le reste de la pĂ©riode pour laquelle vous avez payĂ©. DĂ©couvrez-en plus ici.
Puis-je / comment puis-je télécharger des livres ?
Pour le moment, tous nos livres en format ePub adaptĂ©s aux mobiles peuvent ĂȘtre tĂ©lĂ©chargĂ©s via l’application. La plupart de nos PDF sont Ă©galement disponibles en tĂ©lĂ©chargement et les autres seront tĂ©lĂ©chargeables trĂšs prochainement. DĂ©couvrez-en plus ici.
Quelle est la différence entre les formules tarifaires ?
Les deux abonnements vous donnent un accĂšs complet Ă  la bibliothĂšque et Ă  toutes les fonctionnalitĂ©s de Perlego. Les seules diffĂ©rences sont les tarifs ainsi que la pĂ©riode d’abonnement : avec l’abonnement annuel, vous Ă©conomiserez environ 30 % par rapport Ă  12 mois d’abonnement mensuel.
Qu’est-ce que Perlego ?
Nous sommes un service d’abonnement Ă  des ouvrages universitaires en ligne, oĂč vous pouvez accĂ©der Ă  toute une bibliothĂšque pour un prix infĂ©rieur Ă  celui d’un seul livre par mois. Avec plus d’un million de livres sur plus de 1 000 sujets, nous avons ce qu’il vous faut ! DĂ©couvrez-en plus ici.
Prenez-vous en charge la synthÚse vocale ?
Recherchez le symbole Écouter sur votre prochain livre pour voir si vous pouvez l’écouter. L’outil Écouter lit le texte Ă  haute voix pour vous, en surlignant le passage qui est en cours de lecture. Vous pouvez le mettre sur pause, l’accĂ©lĂ©rer ou le ralentir. DĂ©couvrez-en plus ici.
Est-ce que AWS Lambda Quick Start Guide est un PDF/ePUB en ligne ?
Oui, vous pouvez accĂ©der Ă  AWS Lambda Quick Start Guide par Markus Klems en format PDF et/ou ePUB ainsi qu’à d’autres livres populaires dans Computer Science et Software Development. Nous disposons de plus d’un million d’ouvrages Ă  dĂ©couvrir dans notre catalogue.

Informations

Année
2018
ISBN
9781789340600
Édition
1

Programming AWS Lambda with Java

Welcome to Chapter 4, Programming AWS Lambda with Java. In this section, we are going to take a look at using Eclipse and the AWS Eclipse plugin. Then we will program our first Lambda functions with Java. And, last but not least, we will build a simple serverless application using Java. Now let's move on to the first video where we get started with Eclipse and the AWS Eclipse plugin.
In this chapter, we are going to take a look at the following:
  • Using Eclipse and the AWS Eclipse plugin
  • Programming Lambda functions with Java
  • A simple application with Java Lambda functions
So let's dive in!
Getting started with Eclipse and the AWS Eclipse plugin
From this section, you will learn how to install the AWS Eclipse plugin, and also try out some of its features. You will also use the plugin to create our first Java Lambda function.
To find more information about the AWS Toolkit for Eclipse, go to the site of the AWS documentation, which is the open source plugin for the Eclipse IDE. Once you open the site, go over to the left and click on Getting Started and Set up the Toolkit.
There, you will find more information, including that you need an AWS account, you need to install Java, and so on. But if you have already installed Java and if you're already using Eclipse, then all you need to do is copy the link https://aws.amazon.com/eclipse.
Open your Eclipse IDE. If you have never installed an Eclipse plugin before, there should be a menu action in the menu bar that says Install New Software. For macOS, it's under Help, but, depending on the operating system, it could be somewhere else. So, find the Install New Software menu item and then enter the URL that was copied previously, as shown here:
From the previous screenshot, you will find that the AWS Toolkit for Eclipse consists of a bunch of plugins for different AWS services. What we need in this case is the Core plugin, so select the AWS Toolkit for Eclipse Core under the AWS Core Management Tools. We also need to use the AWS deployment tool for Lambda, so select AWS Lambda Plugin under the AWS Deployment Tools.
For now, the other plugins are not really needed. Once selected, click on Next. This will calculate the dependencies, which should be fine to install. Currently, we am using the Eclipse for Java EE Neon 2 version of Eclipse, but it should work similarly on all major new versions of Eclipse. So, click on Next, accept the license agreement, and click on Finish. After the software has been installed, we just need to restart Eclipse. Once the Eclipse IDE has restarted, you should see a little orange box, as shown here:
This box will give you more information on how to use the AWS Toolkit for Eclipse if you click on it.
Click on the little drop-down arrow and create a new AWS Lambda Java project:
For now, set the Project Name as demo. You can also see that we have a group ID and artifact ID, which is used for Maven. And then, at the bottom, you can see that the wizard helps us to generate some boilerplate code.
Let's change the default configuration a little bit. You can choose a different handler type if you want to operate on a stream, but for now let's leave it with a request handler. We could choose a different input type. For a first simple example application, let's use the custom input type. You can see that the code shown in the preview that is generated from our configurations changes. As input type, we could use a plain old Java object, but we could also use something such as a string or an integer. So, let's use Input Type and Output Type as String, so we can build a really simple hello-world application. Let's click on Finish.
When we have created our AWS Lambda Java project, there will be more information on how to get started. But, in our example IDE configuration, there are a couple of problems that are pointed out, as follows:
These errors might not even happen in your case, but, in case they appear, let's see on how to fix them.
In the preceding screenshot, the problem is that the build path was not configured correctly. The reason is because of using the outdated Java version 1.5. We need to change that. So, go to the project explorer tab, click on demo, and go to demo | Build Path | Confi...

Table des matiĂšres