115
1 © 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved. Getting Started with AWS Technical Bootcamp Tom Woodyer [email protected] Raphael Sack [email protected]

Bootcamp: Getting Started on AWS

Embed Size (px)

Citation preview

Page 1: Bootcamp: Getting Started on AWS

1© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Getting Started with AWS Technical Bootcamp

Tom Woodyer [email protected] Sack [email protected]

Page 2: Bootcamp: Getting Started on AWS

2© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

AgendaØ AWS Introduction and HistoryØ Infrastructure Services

• Lab 1: Building a Web ServerØ Security, Identity, and Access Management

• Lab 2: IAMØ Databases

• Lab 3: Adding a Database for your Web ServerØ AWS Elasticity and Management Tools

• Lab 4: Adding a load balancer• Lab 5: Creating an auto-­scaling group• Lab 6: Multi AZ Deployment for HA

Page 3: Bootcamp: Getting Started on AWS

3© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Amazon History

1994: Jeff Bezos Incorporated the

Company

1995: Amazon.com Launched Online

Bookstore

2005: Amazon Publishing Launched

2006: Amazon Web

Services (AWS)

Launched

2007: Kindle

Launched

2011: Amazon Fresh

Launched

2012: Amazon Game Studios Launched

2013: Amazon Art

Launched

2014: Amazon Prime Now

Launched

2015: Amazon Home

Services & Amazon Echo

Launched

Page 4: Bootcamp: Getting Started on AWS

4© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Amazon Web Services (AWS)

ComputeMessaging

Mobile

App ServicesDatabaseNetworking

Development and Management Tools

Payments

VPCOn-­Demand Workforce

Analytics Content Delivery

StorageEnable businesses and developers to use web services to build scalable, sophisticated applications.

Page 5: Bootcamp: Getting Started on AWS

5© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

AWS Rapid Pace of Innovation

2009

48

159

722

82

2011 2013 2015

New Features/Services Launched

Page 6: Bootcamp: Getting Started on AWS

6© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

AWS Direct Connect

AWS Elastic Beanstalk

AWS GovCloud

Amazon CloudTrail

Amazon S3

Amazon WorkSpaces

Amazon Kinesis

Amazon AppStream

Amazon SNS

AWS IAM

Amazon Route 53

Amazon SWF

Amazon Redshift

Amazon Dynamo DB

Amazon CloudSearch

AWS Data Pipeline

Trusted Advisor

AWS KMS

Amazon Config

Amazon RDS for Aurora

Amazon WorkDocs

AWS Directory Service

AWS CodeCommit

AWS CodePipeline

AWS Service Catalog

Amazon CloudWatch Logs

Amazon EFS

Amazon API Gateway

Amazon Machine Learning

AWS Device Farm

AWS Web App Firewall

Amazon Elasticsearch Service

Amazon QuickSight

AWS Import/Export Snowball

RDS for MariaDB

Amazon InspectorAWS IoT

Amazon EC2 ContainerRegistry

Amazon ElastiCache

AWS CloudFormation

Amazon Mobile Analytics

AWS Mobile Hub

AWS Storage GatewayAWS OpsWorks

AWS Elastic TranscoderAmazon SES

Amazon EC2Container Service

Amazon Cognito

AWS CodeDeploy

Glacier* As of 1 February 2016

Amazon WorkMail

AWS Lambda1,950Services and Features

Page 7: Bootcamp: Getting Started on AWS

7© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

AWS Customers

Enterprise Customers Startup Customers Public Sector Customers

Page 8: Bootcamp: Getting Started on AWS

8© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Six Advantages & Benefits of AWS Cloud Computing

Trade capital expense for variable expense.

Benefit from massive economies of scale.

Stop guessing capacity.

Go global in minutes.

Increase speed and agility.

Stop spending money on running and maintaining data centers.

Page 9: Bootcamp: Getting Started on AWS

9© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

AWS Core Infrastructure and Services

AWS Technical Essentials 3.8 ILT

Security

Network

Security

Network

Security Groups NACLs Access Mgmt

VPCVPCEC2 “Classic”

“Public”

ELBOn-­DemandProvision

Traditional Infrastructure Amazon Web Services

ServersAMI Amazon EC2 InstancesOn-­Premises Servers

SecuritySecurity Groups NACLs AWS IAMFirewalls ACLs Administrators

NetworkingVPCELBRouter Network Pipeline Switch

Storage and

DatabaseRDBMSDAS SAN NAS Amazon

EBSAmazonEFS

AmazonS3

AmazonRDS

Page 10: Bootcamp: Getting Started on AWS

10© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Compute Network Storage Security & Identity Applications

AWS Foundation Services

Amazon EC2

AWS Lambda

Amazon EC2 Container Service

AWS Elastic Beanstalk

