Amazon EC2 Cookbook
eBook - ePub

Amazon EC2 Cookbook

  1. 194 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Amazon EC2 Cookbook

About this book

Over 40 hands-on recipes to develop and deploy real-world applications using Amazon EC2

About This Book

  • Design and build applications using Amazon EC2 and a range of supporting AWS tools
  • Find highly effective solutions to your AWS Cloud-based application development, deployment, and infrastructural issues
  • A comprehensive set of recipes to implement your product's functional and non-functional requirements

Who This Book Is For

This book is targeted at Cloud-based developers who have prior exposure to AWS concepts and features. Some experience in building small applications and creating some proof-of-concept applications is required.

What You Will Learn

  • Select and configure the right EC2 instances
  • Create, configure, and secure a Virtual Private Cloud
  • Create an AWS CloudFormation template
  • Use AWS Identity and Access Management to secure access to EC2 instances
  • Configure auto-scaling groups using CloudWatch
  • Choose and use the right data service such as SimpleDB and DynamoDB for your cloud applications
  • Access key AWS services using client tools and AWS SDKs
  • Deploy AWS applications using Docker containers

In Detail

Amazon Elastic Compute Cloud (Amazon EC2) is a web service that provides flexible and resizable compute capacity in the cloud. The main purpose of Amazon EC2 is to make web-scale cloud computing easier for the developers. It offers developers and companies the raw building blocks like load balancers, object stores and virtual machines running on general hardware (that is, Amazon runs a multitude of hardware components but presents them as a generic utility to its users) with accessible APIs in order to create scalable software products

This book covers designing, developing, and deploying scalable, highly available, and secure applications on the AWS platform. By following the steps in the recipes, you will be able to effectively and systematically resolve issues related to development, deployment, and infrastructure for enterprise-grade cloud applications or products.

This book starts with helping you choose and configure the right EC2 instances to meet your application-specific requirements. The book then moves on to creating a CloudFormation template and will teach you how to work with stacks. You will then be introduced to using IAM services to configure users, groups, roles, and multi-factor authentication. You will also learn how to connect AD to AWS IAM. Next, you will be using AWS data services and accessing other AWS services including Route 53, Amazon S3, and AWS SES (Amazon Simple Email Service). Finally, you will be deploying AWS applications using Docker containers.

Style and approach

This book contains a rich set of recipes that cover not only the full spectrum of real-world cloud application development using Amazon EC2, but also the services and security of the applications. The book contains easy-to-follow recipes with step-by-step instructions to leverage EC2 within your applications.

Tools to learn more effectively

Saving Books

Saving Books

Keyword Search

Keyword Search

Annotating Text

Annotating Text

Listen to it instead

Listen to it instead

Information

Amazon EC2 Cookbook


Table of Contents

