[AWS Certificate] Developer - EC2 - Summary & Exam TIps (A Cloud Guru)
2017. 10. 18. 08:24 |
EC2 - Summary & Exam TIps
From Cloud Guru lecture in udemy
* Know the differences (pricing models) between (***)
- On Demand
- Spot
- Reserved
- Dedicated Hosts :
==> Choose best pricing model for specific requests
* Remember with spot instances;
- If you terminate the instance, you pay for the hour
- if AWS terminates the spot instance, you get the hour it was terminated in for free.
Making Sense of AWS EC2 Instance Type Pricing: ECU Vs. vCPU
EBS (Elastic Block Store) Consists of;
- SSD, General Purpose - GP2 (Up to 10,000 IOPS)
- SSD, Provisioned IOPS - I01 (More than 10,000 IOPS)
- HDD, THroughput Optimized - ST1 - frequently accessed workloads
- HDD, Cold - SC1 - less frequently accessed data.
- HDD, Magnetic - Standard - cheap, infrequently accessed storage
* You cannot mount 1 EBS volume to multiple EC2 instances, instead use EFS.
EC2 Lab Exam Tips
* Termination Protection is turned off by default, you must turn it on
* On an EBS-backed instance, the default action is for the root EBS volume to be deleted when the instance is terminated
* Root volumnes cannot be encrypted by default, you need a third party tool (such as bit locker etc.) to encrypt the root volume.
* Additional volumes can be encrypted.
* Volumes exist on EBS
- Virtual Hard Disk
* Snapshots exist on S3
* You can take a snapshot of a volume, this will store that volume on S3
* Snapshots are point in time copies of Volumes
* Snapshots are incremental, this means that only the blocks that have changed since your last snapshot are moved to S3
* If this is your first snapshot, it may take some time to create
Volumes vs. Snapshots - Security
* Snapshots of encrypted volumes are encrypted automatically
* Volumes restored from encrypted snapshots are encrypted automatically
* You can share snapshots, but only if they are unencrypted.
- These snapshots can be shared with other AWS accounts or made public
Snapshots of Root Device Volume
* To create a snapshot for Amazon EBS volumes that serve as root devices, you should stop the instance before taking the snapshot.
EBS vs. Instance Store
* Instance Store Volumes are sometimes called Ephemeral Storage.
* Instance store volumes cannot be stopped. If the underlying host fails, you will lose your data.
* EBS backed instances can be stopped. You will not lose the data on this instance if it is stopped.
* You can reboot both, you will not lose your data.
* By default, both ROOT volumes will be deleted on termination, however with EBS volumes, you can tell AWS to keep the root device volume.
How can I take a snapshot of a RAID Array?
* Problem - Take a snapshot, the snapshot excludes data held in the cache by applications and the OS. This tends not to matter on a single volume, however using multiple volumes in a RAID array, this can be a problem due to interdependencies of the array.
* Solution - Take an application consistent snapshot
- Stop the application from writing to disk
- Flush all chaches to the disk.
- How can we do this?
Freeze the file system
Unmount the RAID Array
Shutting down the associated EC2 instance.
* AMI's are regional. You can only launch an AMI from the region in which it is stored. However you can copy AMI's to other regions using the console, command line or the Amazon EC2 API.
* Standard Monitoring = 5 Minutes
* Detailed Monitoring = 1 Minute
* CloudWatch is for performance monitoring
* CloudTrail is for auditing
What can I do with Cloudwatch?
* Dashboards - Creates awesome dashboards to see what is happening with your AWS environment
* Alarms - Allows you to set Alarms that notify you when particular thresholds are hit.
* Events - CloudWatch Events helps you to respond to state changes in your AWS resources.
* Logs - CloudWatch Logs helps you to aggregate, monitor, and store logs.
Roles Lab
* Roles are more secure than storing your access key and secret access key on individual EC2 instances.
* Roles are easier to manage
* Roles can be assigned to an EC2 instance AFTER it has been provisioned using both the command line and the AWS console.
* Roles are universal, you can use them in any region.
* Used to get information about an instance (such as public ip)
* curl http://169.254.169.254/latest/meta-data/
* No such thing as user-data for an instance
EFS Features
* Supports the Network File System version 4 (NFSv4) protocol
* You only pay for the storage you use (no pre-provisioning required)
* Can scale up to the petabytes
* Can support thousands of concurrent NFS connections
* Data is stored across multiple AZ's within a region
* Read After Write consistency
What is Lambda?
* AWS Lambda is a compute service where you can upload your code and create a Lambda function. AWS Lambda takes care of provisioning and managing the servers that you use to run the code. You don't have to worry about operating systems, patching, scaling, etc. You can use Lambda in the following ways.
- As an event-driven compute service where AWS Lambda runs your code in response to events. These events could be changes to data in an Amazon S3 bucket or an Amazon DynamoDB table.
- As a compute service to run your code in response to HTTP requests using Amazon API Gateway or API calls made using AWS SDKs. This is what we use at A Cloud Guru
Quiz
- The default region for an SDK is "US-EAST-1"
- AWS SDK supports Python, Ruby, Node.JS, PHO, JAVA (not C++)
- HTTP 5XX is a server side error
- HTTP 4XX is a client side error
- HTTP 3XX is a redirection
- HTTP 2XX is the request was successful
- To find out both private IP address and public IP address of EC2 instance
=> Retrieve the instance Metadata from http://169.254.169.254/latest/meta-data/
- To retrieve instance metadata or userdata you will need to use this IP address
=> http://169.254.169.254
- In order to enable encryption at rest using EC2 and Elastic Block Store you need to
=> Configure encryption when creating the EBS volume
http://aws.amazon.com/about-aws/whats-new/2014/05/21/Amazon-EBS-encryption-now-available/
- You can have multiple SSL certificates on an Elastic Load Balancer
- Elastic Load Balancers are chargeable
'IoT > AWS Certificate' 카테고리의 다른 글
[AWS Certificate] Developer - DynamoDB Summary & Quiz (0) | 2017.11.15 |
---|---|
[AWS Certificate] Developer - DynamoDB memo (0) | 2017.11.14 |
[AWS Certificate] Developer - Databases Overview & Concepts (0) | 2017.11.08 |
[AWS Certificate] Developer - S3 Summary and Quiz (1) | 2017.11.07 |
[AWS Certificate] Developer - S3 Memo - from Cloud Guru Lecture (0) | 2017.11.03 |
[AWS Certificate] Developer - ELB, SDK and Lambda memo (0) | 2017.10.17 |
[AWS Certificate] Developer - AWS CLI memo (0) | 2017.10.12 |
[AWS Certificate] Developer - Security Group, Upgrading EBS Volume, EFS Lab memo (0) | 2017.10.05 |
[AWS Certificate] Developer - Practice : Let's get free Linux Service and my web page (0) | 2017.09.11 |
[AWS Certificate] Developer - Associate EC2 (Elastic Compute Cloud) (0) | 2017.09.06 |