Elastic Load Balancing

Amazon VPC

AWS Direct Connect

Amazon Route 53 Amazon S3

AmazonCloudFront

Amazon Elastic File System

Amazon Glacier

AWS Storage Gateway

AWS Import/Export Snowball

AWS Identity andAccess Management

AWS Directory Service

AWS Cloud HSM

AWS KMS

AWS WAF

Amazon WorkDocs

Amazon WorkSpaces

Auto Scaling

Amazon WorkMail

Page 11: Bootcamp: Getting Started on AWS

11© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Databases Analytics App Services Management Tools

Developer Tools

Mobile Services

Internet of Things

AWS Platform Services

Amazon RDS

Amazon DynamoDB

Amazon ElastiCache

Amazon Redshift

Amazon EMR

AWS Data Pipeline

Amazon Kinesis

Amazon Machine Learning

Amazon ElasticsearchService

Amazon API Gateway

Amazon AppStream

Amazon CloudSearch

Amazon Elastic

Transcoder

Amazon SES

Amazon SQS

Amazon SWF

Amazon CloudWatch

AWS CloudFormation

AWS CloudTrail

AWS Config

AWS OpsWorks

AWS Service Catalog

AWS CodeCommit

AWS CodeDeploy

AWS CodePipeline

AWS Device Farm

Amazon Mobile Analytics

Amazon Cognito

AmazonSNS

Mobile Hub

AWS IoT

Trusted Advisor

AWS Database Migration Service

AWS Certificate Manager

Page 12: Bootcamp: Getting Started on AWS

12© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

AWS Global Infrastructure

RegionsGeographic locationsConsists of at least two Availability Zones(AZs)

Availability ZonesClusters of data centersIsolated from failures in other Availability Zones

Page 13: Bootcamp: Getting Started on AWS

13© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

AWS Global Infrastructure

Page 14: Bootcamp: Getting Started on AWS

14© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

AWS Global Infrastructure

At least 2 AZs per region.Examples:Ø US East (N. Virginia)

• us-­east-­1a• us-­east-­1b• us-­east-­1c• us-­east-­1d• us-­east-­1e

Ø Asia Pacific (Tokyo)• ap-­northeast-­1a• ap-­northeast-­1b• ap-­northeast-­1c

Note: Conceptual drawing only. The number of Availability Zones (AZ) may vary.

US East (VA)

AZ -­ A AZ -­ B

AZ -­ C AZ -­ D

AZ -­ E

Asia Pacific (Tokyo)

AZ -­ A AZ -­ B

AZ -­ C

Page 15: Bootcamp: Getting Started on AWS

15© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Achieving High Availability Using Multi-­AZ

Availability Zone -­ A

Availability Zone -­ B

Availability Zone -­ C

Region

Page 16: Bootcamp: Getting Started on AWS

16© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

AWS Global Infrastructure

50+ AWS Edge Locations:Local points-­of-­presence commonly supporting AWS services like:Ø Amazon Route 53Ø Amazon CloudFront

Page 17: Bootcamp: Getting Started on AWS

17© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

AWS Management Console Demonstration

Page 18: Bootcamp: Getting Started on AWS

18© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Knowledge Check

Q: What is the AWS term for physically distinct groups of data centers within a region?

True or False: There are more regions than Edge locations.

True or False: AWS owns and maintains the infrastructure required for application services and you provision and use them as needed.

Q: How do AZs in the same region differ?

Availability Zone (AZ).

False.

True.

Each Availability Zone is isolated, but the Availability Zones in a region are connected through low-­latency links.

Page 19: Bootcamp: Getting Started on AWS

19© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Module 2AWS Infrastructure

Page 20: Bootcamp: Getting Started on AWS

20© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Amazon Elastic Compute Cloud (EC2)

Page 21: Bootcamp: Getting Started on AWS

21© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Amazon Elastic Compute Cloud (EC2)

Resizable compute capacityComplete control of your computing resourcesReduces the time required to obtain and boot new server instances to minutesAmazon

EC2

Page 22: Bootcamp: Getting Started on AWS

22© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Amazon EC2 Facts

Scale capacity as your computing requirements changePay only for capacity that you actually useChoose Linux or WindowsDeploy across AWS Regions and Availability Zones for reliability

Page 23: Bootcamp: Getting Started on AWS

23© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Launching an Amazon EC2 Instance via the Web Console1. Determine the AWS Region in which you want to launch the

Amazon EC2 instance.2. Launch an Amazon EC2 instance from a pre-­configured

Amazon Machine Image (AMI). 3. Choose an instance type based on CPU, memory, storage,

and network requirements.4. Configure network, IP address, security groups, storage

volume, tags, and key pair.

Page 24: Bootcamp: Getting Started on AWS

24© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Instances and AMIs

Select an AMI based on:RegionOperating systemArchitecture (32-­bit or 64-­bit)Launch permissionsStorage for the root device

AMI

Instances

Instance

Launch instances of any

type

Host computer

Host computer

Page 25: Bootcamp: Getting Started on AWS

25© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Amazon EBS vs. Amazon EC2 Instance Store

Amazon EBSØ Data stored on an Amazon EBS volume can persist independently of the life of the instance.

Ø Storage is persistent.Amazon EC2 Instance StoreØ Data stored on a local instance store persists only as long as the instance is alive.

Ø Storage is ephemeral.

Page 26: Bootcamp: Getting Started on AWS

26© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

AWS Marketplace – IT Software Optimized for the CloudAWS Marketplace:Is an online store to discover,

purchase, and deploy IT software on top of the AWS infrastructure.

Ø Catalog of 2300+ IT software solutions• Including Paid, BYOL, Open Source, SaaS, & free to try options

Ø Pre-­configured to operate on AWS• Software checked by AWS for security and operability

Ø Deploys to AWS environment in minutesØ Flexible, usage-­based billing modelsØ Software charges billed to AWS accountIncludes AWS Test Drive.

https://aws.amazon.com/marketplace

Page 27: Bootcamp: Getting Started on AWS

27© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Choosing the Right Amazon EC2 Instance

EC2 instance types are optimized for different use cases and come in multiple sizes. This allows you to optimally scale resources to your workload requirements.AWS uses Intel® Xeon® processors for EC2 instances, providing customers with high performance and value.Consider the following when choosing your instances: Core count, memory size, storage size and type, network performance, and CPU technologies.Hurry Up and Go Idle -­ A larger compute instance can save you time and money, therefore paying more per hour for a shorter amount of time can be less expensive.

Page 28: Bootcamp: Getting Started on AWS

28© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Intel® Processor Technologies

Intel® AVX – Get dramatically better performance for highly parallel HPC workloads such as life science engineering, data mining, financial analysis, or other technical computing applications. AVX also enhances image, video, and audio processing.Intel® AES-­NI – Enhance your security with these new encryption instructions that reduce the performance penalty associated with encrypting/decrypting data. Intel® Turbo Boost Technology – Get more computing power when you need it with performance that adapts to spikes in your workload with Intel® Turbo Boost Technology 2.0

Page 29: Bootcamp: Getting Started on AWS

29© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Instance Metadata & User Data

Instance Metadata:Is data about your instance.Can be used to configure or manage a running instance.

Instance User Data:Can be passed to the instance at launch.Can be used to perform common automated configuration tasks.Runs scripts after the instance starts.

Page 30: Bootcamp: Getting Started on AWS

30© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Adding User Data

You can specify user data when launching an instance.User data can be:Ø Linux script – executed by cloud-­initØ Windows batch or PowerShell scripts – executed by EC2Config service

User data scripts run once per instance-­id by default.

Page 31: Bootcamp: Getting Started on AWS

31© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Amazon EC2 Purchasing Options

On-­Demand Instances

Pay by the hour.

Reserved Instances

Purchase at significant discount.

Instances are always available.

1-­year to 3-­year terms.

Scheduled Instances

Purchase a 1-­year RI for a recurring period

of time.

Spot Instances

Highest bidder uses instance at a

significant discount.Spot blocks supported.

Dedicated Hosts

Physical host is fully dedicated to

run your instances. Bring your per-­socket, per-­core, or per-­VM software

licenses to reduce cost.

Page 32: Bootcamp: Getting Started on AWS

32© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Lab 1Building a Web Server

Page 33: Bootcamp: Getting Started on AWS

33© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Storage Services

Amazon S3 and Amazon EBS

Page 34: Bootcamp: Getting Started on AWS

34© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Amazon Simple Storage Service (S3)

Amazon S3

Storage for the Internet Natively online, HTTP accessStore and retrieve any amount of data, any time, from anywhere on the webHighly scalable, reliable, fast and durable

Page 35: Bootcamp: Getting Started on AWS

35© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Amazon S3 Concepts

Amazon S3 stores data as objects within bucketsAn object is composed of a file and optionally any metadata that describes that fileYou can have up to 100 buckets in each accountYou can control access to the bucket and its objects

Amazon S3

Bucket with

Objects

Bucket

Object

Page 36: Bootcamp: Getting Started on AWS

36© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Object Keys

An object key is the unique identifier for an object in a bucket.

http://doc.s3.amazonaws.com/2006-­03-­01/AmazonS3.html

Bucket Object/Key

Page 37: Bootcamp: Getting Started on AWS

37© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Amazon S3 Buckets