Amazon EC2 Cookbook
Credits
About the Authors
About the Reviewer
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Instant updates on new Packt books
Preface
What this book covers
What you need for this book
Who this book is for
Sections
Getting ready
How to do it…
How it works…
There's more…
See also
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Selecting and Configuring Amazon EC2 Instances
Introduction
Choosing the right AWS EC2 instance types
How to do it…
Preparing AWS CLI tools
How to do it…
Getting access key ID and secret access key
Installing AWS CLI using pip in Linux
Installing AWS CLI using pip in Windows/Mac
Launching EC2 instances using EC2-Classic and EC2-VPC
Getting started…
How to do it…
Launching the EC2 instance in EC2-Classic
Launching the EC2 instance in VPC
See also
Allocating Elastic IP addresses
How to do it…
See also
Creating an instance with multiple NIC cards and a static private IP address
How to do it…
Creating a network interface
Attaching the network interface to an instance
Associating the EIP to the ENI
See also
Selecting the right storage for your EC2 instance
How to do it…
Creating an EBS volume
Attaching the volume
Creating tags for consistency
How to do it…
Creating tags for one or more AWS resources
Configuring security groups
How to do it…
Creating a security group for EC2-Classic
Creating a security group for EC2-VPC
Adding an inbound rule
Adding an outbound rule
Adding the security group to an instance
Creating an EC2 key pair
How to do it…
Creating a key pair
Grouping EC2 instances using placement groups
How to do it…
Creating a placement group
Placing instances in the placement group
Configuring Elastic Load Balancing
How to do it…
Creating an Internet-facing ELB with listeners
Configuring health checks on ELB
Adding instances to the ELB
Architecting for high availability
How to do it…
Creating instances for AWS Marketplace
How to do it…
Creating an AMI from EC2 instance
Making the AMI public
2. Configuring and Securing a Virtual Private Cloud
Introduction
Creating and configuring VPC
How to do it…
How it works…
Configuring VPC DHCP options
How to do it…
How it works…
Configuring networking connections between two VPCs (VPC peering)
How to do it…
How it works…
Connecting on-premise network to VPC using VPN
How to do it…
How it works…
3. Managing AWS Resources Using AWS CloudFormation
Introduction
Creating CloudFormation templates
How to do it…
How it works…
There's more…
Creating CloudFormation templates from existing AWS resources
How to do it…
How it works…
Deploying applications on EC2 instances
How to do it…
How it works…
Updating a stack
How to do it…
How it works…
4. Securing Access to Amazon EC2 Instances
Introduction
Creating IAM users
How to do it…
How it works…
Creating IAM groups and assigning group-level permissions
How to do it…
How it works…
Creating IAM roles
How to do it…
How it works…
There's more…
Connecting on-premise AD to AWS IAM
How to do it…
How it works…
Configuring AWS multifactor authentication
How to do it…
How it works…
There's more…
5. Monitoring Amazon EC2 Instances
Introduction
Collecting EC2 metrics using AWS CloudWatch
How to do it…
How it works…
Collecting custom metrics from EC2 instances
How to do it…
How it works…
There's more…
Monitoring costs using CloudWatch
How to do it…
Enabling the monitoring of your estimated charges
How it works…
Sending an e-mail based on a CloudWatch alarm
How to do it…
How it works…
Using CloudWatch Logs
How to do it…
How it works…
There's more…
6. Using AWS Data Services
Introduction
Using Amazon SimpleDB services from a Java program
How to do it…
How it works…
There's more…
Using Amazon DynamoDB
How to do it…
How it works…
There's more…
Using Amazon ElastiCache
How to do it…
Working with ElasticCache
How it works…
There's more…
Using Amazon RDS
How to do it…
How it works…
7. Accessing Other AWS Services
Introduction
Configuring Route 53
How to do it…
How it works…
There's more…
Accessing AWS S3 from applications
How to do it…
How it works…
There's more…
Accessing AWS SES from applications
How to do it…
How it works…
There's more…
Accessing AWS SNS from applications
How to do it…
How it works…
There's more…
Accessing AWS SQS from applications
How to do it…
How it works…
There's more…
8. Deploying AWS Applications
Introduction
Using Docker containers for AWS deployments
How to do it…
Installing Docker
Creating a Dockerfile
Building an image from the Dockerfile
Creating Docker container
Checking the container status
How it works…
There's more…
Using Chef for AWS deployments
How to do it…
Installing the knife-ec2 plugin
Configuring Chef Provisioner node with knife-ec2 plugin
Configuring Chef Provisioner node
Creating cookbooks and recipes
Starting Chef client from the provisioning node
How it works…
There's more…
Using Puppet for AWS deployments
How to do it…
Installing Puppet AWS module in Puppet master
Launching an EC2 instance with Puppet agent
How it works…
There's more…
Index

Amazon EC2 Cookbook

Copyright Ā© 2015 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: November 2015
Production reference: 1241115
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78528-004-7
www.packtpub.com

Credits

Authors
Sekhar Reddy
Aurobindo Sarkar
Reviewer
Mark Takacs
Commissioning Editor
Amarabha Banerjee
Acquisitio...

Table of contents

  1. Amazon EC2 Cookbook

Frequently asked questions

Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription
No, books cannot be downloaded as external files, such as PDFs, for use outside of Perlego. However, you can download books within the Perlego app for offline reading on mobile or tablet. Learn how to download books offline
Perlego offers two plans: Essential and Complete
  • Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
  • Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Both plans are available with monthly, semester, or annual billing cycles.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 990+ topics, we’ve got you covered! Learn about our mission
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more about Read Aloud
Yes! You can use the Perlego app on both iOS and Android devices to read anytime, anywhere — even offline. Perfect for commutes or when you’re on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app
Yes, you can access Amazon EC2 Cookbook by Sekhar Reddy, Aurobindo Sarkar in PDF and/or ePUB format, as well as other popular books in Computer Science & Cloud Computing. We have over one million books available in our catalogue for you to explore.