Serverless Applications with Node.js: Using AWS Lambda and Claudia.js
Book information
Description
Serverless Applications with Node.js walks you through building serverless apps on AWS using JavaScript. Inside, you'll discover what Claudia.js brings to the table as you build and deploy a scalable event-based serverless application, based around a pizzeria that's fully integrated with AWS services, including Lambda and API Gateway. Each chapter is filled with exercises, examples, tips, and more to make sure you're ready to bring what you've learned into your own work. Foreword by Gojko Adzic. About the Technology The benefits of cloud-hosted serverless web apps are undeniable: lower complexity, quicker time to market, and easier scalability than traditional, server-dependent designs. And thanks to JavaScript support in AWS Lambda and powerful new serverless API tools like the Claudia.js library, you can build and deploy serverless apps end to end without learning a new language. About the Book Serverless Applications with Node.js teaches you to design and build serverless web apps on AWS using JavaScript, Node, and Claudia.js. You'll master the basics of writing AWS Lambda functions, along with core serverless patterns like API Gateway. Along the way, you'll practice your new skills by building a working chatbot and a voice assistant with Amazon Alexa. You'll also discover techniques for migrating existing apps to a serverless platform. What's inside • Authentication and database storage • Asynchronous functions • Interesting real-world examples • Developing serverless microservices About the Reader For web developers comfortable with JavaScript and Node.js. About the Author Slobodan Stojanović and Aleksandar Simović are AWS Serverless Heroes and core contributors to the Claudia.js project. They are also coauthors of Desole, an open source serverless errortracking tool, and the lead developers of Claudia Bot Builder. Severless Applications with Node.js contents foreword preface acknowledgments about this book about the authors about the cover illustration Part 1 Serverless pizzeria 1 Introduction to serverless 1.1 Servers and washing machines 1.2 The core concepts 1.3 How does serverless work? 1.4 Serverless in practice 1.4.1 Aunt Maria?s serverless pizzeria 1.4.2 A common approach 1.4.3 Serverless approach 1.5 Serverless infrastructure ? AWS 1.6 What is Claudia, and how does it fit? 1.7 When and where you should use it 2 Building your first 2.1 Assembling pizza ingredients: building the API 2.1.1 Which pizza can I GET? 2.1.2 Structuring your API 2.1.3 POSTing an order 2.2 How Claudia deploys your API 2.3 Traffic control: How API Gateway works 2.4 When a serverless API is not the solution 2.5 Taste it! 2.5.1 Exercise 2.5.2 Solution 3 Asynchronous work is easy, we Promise() 3.1 Storing the orders 3.2 Promising to deliver in less than 30 minutes! 3.3 Trying out your API 3.4 Getting orders from the database 3.5 Taste it! 3.5.1 Exercise 3.5.2 Solution 4 Pizza delivery: Connecting an external service 4.1 Connecting to an external service 4.2 Connecting to the delivery API 4.2.1 The Some Like It Hot Delivery API 4.2.2 Creating your first delivery request 4.3 Potential issues with async communication 4.3.1 Forgetting to return a promise 4.3.2 Not passing the value from the promise 4.3.3 Not wrapping the external service in a promise 4.3.4 Timeout issues with long async operations 4.4 Taste it! 4.4.1 Exercise 4.4.2 Solution 5 Houston, 5.1 Debugging a serverless app 5.2 Debugging your Lambda function 5.3 X-Ray your app 5.4 Taste it! 5.4.1 Exercise 5.4.2 Solution 6 Level up your API 6.1 Serverless authentication and authorization 6.2 Creating user and identity pools 6.2.1 Controlling API access with Cognito 6.3 Taste it! 6.3.1 Exercise 6.3.2 Solution 7 Working with files 7.1 Storing static files in a serverless application 7.2 Generating thumbnails 7.2.1 Deploying your S3 function 7.3 Taste it! 7.3.1 Exercise 7.3.2 Solution 7.4 End of part 1: Special exercise 7.4.1 Advanced task Part 2 Let?s talk 8 When pizza is one 8.1 Pizza ordering beyond the browser 8.2 Hello from Facebook Messenger 8.3 What kinds of pizzas do you have? 8.4 Speeding up the deployment 8.5 Messenger templates 8.6 How does Claudia Bot Builder work? 8.7 Taste it! 8.7.1 Exercise 8.7.2 Solution 9 Typing... Async and 9.1 Making chatbots interactive 9.1.1 Tap to order: answering a postback 9.2 Making the chatbot structure more scalable 9.3 Connecting your chatbot to the DynamoDB database 9.4 Getting the user?s location from the chatbot 9.5 Scheduling a delivery 9.6 Small talk: Integrating simple NLP 9.7 Taste it! 9.7.1 Exercise 9.7.2 Solution 9.7.3 Advanced exercise 10 Jarvis, I mean Alexa, 10.1 Can?t talk right now: sending an SMS with Twilio 10.1.1 An SMS pizza list 10.1.2 Ordering a pizza 10.2 Hey Alexa! 10.2.1 Preparing the skill 10.2.2 Ordering pizza with Alexa 10.3 Taste it! 10.3.1 Exercise 10.3.2 Solution 10.4 End of part 2: special exercise Part 3 Next steps 11 Testing, Testing, 1, 2, 3 11.1 Testing server-hosted and serverless applications 11.2 How to approach testing serverless applications 11.3 Preparation 11.4 Unit tests 11.5 Mocking your serverless functions 11.6 Integration tests 11.7 Other types of automated testing 11.8 A step beyond: Writing testable serverless functions 11.9 Taste it! 11.9.1 Exercise 11.9.2 Solution 12 Paying for pizza 12.1 Payment transactions 12.1.1 Implementing an online payment 12.2 Implementing your payment service 12.3 Could someone hack your payment service? 12.3.1 Standards 12.3.2 Competence 12.4 Taste it! 12.4.1 Exercise 12.4.2 Solution 13 Migrating your existing 13.1 Uncle Roberto?s taxi application 13.2 Running an Express.js application in AWS Lambda 13.2.1 Proxy integration 13.2.2 How serverless-express works 13.3 Serving static content 13.4 Connecting to MongoDB 13.4.1 Using a managed MongoDB database with your serverless Express.js app 13.5 Limitations of serverless Express.js applications 13.6 Taste it! 13.6.1 Exercise 13.6.2 Solution 14 Migrating to serverless 14.1 Analyzing your current serverless application 14.2 Migrating your existing application to serverless 14.3 Embrace the platform 14.3.1 Serving static files 14.3.2 Storing state 14.3.3 Logs 14.3.4 Continuous integration 14.3.5 Managing environments: production and development 14.3.6 Sharing secrets 14.3.7 VPC (Virtual Private Cloud) 14.4 Optimizing your application 14.4.1 Bundled or single-purpose functions 14.4.2 Choosing the right memory size for your Lambda function 14.5 Facing the challenges 14.5.1 Handling timeouts 14.5.2 Cold starts 14.5.3 DDoS attacks 14.5.4 Vendor lock-in 14.6 Taste it! 15 Real-world case studies 15.1 CodePen 15.1.1 Before serverless 15.1.2 Serverless migration 15.1.3 Cost of the infrastructure 15.1.4 Testing and challenges 15.2 MindMup 15.2.1 Before serverless 15.2.2 Serverless migration 15.2.3 Cost of the infrastructure 15.2.4 Testing, logs, and challenges index
Similar books
MySQL® Notes for Professionals book
2018 · PDF
MrExcel 2022: Boosting Excel
2022 · PDF
MrExcel 2022: Boosting Excel
2022 · PDF
Session C11: Ancient Cultural Landscapes in South Europe – their Ecological Setting and Evolution, Session C22: Gardeners from South America, Session S04: Agro-Pastoralism and Early Metallurgy Sessions, Session WS29: The Idea of Enclosure in Recent Iberian Prehistory, Session C88: Rhytmes et causalites des dynamiques de l'anthropisation en Europe entre 6500 ET 500 BC: Hypotheses socio-culturelles et/ou climatiques: Proceedings of the XV UISPP World Congress (Lisbon 4-9 September 2006) / Actes du XV Congrès Mondial (Lisbonne 4-9 Septembre 2006) Vol.36
2010 · PDF
THE BRITISH ARMY IN INDIA: ITS PRESERVATION BY AN APPROPRIATE CLOTHING, HOUSING, LOCATING, RECREATIVE EMPLOYMENT, AND HOPEFUL ENCOURAGEMENT OF THE TROOPS. with AN APPENDIX ON INDIA : THE CLIMATE OP ITS HILLS ; THE DEVELOPMENT OF ITS RESODRCBS, INDUSTRY, AND ARTS ; THE ADMINISTRATION OF JUSTICE ; THE BLACK ACT ; THE PROGRESS OF CHRISTIANITY ; THE TRAFFIC IN OPIUM ; THE VALUE OF INDIA ; PERMANENT CAUSES OF DISAFFECTION, AND OF THE RECENT REBELLION ; THE TRADITIONARY POLICY; MISGOVERNMENT BY NATIVE RULERS ; ANNEXATIONS OF THEIR TERRITORY, ETC.
1858 · PDF
Idries Shah 27 Books Collection : A Perfumed Scorpion, A Veiled Gazelle, Caravan of Dreams, Darkest England, Destination Mecca, Evenings with Idries Shah, Knowing How to Know, Learning How to Learn, Letters and Lectures of Idries Shah, Neglected aspects of Sufi study, Observations, Oriental Magic, Reflections, Seeker after Truth, Special Illumination, Special Problems in the study of Sufi ideas, Sufi thought and action, Tales of the Dervishes, The Dermis Probe, The Elephant in the Dark, The Englishman Handbook, Idries Shah Antology, The Magic Monastery, The natives are restless, wisdom of the Idiots PDF.
2022 · PDF
The travels of Capts. Lewis and Clarke from St. Louis, by way of the Missouri and Columbia rivers, to the Pacific ocean; performed in the years 1804, 1805 & 1806, by order of the government of the United States. Containing delineations of the manners, customs, religion, &c. of the Indians, comp. from various authentic sources, and original documents, and a summary of the Statistical view of the Indian nations, from the official communication of Meriwether Lewis. Illustrated with a map of the country, inhabited by the western tribes of Indians
1809 · PDF
Professional Linux kernel architecture ''Wrox programmer to programmer''--Cover. - ''What you are reading right now is the result of an evolution over more than seven years: After two years of writing, the first edition was published in German by Carl Hanser Verlag in 2003. It then described kernel 2.6.0. The test was used as a basis for the low-level design documentation for the EAL4+ security evaluation of Red Hat Enterprise Linux 5, requiring to update it to kernel 2.6.18 (if the EAL acronym does not mean anything to you, then Wikipedia is once more your friend). Hewlett-Packard sponsored the translation into English and has, thankfully, granted the rights to publish the result. Updates to kernel 2.6.24 were then performed specifically for this book''--P. ix
2008 · PDF