Organize the Amazon S3 namespace at the highest level.Identify the account responsible for storage and data transfer charges.Play a role in access control.Serve as the unit of aggregation for usage reporting.Have globally unique bucket names, regardless of the AWS region in which they were created.

Page 38: Bootcamp: Getting Started on AWS

38© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Amazon S3 Facts

Able to store an unlimited number of objects in a bucketObjects up to 5 TB;; no bucket size limitDesigned for 99.999999999% durability and 99.99% availability of objects over a given year HTTP/S endpoint to store and retrieve any amount of data, at any time, from anywhere on the webHighly scalable, reliable, fast, and inexpensiveOptional server-­side encryption using AWS or customer-­managed provided client-­side encryption Access logs for auditingProvides standards-­based REST and SOAP interfaces

Page 39: Bootcamp: Getting Started on AWS

39© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Amazon S3 Pricing

Pay only for what you useNo minimum feePrices based on location of your Amazon S3 bucketEstimate monthly bill using the AWS Simple Monthly CalculatorPricing is available as:Ø Storage PricingØ Request PricingØ Data Transfer Pricing: data transferred out of Amazon S3

Page 40: Bootcamp: Getting Started on AWS

40© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Amazon S3 Security

You can control access to buckets and objects with:Ø Access Control Lists (ACLs)Ø Bucket policiesØ Identity and Access Management (IAM) policiesYou can upload or download data to Amazon S3 via SSL encrypted endpoints. You can encrypt data using AWS SDKs.

Page 41: Bootcamp: Getting Started on AWS

41© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Amazon S3 Versioning

Protects from accidental overwrites and deletes with no performance penalty.Generates a new version with every upload.Allows easily retrieval of deleted objects or roll back to previous versions.Three states of an Amazon S3 bucketØ Un-­versioned (default)Ø Versioning-­enabledØ Versioning-­suspended

Versioning Enabled

Key: photo.gifID: 121212Key: photo.gifID: 111111

Page 42: Bootcamp: Getting Started on AWS

42© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Amazon S3 Storage Classes

Storage Class Durability Availability Other ConsiderationsAmazon S3 Standard

99.999999999% 99.99% None

Amazon S3 Standard -­InfrequentAccess (IA)

99.999999999% 99.99% • Retrieval fee associated with objects

• Most suitable for infrequently accessed data

Glacier 99.999999999% 99.99% (after you restore objects)

• Not available for real-­time access

• Must restore objects before you can access them

Page 43: Bootcamp: Getting Started on AWS

43© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Amazon Glacier

Long term low-­cost archiving serviceOptimal for infrequently accessed dataDesigned for 99.999999999% durability3-­5 hours retrieval timeLess than $0.01 per GB / month (depending on region)

Page 44: Bootcamp: Getting Started on AWS

44© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Amazon S3 Object Lifecycle

Lifecycle management defines how Amazon S3 manages objects during their lifetime. Some objects that you store in an Amazon S3 bucket might have a well-­defined lifecycle: Log filesArchive documentsDigital media archivesFinancial and healthcare recordsRaw genomics sequence dataLong-­term database backupsData that must be retained for regulatory compliance

Page 45: Bootcamp: Getting Started on AWS

45© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Instructor Demo

Amazon S3

Page 46: Bootcamp: Getting Started on AWS

46© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Amazon Elastic Block Store (EBS)

Persistent block level storage volumes offering consistent and low-­latency performanceAutomatically replicated within its Availability ZoneSnapshots stored durably in Amazon S3

Amazon EBS

Page 47: Bootcamp: Getting Started on AWS

47© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Amazon EBS Lifecycle

Vast amounts of unused space Create

Call CreateVolume1 GB to 16 TB

AttachCall AttachVolume to affiliate with one Amazon EC2 instance

Attached and In Use

• Format from Amazon EC2 instance OS• Mount formatted drive

CreateSnapshotSnapshot to Amazon S3

Detach

Call DetachVolume

Deleted

Call DeleteVolume

Page 48: Bootcamp: Getting Started on AWS

48© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Amazon EBS Facts

You can create:Ø EBS Magnetic volumes from 1 GiB to 1 TiB in size.Ø EBS General Purpose (SSD) and Provisioned IOPS (SSD) volumes up to 16 TiB in size.

You can use encrypted EBS volumes to meet a wide range of data at-­rest encryption requirements for regulated/audited data and applications.You can create point-­in-­time snapshots of EBS volumes, which are persisted to Amazon S3.

Page 49: Bootcamp: Getting Started on AWS

49© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Amazon EBS Use Cases

OS – Use for boot/root volume, secondary volumesDatabases – Scales with your performance needsEnterprise applications – Provides reliable block storage to run mission-­critical applicationsBusiness continuity – Minimize data loss and recovery time by regularly backing up using EBS SnapshotsApplications – Install and persist any application

