وبلاگ بلیان

Beginning Amazon Web Services with Node.js

معرفی کتاب «Beginning Amazon Web Services with Node.js» نوشتهٔ Adam Shackelford (auth.)، منتشرشده توسط نشر Apress در سال 2015. این کتاب در فرمت pdf، زبان انگلیسی ارائه شده است. «Beginning Amazon Web Services with Node.js» در دستهٔ بدون دسته‌بندی قرار دارد.

Beginning Amazon Web Services with Node.js teaches any novice Node.js developer to configure, deploy, and maintain scalable small to large scale Node.js applications in Amazon Web Services. Hosting a Node.js application in a production environment usually means turning to PaaS hosting, but this approach brings problems. Deploying Node.js directly to AWS solves the problems you encounter in these situations, enabling you to cut out the middle man. You will begin with a basic RESTful web service in Node.js, using the popular Express.js framework, pre-built and ready to run in your local environment. You will be introduced to the most powerful tools in AWS, and learn how to configure your project to take advantage of them. You will be guided through the steps of getting the various key components to work together on AWS. Through code samples using the AWS JavaScript SDK and tutorials in the AWS console, you will gain the knowledge to incorporate secure user authentication, server auto-scaling, a load balancer, CDN, customized caching behavior, and outage monitoring. Node.js is single-threaded, and designed to run high input / high output applications, making it ideal for the cloud environment. If your main task is handling a high volume of requests over HTTP / the web, it will scale very well in proportion to the computing power you allocate to it. Amazon Web Services offers a broad set of services that help organizations move faster, lower costs, and scale applications. Trusted by the largest enterprises and start-ups alike, AWS powers a wide variety of workloads across a broad spectrum. If leveraged properly, you can build a Node.js app on AWS which can automatically power itself up to handle a massive volume of traffic, and then scale back down to a lighter configuration when user demand has dropped. Amazon Web Services offers a broad set of services that help organizations move faster, lower costs, and scale applications. Get started with Node.js and AWS using this book today. What you’ll learn ● Using AWS Opsworks to architect and configure a secure web application built for hosting in the cloud. ● Integrating AWS Cloudwatch, SES, and other AWS services into your code. ● Using AWS Route 53 to configure your domain to use a load balancer, CDN, and other performance-enhancing services into your application. ● Deploying with AWS Opsworks and using AWS services to monitor, scale, and maintain your application. Who this book is for This book is intended for a beginner/novice Node.js developer who has traditionally relied on PaaS services such as Heroku or Parse to host their web applications. This book aims to empower the reader to work directly in AWS, in order to manage their own infrastructure. Hosting a Node.js application in a production environment usually means turning to PaaS hosting such as Heroku or AppFog, but this approach brings problems. Deploying Node.js directly to AWS solves the problems you encounter in these situations, enabling you to cut out the middle man. If leveraged properly, you can build a Node.js app on AWS which can automatically power itself up to handle a massive volume of traffic, and then scale back down to a lighter configuration when user demand has dropped. Table of Contents 1. Getting Started with Amazon Web Services 2. Working with AWS OpsWorks 3. OpsWorks Part II: Databases and Scaling 4. CloudFront and DNS Management 5. Simple Storage Service and Content Delivery 6. Simple Email Service 7. Monitoring the Application 8. Securing The Application Contents at a Glance 3 Contents 240 About the Author 246 About the Technical Reviewer 247 Acknowledgments 248 Preface 249 Chapter 1: Getting Started with Amazon Web Services 4 Understanding the Cloud 4 The Approach in This Book 5 Requirements 7 AWS Account 7 Domain Registration 9 SSL Certificate 9 Code Repository 9 Download the Sample Project 9 Local Environment 9 ExpressJS 10 Sample Project 10 Overview 10 Source Code Organization 11 Configuration and Startup 12 Working with the Sample App 13 Home Route 13 Users Route 14 Review—The Order of Things 16 Example—Working with Parameters 17 Try It Out 18 Albums 19 Photos 23 Developing with the Sample App 25 Identity and Access Management 25 The IAM Dashboard 26 IAM Users 27 IAM Groups 28 IAM Managed Policies 28 IAM Permissions Editor 30 Summary 32 Chapter 2: Working with AWS OpsWorks 33 Understanding OpsWorks 33 Allocating Resources 34 Regions and Availability Zones 35 Additional IAM Roles 37 Instance Role 37 Service Role 38 The OpsWorks Environment 42 The OpsWorks Dashboard 44 Stacks 44 Amazon Linux 46 Amazon Machine Images 46 Instance vs. EBS 46 Stack Options—Summary 47 Layers 48 Creating an OpsWorks Layer 48 Instances 50 Apps 53 Application Source 54 Deploying from Git 55 Deploying from Subversion 56 Deploying from HTTP Archive 56 Deploying from S3 Archive 56 Creating your App 58 Deploying Your App 59 Summary 61 Chapter 3: OpsWorks Part II: Databases and Scaling 62 Relational Database Service (RDS) 62 Multi-AZ Deployment 63 Read Replicas 64 Provisioned IOPS Storage 66 DB Security Groups 66 Creating an RDS Database 69 Instance Specifications 71 Settings 72 Advanced Settings 72 Database Import 73 OpsWorks RDS Layer 75 Environments and Environment Variables 76 Stack Commands: Backup Scenario 80 RDS Snapshot 80 Creating a New RDS Layer 81 Connect New Database Layer to App 82 Run Stack Command 82 Elastic Load Balancing (ELB) 84 Creating a Load Balancer 85 Define Load Balancer 85 Configure Health Check 86 Add EC2 Instances 87 Add Tags 87 Review 88 OpsWorks ELB Layer 89 Adding a New Instance 91 Summary 93 Chapter 4: CloudFront and DNS Management 94 CloudFront 95 Creating the Distribution 95 Configuring the Distribution 96 Origin Settings 96 Default Cache Behavior Settings 97 Distribution Settings 101 Price Class 101 Alternate Domain Names 101 SSL Certificate 101 Default Root Object 102 Distribution Settings—Summary 102 Distribution Detail View 103 Origins 104 Behaviors 104 Behavior with Query Strings 107 Deploy Code Changes 108 Add New Behavior 108 Caching 109 Invalidations 111 Controlling Caching 112 Testing CloudFront Caching 113 Cache Statistics 116 Route 53 118 Summary 121 Chapter 5: Simple Storage Service and Content Delivery 122 Using S3 in the Application 123 Creating an S3 Bucket 123 Enabling S3 Access in IAM 125 Storing Credentials 125 Implementing IAM Roles 126 Using IAM User Credentials 127 Adding OpsWorks Environment Variables 128 Developing with the AWS SDK 129 Updating Dependencies 129 Accessing Environment Variables 131 Handling File Uploads 133 Updating the Database Schema 138 Integrating with CloudFront 139 Creating CloudFront S3 Origin 139 CloudFront S3 Behavior 140 Finishing Touches 142 Absolute URLs 143 Enhanced Image Caching 145 Summary 146 Chapter 6: Simple Email Service 147 Introducing Simple Email Service 147 Exploring the SES Dashboard 148 SES Verification 149 E-mail Address Verification 150 Domain Verification 152 Managing SES Permissions with IAM 155 Using SES with the AWS SDK 158 Globals 159 Mail.js 160 User Registration Route 162 Deployment and Testing 163 AWS Resource Groups 164 Tagging Resources 165 Creating and Viewing Resource Groups 167 Summary 169 Chapter 7: Monitoring the Application 170 CloudWatch 170 CloudWatch Alarms 174 Alarm Periods 175 Simple Notification Service (SNS) 175 Creating a CloudWatch Alarm 178 Defining an Alarm 179 Alarm State 181 Using OpsWorks with CloudWatch 182 Load-Based Instances 183 OpsWorks Auto-scaling Rules 184 Auto-scaling Scenario 1 185 Auto-scaling Scenario 2 185 Auto-scaling Scenario 3 187 Auto-scaling Scenario 4 188 Time-Based Instances 188 Using Alarms with OpsWorks 190 ELB Monitoring 190 Auto-scaling Summary 193 RDS Alarms 193 CloudWatch Logs 195 EC2 Instance Roles 195 Using Chef in OpsWorks 197 Installing Cookbooks and Recipes 197 CloudWatch Logs 199 Application Log Stream 200 Custom CloudWatch Logging Class (cwlogs) 201 Integrating cwlogs 203 Exception Handling 204 Summary 207 Chapter 8: Securing the Application 208 Using HTTPS 208 SSL Certificate Generation 209 Installing OpenSSL 210 Creating a Key and CSR 210 Request Certificate 211 The AWS Command-Line Interface (CLI) 213 Configuring Permissions 213 Uploading the SSL Certificates 215 Enabling HTTPS in CloudFront 216 Enabling HTTPS in ELB 219 Listening for HTTPS Connections 219 Enabling Cookie Stickiness 220 Modifying the Security Group 221 Application Security 223 Adding Session and Encryption Modules 223 Adding Password Encryption 224 Using Secure Sessions 226 Conclusion 231 Index 232 __Beginning Amazon Web Services with Node.js__You will begin with a basic RESTful web service in Node.js, using the popular Express.js framework, pre-built and ready to run in your local environment. You will be introduced to the most powerful tools in AWS, and learn how to configure your project to take advantage of them. You will be guided through the steps of getting the various key components to work together on AWS. Through code samples using the AWS JavaScript SDK and tutorials in the AWS console, you will gain the knowledge to incorporate secure user authentication, server auto-scaling, a load balancer, CDN, customized caching behavior, and outage monitoring. Node.js is single-threaded, and designed to run high input / high output applications, making it ideal for the cloud environment. If your main task is handling a high volume of requests over HTTP / the web, it will scale very well in proportion to the computing power you allocate to it. Amazon Web Services offers a broad set of services that help organizations move faster, lower costs, and scale applications. Trusted by the largest enterprises and start-ups alike, AWS powers a wide variety of workloads across a broad spectrum. If leveraged properly, you can build a Node.js app on AWS which can automatically power itself up to handle a massive volume of traffic, and then scale back down to a lighter configuration when user demand has dropped. Amazon Web Services offers a broad set of services that help organizations move faster, lower costs, and scale applications. Get started with Node.js and AWS using this book today. ## What you’ll learn ● Integrating AWS Cloudwatch, SES, and other AWS services into your code.● Using AWS Route 53 to configure your domain to use a load balancer, CDN, and other performance-enhancing services into your application.● Deploying with AWS Opsworks and using AWS services to monitor, scale, and maintain your application.## Who this book is for This book is intended for a beginner/novice Node.js developer who has traditionally relied on PaaS services such as Heroku or Parse to host their web applications. This book aims to empower the reader to work directly in AWS, in order to manage their own infrastructure. Hosting a Node.js application in a production environment usually means turning to PaaS hosting such as Heroku or AppFog, but this approach brings problems. Deploying Node.js directly to AWS solves the problems you encounter in these situations, enabling you to cut out the middle man. If leveraged properly, you can build a Node.js app on AWS which can automatically power itself up to handle a massive volume of traffic, and then scale back down to a lighter configuration when user demand has dropped. ## Table of Contents 1. Getting Started with Amazon Web Services2. Working with AWS OpsWorks3. OpsWorks Part II: Databases and Scaling4. CloudFront and DNS Management5. Simple Storage Service and Content Delivery6. Simple Email Service7. Monitoring the Application8. Securing The Application "Beginning Amazon Web Services with Node.js teaches anyone new to Node.js development how to configure, deploy, and maintain scalable Node.js applications, from small to large, in Amazon Web Services. Hosting a Node.js application in a production environment usually means turning to PaaS hosting solutions, but this approach is often fraught with problems. Deploying Node.js directly to AWS solves the problems you encounter in those situations and enables you to cut out the middle man. Noted expert Adam Shackelford gets you started with a basic RESTful web service in Node.js, using the popular Express.js framework, which is pre-built and ready to run in your local environment. The book then introduces you to the most powerful tools in AWS, and you learn how to configure your project to take advantage of them. The book also guides you through the steps of getting the various key components to work together on AWS. Through code samples using the AWS JavaScript SDK and tutorials in the AWS Console, you gain the knowledge to incorporate secure user authentication, server auto-scaling, a load balancer, CDN, customized caching behavior, and outage monitoring"-- Back cover Adam Shackelford. Integrate A Restful Web Service Built In Node.js Into Amazon Web Services--cover. Includes Index.
دانلود کتاب Beginning Amazon Web Services with Node.js