AWS Cookbook
by John Culkin and Mike Zazon
Copyright 2021 Culkins Coffee Shop LLC and Mike Zazon. All rights reserved.
Printed in the United States of America.
Published by OReilly Media, Inc. , 1005 Gravenstein Highway North, Sebastopol, CA 95472.
OReilly books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles (http://oreilly.com). For more information, contact our corporate/institutional sales department: 800-998-9938 or corporate@oreilly.com .
- Acquisitions Editor: Jennifer Pollock
- Development Editor: Virginia Wilson
- Production Editor: Christopher Faucher
- Interior Designer: David Futato
- Cover Designer: Karen Montgomery
- Illustrator: OReilly Media, Inc.
- December 2021: First Edition
Revision History for the Early Release
- 2020-12-11: First Release
- 2021-02-19: Second Release
- 2021-04-14: Third Release
See http://oreilly.com/catalog/errata.csp?isbn=9781492092605 for release details.
The OReilly logo is a registered trademark of OReilly Media, Inc. AWS Cookbook, the cover image, and related trade dress are trademarks of OReilly Media, Inc.
The views expressed in this work are those of the authors, and do not represent the publishers views. While the publisher and the authors have used good faith efforts to ensure that the information and instructions contained in this work are accurate, the publisher and the authors disclaim all responsibility for errors or omissions, including without limitation responsibility for damages resulting from the use of or reliance on this work. Use of the information and instructions contained in this work is at your own risk. If any code samples or other technology this work contains or describes is subject to open source licenses or the intellectual property rights of others, it is your responsibility to ensure that your use thereof complies with such licenses and/or rights.
978-1-492-09253-7
Preface
A note for Early Release readers
With Early Release ebooks, you get books in their earliest formthe authors raw and unedited content as they writeso you can take advantage of these technologies long before the official release of these titles.
This will be the Preface of the final book. If you have feedback or content suggestions for the authors, please emailawscookbook@gmail.com.
The vast majority of workloads will go to the cloud.
Were just at the beginningtheres so much more to happen.
Andy Jassy
Cloud usage has been gaining traction with enterprises and small businesses over the last decade and continues to accelerate. Gartner said the Worldwide IaaS Public Cloud Services Market grew 37.3% in 2019. We wrote this book to share some of our knowledge and enable you to quickly acquire useful skills for working in the cloud. We hope that you will find yourself using this book as reference material for many years to come.
Amazon Web Services (AWS) is the recognized leader in Cloud Infrastructure and Platform services. Through our years of experience we have had the benefit of working on AWS projects in many different roles. We have learned that developers are often looking for guidance on how and when to use AWS services. We would now like to share some of the learnings with you and give you a leg up.
What You Will Learn
In addition to enriching your pocketbook, being able to harness the power of AWS will give you the ability to create powerful systems and applications that solve many interesting and demanding problems in our world today. The on-demand consumption model, vast capacity, advanced capabilities, and global footprint of the cloud create new possibilities that need to be explored. Would you like to handle 60,000 cyber threats per second using AWS Machine Learning like Siemens? If so, the practical examples in this book will help expedite your learning by providing tangible examples showing how you can fit the building blocks of AWS together to form practical solutions that address common scenarios.
Who This Book is For
This book is for developers, engineers, and architects of all levels, from beginner to expert. The recipes in this book aim to bridge the gap between Hello World proofs of concept and enterprise grade applications by using applied examples with guided walk-throughs of common scenarios that you can directly apply to your current or future work. These skillful and experience-building tasks will immediately deliver value regardless of your AWS experience level.
The Recipes
We break the book up into chapters which focus on general functional areas of IT (e.g: networking, databases, etc). The recipes contained within the chapters are bite-sized, self-contained, and quickly consumable. Each recipe has a Problem Statement, Solution, and Discussion. Problem statements are tightly defined to avoid confusion. Solution Steps walk you through the work needed to accomplish the goal. We include code (https://github.com/awscookbook) to follow along with and reference later when you need it. Finally, we end each recipe with a short discussion to help you understand the process, ways to utilize in practice, and suggestions to extend the solution.
Some recipes will be built from scratch and others will allow you to interact with common scenarios seen in the real world. If needed, foundational resources will be pre-baked before you start the recipe. When preparation for a recipe is needed, you will use the AWS Cloud Development Kit which is a fantastic tool for intelligently defining and declaring infrastructure.
Note
There are many ways to achieve similar outcomes on AWS, this will not be an exhaustive list. Many factors will dictate what overall solution will have the best fit for your use case.
Youll find recipes for things like:
Organizing multiple accounts for enterprise deployments
Creating a chatbot that can pull answers from a knowledge repository
Automating security group rule monitoring, looking for rogue traffic flows
Also with recipes, well also provide one and two liners that will quickly accomplish valuable and routine tasks.
What Youll Need
Here are the requirements to get started and some tips on where to find assistance:
Personal Computer/Laptop
Software
Web Browser
Terminal with Bash
Git
Homebrew
AWS account
Code editor
aws-cli/2.1.1 Python/3.9.0 or later (Can be installed with Homebrew)
Python 3.7 (and pip) or later (Can be installed with Homebrew)
AWS Cloud Development Kit (Can be installed with Homebrew)
Note
Please ensure that you are using the latest version of AWS CLI