Page 50: Bootcamp: Getting Started on AWS

50© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Amazon EBS Pricing

* Check Amazon EBS Pricing page for current pricing for all regions.

Pay for what you provision:Pricing based on regionAWS GovCloud (US) Pricing pageReview Pricing Calculator onlinePricing is available as:ØStorageØIOPS

Page 51: Bootcamp: Getting Started on AWS

51© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Amazon EBS and Amazon S3

Amazon EBS Amazon S3

Paradigm Block storage with file system Object store

Performance Very fast FastRedundancy Across multiple servers in an

Availability ZoneAcross multiple facilities in a Region

Security EBS Encryption – Data volumes and Snapshots

Encryption

Access from the Internet?

No (1) Yes (2)

Typical use case It is a disk drive Online storage

(1) Accessible from the Internet if mounted to server and set up as FTP, etc.(2) Only with proper credentials, unless ACLs are world-­readable

Page 52: Bootcamp: Getting Started on AWS

52© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Amazon EC2 Instance Storage

Local, complimentary direct attached block storage resource.Availability, number of disks, and size is based on EC2 instance type.Storage optimized instances for up to 365,000 Read IOPS and 315,000 First Write IOPS.SSD or magnetic.No persistence.All data is automatically deleted when an EC2 instance stops, fails or is terminated.

Page 53: Bootcamp: Getting Started on AWS

53© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Networking

Amazon VPC

Page 54: Bootcamp: Getting Started on AWS

54© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Amazon Virtual Private Cloud (VPC)

Provision a private, isolated virtual network on the AWS cloud.Have complete control over your virtual networking environment.

AmazonVPC

Page 55: Bootcamp: Getting Started on AWS

55© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

VPCs and Subnets

A subnet defines a range of IP addresses in your VPC.You can launch AWS resources into a subnet that you select.A private subnet should be used for resources that won’t be accessible over the Internet.A public subnet should be used for resources that will be accessed over the Internet.Each subnet must reside entirely within one Availability Zone and cannot span zones.

Page 56: Bootcamp: Getting Started on AWS

56© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Amazon VPC Example

Availability Zone A

Virtual Private Cloud

AWS Cloud

Public Subnet

Internet

Virtual Private Cloud

Availability Zone B

Private Subnet

Availability Zone C

VPN Only Subnet

DB Server DB Server

App Server

DB Server DB Server

DB Server

Web Server Web Server

NAT

Customer Network

R

Page 57: Bootcamp: Getting Started on AWS

57© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Security in Your VPC

Security groupsNetwork access control lists (ACLs) Subnet

10.0.0.0/24Subnet

10.0.1.0/24

Internet GatewayVPN Gateway

VPC Router10.0.0.0/16

Security Group Security Group

Security Group

Network ACL Network ACL

Routing Table Routing Table

instance instance instance instance

Page 58: Bootcamp: Getting Started on AWS

58© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Knowledge Check Answers

Q:What AWS service would help support your web application to offload serving static assets and store user uploaded images and video off-­instance?

Q:What acts as an additional layer of security at the subnet level in a VPC?

Q: True or False: S3 Provides unlimited storage.True

Amazon S3

Network ACLs

Page 59: Bootcamp: Getting Started on AWS

59© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Module 3Security, Identity, and Access

Management

Page 60: Bootcamp: Getting Started on AWS

60© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Shared Responsibility – AWSAW

S

Client-­side Data Encryption and Data Integrity Authentication

Server-­side Encryption (File System and/or Data)

Network Traffic Protection(Encryption/Integrity/Identity)

Platform, Applications, Identity and Access ManagementOperating System, Network and Firewall Configuration

Customer DataCustomer

Foundation ServicesCompute Storage Database Network

AWS Global Infrastructure Regions

Availability Zones Edge Locations

Page 61: Bootcamp: Getting Started on AWS

61© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Physical Security

24/7 trained security staffAWS data centers in nondescript and undisclosed facilitiesTwo-­factor authentication for authorized staffAuthorization for data center access

Page 62: Bootcamp: Getting Started on AWS

62© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Certifications and Accreditations

ISO 9001, ISO 27001, ISO 27017, ISO 27018, IRAP (Australia), MLPS Level 3 (China), MTCS Tier 3 Certification (Singapore) and more …

Page 63: Bootcamp: Getting Started on AWS

63© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

SSL/TLS Endpoints

VPC

Secure Transmission

Establish secure communication sessions (HTTPS) using SSL/TLS.

Instance Firewalls

Configure firewall rules for instances using Security Groups.

SSL Endpoints Security Groups

Network Control

In your Virtual Private Cloud, create low-­level networking constraints for resource access. Public and private subnets, NAT and VPN support.

SSL Endpoints

Page 64: Bootcamp: Getting Started on AWS

64© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Security Groups

SSL Endpoints Security Groups

Instance Firewalls

Configure firewall rules for instances using Security Groups.

VPC

Secure Transmission

Establish secure communication sessions (HTTPS) using SSL/TLS.

Network Control

In your Virtual Private Cloud, create low-­level networking constraints for resource access. Public and private subnets, NAT and VPN support.

Page 65: Bootcamp: Getting Started on AWS

65© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

AWS Multi-­Tier Security Groups

HTTP

SSH/RDP

Ports 80 and 443 only open to the Internet

Engineering staff have SSH/RDP access to Bastion Host

All other internet ports blocked by default

Bastion

Page 66: Bootcamp: Getting Started on AWS

66© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Amazon Virtual Private Cloud (VPC)

VPCSSL Endpoints Security Groups

Network Control

In your Virtual Private Cloud, create low-­level networking constraints for resource access. Public and private subnets, NAT and VPN support.

Instance Firewalls

Configure firewall rules for instances using Security Groups.

Secure Transmission

Establish secure communication sessions (HTTPS) using SSL/TLS.

Page 67: Bootcamp: Getting Started on AWS

67© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

AWS Identity and Access Management (IAM)

AWS IAM

3

Manage federated users and their permissions

2

Manage AWS IAM roles and their permissions

1

Manage AWS IAM users and their access

Page 68: Bootcamp: Getting Started on AWS

68© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

AWS IAM Authentication

AuthenticationAWS Management ConsoleØ User Name and Password IAM User

Page 69: Bootcamp: Getting Started on AWS

69© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

AWS IAM Authentication

Access Key ID: AKIAIOSFODNN7EXAMPLESecret Access Key: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY

Java Python .NET

AWS SDK & APIAWS CLI

AuthenticationAWS CLI or SDK APIØ Access Key and Secret Key IAM User

Page 70: Bootcamp: Getting Started on AWS

70© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

AWS IAM Authentication and Authorization

AuthenticationØ AWS Management Console

• User Name and PasswordØ AWS CLI or SDK API

• Access Key and Secret Key

AuthorizationØ Policies

IAM User IAM Group

IAM Roles

Page 71: Bootcamp: Getting Started on AWS

71© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

AWS IAM User Management -­ Groups

User D

DevOps Group

User C

AWS Account

TestDev Group

User BUser A

Page 72: Bootcamp: Getting Started on AWS

72© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

AWS IAM Authorization

AuthorizationPolicies:Ø Are JSON documents to describe permissions.

Ø Are assigned to Users, Groups or Roles.

IAM User IAM Group

IAM Roles

Page 73: Bootcamp: Getting Started on AWS

73© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

AWS IAM Policy Elements

"Version": "2012-10-17","Statement": [

"Sid": "Stmt1453690971587","Action": ["ec2:Describe*","ec2:StartInstances","ec2:StopInstances”],"Effect": "Allow","Resource": "*","Condition":

"IpAddress": "aws:SourceIp": "54.64.34.65/32”

,

"Sid": "Stmt1453690998327","Action": ["s3:GetObject*”],"Effect": "Allow","Resource": "arn:aws:s3:::example_bucket\*”

]

IAM Policy

Page 74: Bootcamp: Getting Started on AWS

74© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

AWS IAM Roles

An IAM role uses a policy.An IAM role has no associated credentials.IAM users, applications, and services may assume IAM roles.

IAM Roles

Page 75: Bootcamp: Getting Started on AWS

75© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Application Access to AWS Resources

Python application hosted on an Amazon EC2 Instance needs to interact with Amazon S3. AWS credentials are required:Ø Option 1: Store AWS Credentials on the Amazon EC2 instance.Ø Option 2: Securely distribute AWS credentials to AWS Services and Applications with roles.

IAM Roles

Page 76: Bootcamp: Getting Started on AWS

76© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

AWS IAM Best Practices

Delete AWS account (root) access keys.Create individual IAM users.Use groups to assign permissions to IAM users.Grant least privilege.Configure a strong password policy.Enable MFA for privileged users.

Page 77: Bootcamp: Getting Started on AWS

77© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Knowledge Check Answer

Q: How would you enable applications running on your EC2 instance to GET data from an S3 bucket? AWS IAM Role

Page 78: Bootcamp: Getting Started on AWS

78© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Lab 2Identity and Access

Management

IAM

Page 79: Bootcamp: Getting Started on AWS

79© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Module 4Databases

Page 80: Bootcamp: Getting Started on AWS

80© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Amazon Relational Database Service (RDS)

Cost-­efficient and resizable capacityManages time-­consuming database administration tasksAccess to the full capabilities of Amazon Aurora, MySQL, MariaDB, Microsoft SQL Server, Oracle, and PostgreSQL databases

Amazon RDS

Page 81: Bootcamp: Getting Started on AWS

81© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Amazon RDS

Simple and fast to deployManages common database administrative tasksCompatible with your applicationsFast, predictable performanceSimple and fast to scaleSecureCost-­effective

Page 82: Bootcamp: Getting Started on AWS

82© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

AWS Managed Database Services

Compute Storage

AWS Global Infrastructure

Database

App Services

Deployment and Administration

Networking

Amazon DynamoDB

Amazon ElastiCache

Amazon RDS

Amazon Redshift

AWS Database Migration Service

Page 83: Bootcamp: Getting Started on AWS

83© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

DB Instances

DB Instances are the basic building blocks of Amazon RDS.They are an isolated database environment in the cloud.They can contain multiple user-­created databases.

Page 84: Bootcamp: Getting Started on AWS

84© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

How Amazon RDS Backups Work

Automatic Backups:Ø Restore your database to a point in time.

Ø Are enabled by default.Ø Let you choose a retention period up to 35 days.

Manual Snapshots:Ø Let you build a new database instance from a snapshot.

Ø Are initiated by the user.Ø Persist until the user deletes them.

Ø Are stored in Amazon S3.

Page 85: Bootcamp: Getting Started on AWS

85© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Multi-­AZ RDS Deployment

With Multi-­AZ operation, your database is synchronously replicated to another AZ in the same AWS Region.Failover automatically occurs to the standby in case of master database failure.Planned maintenance is applied first to standby databases.

Page 86: Bootcamp: Getting Started on AWS

86© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Lab 3Adding a database for your

web server

Page 87: Bootcamp: Getting Started on AWS

87© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Amazon DynamoDB

Store any amount of data with no limitsFast, predictable performance using SSDsEasily provision and change the request capacity needed for each tableFully managed, NoSQL database serviceAmazon

DynamoDB

Page 88: Bootcamp: Getting Started on AWS

88© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Database ConsiderationsIf You Need Consider Using

A relational database service with minimal administration

Amazon RDS • Choice of Amazon Aurora, MySQL, MariaDB, MicrosoftSQL Server, Oracle, or PostgreSQL database engines

• Scale compute and storage• Multi-­AZ availability

A fast, highly scalable NoSQL database service

Amazon DynamoDB• Extremely fast performance• Seamless scalability and reliability• Low cost

A database you can manage on your own

Your choice of AMIs on Amazon EC2 and Amazon EBS that provide scale compute and storage, complete control over instances, and more.

Page 89: Bootcamp: Getting Started on AWS

89© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

DynamoDB Use Case

AdRoll, an online advertising platform, serves 50 billion impressions a day worldwide with its

global retargeting platforms.

We spend more on snacks than we do on Amazon

DynamoDB.

Valentino VolonghiCTO, Adroll

“ Adroll Uses AWS to grow by more than 15,000% in a yearNeeded high-­performance, flexibleplatform to swiftly sync data for worldwide audience Processes 50 TB of data a dayServes 50 billion impressions a dayStores 1.5 PB of dataWorldwide deployment minimizes latency

Page 90: Bootcamp: Getting Started on AWS

90© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Module 5AWS Elasticity and Management Tools

Page 91: Bootcamp: Getting Started on AWS

91© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Elastic Load Balancing

Distributes traffic across multiple instancesSupports health checks to detect unhealthy Amazon EC2 instancesSupports the routing and load balancing of HTTP, HTTPS, and TCP traffic to Amazon EC2 instances

Elastic Load Balancing

Page 92: Bootcamp: Getting Started on AWS

92© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Elastic Load Balancing Example

Page 93: Bootcamp: Getting Started on AWS

93© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Back-­end Instances for Your Load Balancer

Health ChecksSecurity GroupsSubnetsRegisterDe-­Register Instances

Page 94: Bootcamp: Getting Started on AWS

94© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Lab 4Adding a load balancer

Page 95: Bootcamp: Getting Started on AWS

95© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Auto Scaling

Scale your Amazon EC2 capacity automaticallyWell-­suited for applications that experience variability in usageAvailable at no additional charge Auto

Scaling

Page 96: Bootcamp: Getting Started on AWS

96© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Trio of Services

Latency

Utilization

CloudWatchAuto Scaling

Elastic Load Balancing

Auto Scaling group

Execute AS Policy

Page 97: Bootcamp: Getting Started on AWS

97© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Auto Scaling Benefits

Better Cost Management

Better Availability

Better Fault Tolerance

Page 98: Bootcamp: Getting Started on AWS

98© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Launch Configurations

A launch configuration is a template that an Auto Scaling group uses to launch EC2 instances.When you create a launch configuration, you can specify:Ø AMI IDØ Instance typeØ Key pairØ Security groupsØ Block device mappingØ User data

Page 99: Bootcamp: Getting Started on AWS

99© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Auto Scaling Groups

Contain a collection of EC2 instances that share similar characteristics.Instances in an Auto Scaling group are treated as a logical grouping for the purpose of instance scaling and management. Auto Scaling group

Minimum size

Desired capacityMaximum size

Scale out as needed

Page 100: Bootcamp: Getting Started on AWS

100© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Scaling Policies

You can create a scaling policy that uses CloudWatch alarms to determine:Ø When your Auto Scaling group should scale out.Ø When your Auto Scaling group should scale in.You can use alarms to monitor:Ø Any of the metrics that AWS services send to Amazon CloudWatch.

Ø Your own custom metrics.

Page 101: Bootcamp: Getting Started on AWS

101© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Auto Scaling Basic Lifecycle

instances

Auto Scaling group

Scale Out

Amazon CloudWatchScheduled Event

Scale In

Amazon CloudWatchScheduled Event

Launch Instance

Terminate Instance X

Attach to Group

Detach from Group

Page 102: Bootcamp: Getting Started on AWS

102© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Lab 5Creating an autoscaling group

Page 103: Bootcamp: Getting Started on AWS

103© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Amazon CloudWatch

A monitoring service for AWS cloud resources and the applications you run on AWSVisibility into resource utilization, operational performance, and overall demand patternsCustom application-­specific metrics of your ownAccessible via AWS Management Console, APIs, SDK, or CLI

Amazon CloudWatch

Page 104: Bootcamp: Getting Started on AWS

104© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Amazon CloudWatch Facts

Monitor other AWS resources ØView graphics and statistics Set Alarms

Page 105: Bootcamp: Getting Started on AWS

105© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

CloudWatch Metrics Examples

Page 106: Bootcamp: Getting Started on AWS

106© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Supported AWS Services

Auto Scaling

Amazon CloudFront

Amazon CloudWatch

Amazon CloudSearch

Amazon DynamoDB

Amazon EC2

Amazon ElastiCache

Amazon EBS

Elastic LoadBalancing

Amazon EMR

Amazon Kinesis Amazon EC2 Container Service

AWS OpsWorks

Amazon Redshift

Amazon RDS

Amazon Route 53

Amazon SNS

Amazon SQS

Amazon SWF

Amazon S3AWS Storage Gateway

Amazon WorkSpaces

Amazon Machine Learning

AWS Lambda AWS WAF

Page 107: Bootcamp: Getting Started on AWS

107© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

CloudWatch Demo

Page 108: Bootcamp: Getting Started on AWS

108© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

AWS Trusted Advisor

Best practice and recommendation engine.Provides AWS customers with performance and security recommendations in four categories: cost optimization, security, fault tolerance, and performance improvement.

AWS Trusted Advisor

Page 109: Bootcamp: Getting Started on AWS

109© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Cost Optimization

Amazon EC2 Reserved Instance OptimizationLow Utilization Amazon EC2 InstancesIdle Load BalancersUnderutilized Amazon EBS VolumesUnassociated Elastic IP AddressesAmazon RDS Idle DB Instances

Page 110: Bootcamp: Getting Started on AWS

110© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Security

Security GroupsAWS IAM UseAmazon S3 Bucket PermissionsMFA on Root AccountAWS IAM Password PolicyAmazon RDS Security Group Access Risk

Page 111: Bootcamp: Getting Started on AWS

111© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Fault Tolerance

Amazon EBS SnapshotsLoad Balancer OptimizationAuto Scaling Group ResourcesAmazon RDS Multi-­AZAmazon Route 53 Name Server DelegationsELB Connection Draining

Page 112: Bootcamp: Getting Started on AWS

112© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Performance Improvement

High Utilization Amazon EC2 InstancesService LimitsLarge Number of Rules in EC2 Security GroupOver Utilized Amazon EBS Magnetic VolumesAmazon EC2 to EBS Throughput OptimizationAmazon CloudFront Alternate Domain Names

Page 113: Bootcamp: Getting Started on AWS

113© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Trusted Advisor Demo

Page 114: Bootcamp: Getting Started on AWS

114© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

Lab 6Multi AZ Deployment for HA

Page 115: Bootcamp: Getting Started on AWS

115© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

© 2016 Amazon Web Services, Inc. or its affiliates. All rights reserved.

This work may not be reproduced or redistributed, in whole or in part, without prior written permission from Amazon Web Services, Inc. Commercial

copying, lending, or selling is prohibited.

Errors or corrections? Email us at aws-­course-­[email protected]. For all other questions, contact us at:

https://aws.amazon.com/contact-­us/aws-­training/.

All trademarks are the property of their owners.