| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
These are the notes I have prepared while doing the online course for AWS Associate Solutions Architect on Udemy(between 2015-2016) by [Ryan Kroonenburg] (https://www.udemy.com/user/ryankroonenburg/). I use these notes whenever I forget or want to revise any concept of AWS, I strongly suggest anyone wanting to know/study about AWS be sure to check out the courses offered by Ryan on Udemy by navigating to the above link.
Overview of Security Processes
It all started with Chris Pinkman and Benjamin Black present a paper on Amazon’s internal infrastructure, and request the CEO to sell it as a service, while preparing a business case
Following are the sequence of events:
1. SQS launched in 2004 2. AWS launched in 2006 3. 2007 more than 180k dev moved or started using AWS 4. 2010 all of Amazon moved to the AWS platform 5. 2012 first re:invent 6. 2013 certifications
Availability zones are data centers: Each region will contain at a minimum of 2 availability zones
Edge locations are CDN endpoints: A content delivery network (CDN) is a system of distributed servers (network) that deliver webpages and other Web content to a user based on the geographic locations of the user, the origin of the webpage and a content delivery server.
There are many more edge locations than there are regions
Currently 52 edge locations around the world
Edge locations are used by CloudFront to cache files near the user where they access them.
Networking:
Route 53: Amazon’s DNS service, basically allows you to host your domain name with Amazon
Direct connect: allows you to connect directly to where your Virtual Private Cloud(VPC) is located. Allows you to put dedicated connection links to Amazon data center into your VPC, hence you don't need to go over the internet to access it
Virtual Private Cloud: a virtual data center as a collection of AWS resources, inside of a VPC we have EC2 instances, EBS instances, also Load Balancers
Compute Elements:
EC2: Known as Elastic Cloud Compute, allowing one to provision instances inside your VPC, these can be anything from Linux, CentOs, etc, and we can also provision Windows instances, Amazon also provides a marketplace, wherein you can purchase pre built, or preconfigured instances from 3rd party
Autoscaling: Most famous aspect of AWS cloud. Allows you to provision more Virtual machines to handle load Autoscaling happens at a predefined stage we can set alarms to trigger autoscaling, so things like CPU utilization, or perhaps Disk I/O, also autoscaling happens at a predefined timeframe
Elastic Load Balancing: Acts as Load Balancer to your Web Servers, or your application servers, route53 can be made to point to your load balancer, the load balancer will then distribute your traffic down to your EC2 instances ELBs also has a health check mechanism, so it can detect whether an EC2 instance is alive, and if it has died, it will remove it on its own, and users will not notice that you have an outage on a particular instance
Workspaces: Essentially a VDI platform allows you to do virtual desktops, so basically you can run Windows 7/Windows 8 instances in the cloud, and use thin clients to access them
Storage:
S3(Simple Storage Service): Been around since the conception of AWS, it is a file-based storage or object based storage. Allows us to store files in the cloud of sizes ranging from 1 byte to 5 terabytes
Glacier: Is an archiving service. Allows us to archive all our data in the Amazon cloud, not immediately accessible but take 3-5 hours to restore a file from Glacier, hence used for long-term storage
EBS(Elastic Block Storage): Allows us to have persistent storage in the cloud. It is block-level so it allows us to install different file-systems such as Windows partition or Linux partition stored on the EBS volume. Most commonly used to mount to EC2 instances. Completely flexible we can choose from Magnetic storage, SSD storage etc
Storage gateway: A service that connects on-premise software appliance with cloud based storage to provide seamless and secure integration between organizations on premise IT equipment and AWS storage infrastructure. This service allows us to securely store data in the AWS cloud for scalable and cost-efficient storage. It also supports industry standard protocol that work with existing applications. Effectively AWS storage gateway is used for backups to cloud or S3 or to Glacier
Import/Export: Accelerates moving large amounts of data in and out of the AWS cloud using portable storage devices for transport. It transfers your data onto and off of storage devices using Amazon’s high speed internal networking and bypasses the internet. It is often faster than internet transfers and more cost-effective than upgrading the connectivity
Databases:
Analytics:
a. RedShift: A fast, fully-managed petabyte scaled datawarehousing solution that makes it simple and cost-effective to efficiently analyze your data using your existing BI tools. It is designed from the infrastructure layer upwards to maximize performance and minimize cost.
b. Kinesis: Is a fully-managed service for real-time processing of streaming data at massive scale. Can continuously change and store terabytes of data per hour from several sources such as website clickstreams, social media, location tracking event. With Kinesis client library ACL, we can build Amazon Kinesis apps, and use streaming data to power real time dashboards, generate alerts, implement dynamic pricing and advertising and more. We can emit data from Kinesis to other AWs services such as S3, redShift, Elastic MapReduce, and lambda.
c. ElasticMapReduce(EMR): A web service that makes it easy to quickly and cost-effectively process vast amounts of data. Uses Hadoop, an open source framework to distribute your data and process across a resizeable cluster of Amazon EC2 instances. It can also run other distributed framework such as Spark and Presto. EMR is used in a variety of applications including log analysis, web-indexing, data warehousing, machine learning, financial analysis, scientific simulation, and Bioinformatics, customers launch millions of Amazon’s EMR clusters each year.
Application Services:
SQS(Simple Queue Service): A fast reliable, scalable and fully-managed messaging queueing service. SQS makes it simple and cost-effective to decouple the components of a cloud application. We can use SQS to transmit any volume of data at any level of throughput, without losing messages or other services to be available
SWF(Simple Work Flow Service): Helps developers to build, run, and scale background jobs that have parallel or sequential steps. We can think of this as a fully-managed state-tracker and task coordinator in the cloud. Tasks can be carried out by application or human workers
SNS(Simple Notification Service): A fast, flexible, fully-managed push messaging service, makes it simple and cost-effective to push notifications to all mobile devices including Apple, Google, FireOS, and Windows devices, and Android devices as well. We can use SNS push notifications for end-end smart connected devices or distributed systems. Besides pushing a cloud notification directly to mobile devices it can deliver messages by SMS or email to SQS queue or any Http endpoint. To prevent messages being lost all messages are published to SNS are stored redundantly across multiple availability zones
SES(Simple Email Service): A cost-effective outbound only email sending service. We can send transactional emails,marketing messages etc, and get to pay for what we use. Along with high-deliverability SES provides, easy, real-time access to your sending statistic, and built-in notifications for bounces, complaints, and deliveries to help you find tune your cloud-based email sending strategy
Elastic Transcoder: A media transcoding service in the cloud.Designed to be highly-scalable, easy to use in a cost-effective way for developers and businesses to convert or transcode media files from their source formats to version that will play on devices like smartphones, tablets etc. Netflix, and Amazon Prime make heavy use of Elastic Transcoding service
Cloud Search: A managed service in the AWS cloud that makes it simple and cost-effective to setup,manage,and scale a custom search solution for website/app
Deployment and Management:
Opsworks: An app management service that makes it easy to deploy and operate applications of all shapes and sizes We can define the application’s architecture and specification around each component including package installation, s/w configuration resources, such as storage. Start from templates for common technologies like app service and databases, or build your own to perform any task that can be scripted. Includes automation to scale your application,based on time or load and dynamic configuration to orchestrate changes as your environment scales.
1. IAM(Identity Access Management):
Enables you to securely control access to AWS services and resources for your users
We can create and manage AWS users and groups and use permissions to allow and deny their access to AWS resources
2. CloudWatch:
A monitoring service for AWS Cloud resources and the apps you run on AWS
Used for collecting and tracking metrics, collect and monitor log files, and set alarms
It can monitor AWS resources,such as EC2 instances, DynamoDB tables,and RDS DB instances, as well as custom metrics generated by your apps and services, and log any files your app generates
We can use it to gain system-wide visibility into resource utilization, app performance, and operational health
3. Elastic Beanstalk: An easy to use service for developing and scaling web apps developed in Java, Dot Net, PHP, Node.js, Python, Ruby, and Docker on familiar servers such as Apache, EngineX, passenger, and IIS
We can simply upload the code and EB will automatically handle the deployment from capacity provisioning,load balancing, autoscaling, app health and monitoring
At the same we retain full control over the AWS resources powering your application, and can access the underlying resources at any time
4. CloudTrail: A logging, and auditing service, a web service that records API call for your account and deliver log files to you
We can get history of AWS API calls for your account, including calls made by AWS management console, SDKs, Command line tools, and high level AWS services such as AWS cloud formation
The history of API calls created by CloudTrail enables security analysis, resource change tracking, and compliance auditing
5. Data Pipeline: A web service that helps to reliably process and move data between different AWS compute and storage services as well as on premise data sources at a specified interval
We can regularly access data,whether where it’s stored, transformed, and processed at it’s scale and efficiently transfer the results to AWS services such as Amazon S3, RDS, DynamoDB, EMR
6. Cloud Formation: Gives developers, and sys admins an easy way to create and manage a collection of related AWS resources, provisioning and updating them in an orderly and predictable fashion
We can use AWS Cloud Formation sample templates or create our own templates to describe the AWS resources and any associated dependencies, or runtime params our app requires to run
We don’t need to figure out the order for provisioning AWS services or details of those making the dependencies work cloud formation takes care of that
After AWS resources are deployed we can update or modify in a controlled manner and predictable way in effect applying version control to your AWS infrastructure.
Allows us to manage users and their level of access to the AWS console.
Features of IAM:
High Level Concept:
Each Role has a policy template.
More granular access depending on the resources required such as S3 access.
Configure IAM:
Creating a role: To allow our EC2 instances to access our S3 resources.
Trusted Entities: The identity provider(s) ec2.amazonaws.com
Imagine a user is at home, and he wants to login to the AWS console, and they are working on their own home network So they haven’t already signed-in into the work network.
What they(users) would do is to browse to a URL, for eg: /ADFS/LS/IDPInitiatedSignOn, and this is basically an ADFS server that sits inside a DMZ inside someone’s corporate network. You browse to that link and it would give you a user name and password depending on your browser, but basically it prompts you to sign in using your active directory credentials. It is also known as Single-Sign On or SSO
Questions: Can you authenticate with Active Directory: Yes, using SAML authentication Whether or not you are authenticating to active directory first and then given a security credential or if you get the temporary security credential first, which is then authenticated against the active directory? you always authenticate against active directory first and then you would be assigned the temporary security credential
S3: S3 provides developers and IT teams with highly scalable, durable, secure object storage. Amazon S3 is easy to use, with a simple web service interface to store and retrieve any amount of data from anywhere on the web.
S3 Essentials:
1. S3 is object based i.e. it allows you to store, and upload files on the platform. Cannot install OS or databases on S3 2. Files can be from 1 byte to 5tb in size 3. There is unlimited storage 4. Files are stored in buckets(any directory like we have on Windows or Linux files system) 5. Buckets have a unique namespace for each given region. For example, if we wanted to create a bucket called acloudguru the EU west region then that namespace name would be reserved so someone else using another Amazon account could not create a acloudguru bucket eg: https://s3-us-west2.amazonaws.com/acloudguru 6. Amazon guarantees 99.99% availability or the S3 platform.S3 buckets are essentially spread across availability zones, so if the availability zone goes down the S3 bucket is stored in the other availability zones, and Amazon does this automatically we do not need to configure this 7. Amazon also guarantees 99.999999999% durability for S3 information.Durability is simply, if you think of storing a file on a disc set that’s a RAID 1 and you lose one of the discs, since we are in the RAID 1 configuration which is a mirror, all your information is stored across 2 disks, so you can afford the loss of 1 disc. The way Amazon structures S3 is that if we store 10,000 files that will guarantee that those 10,000 files will stay there with above guarantee %age of durability 8. S3 can have metadata(key value pairs) on each file 9. S3 allows you to do lifecycle management as well as versioning 10. S3 also allows you to encrypt your buckets, so you can store your files and encrypted at rest
Storage Types:
Glacier:
S3 Versioning:
S3 Lifecycle management:
S3 Encryption:
In Transit: You can upload/download your data to S3 via SSL Encrypted end points and S3 can automatically encrypt your data at rest.
At Rest:
S3 Security:
S3 Functionality:
S3 use Cases:
S3 Exam tips:
S3 storage tiers and classes:
S3 is charged for:
Terminologies:
Edge Location: The location where the content will be cached, this is different from AWS Region/ AZ. Currently, 50 edge locations in the world. Edge location are not for READ only, you can write them too.
Origin: This is the origin of all the files that the CDN will distribute. This can be either an S3 bucket, an EC2 instance, or an ELB or Route53. This may not be registered with AWS you can have your own custom origin servers.
Distribution: Name given to the CDN which consists of a collection of Edge Locations
Web distribution: Used for websites, RTMP: used for media streaming
This is a service that connects an on-premises software appliance with cloud-based storage to provide seamless and secure integration between an org’s on premises IT environment and AWS’s storage infrastructure. The service enables you to securely store data to the AWS cloud for scalable and cost-effective storage. Available for download as a VM that you install as a host in your datacenter Once installed and associated with your AWS account through the activation process, you can use the AWS console to create the storage gateway option that is right for you, i.e. gateway-cached or gateway-stored volumes that can be mounted as iSCSI devices by your on-premise applications 4 pricing components: gateway usage(per gateway/month), snapshot storage(per GB/month), volume storage usage(per GB/month), data tranfer out(per GB/month)
Types of Storage gateways:
Gateway Stored Volumes: Store your primary data locally, while asynchronously backing up to S3 in the form of EBS snapshots. Gateway-Stored volumes are inexpensive and durable backup providers that you can recover locally or from Amazon EC2, low latency access to datasets,
Gateway Cached Volumes: Only your most frequently accessed data is stored locally. Your entire dataset is stored in S3 while retaining some portion of it locally in a cache for frequently accessed data These volumes minimize the need to scale your on-premise storage infrastructure, while providing your app with low-latency access to frequently accessed data You don’t have to buy SAN arrays for your office/data center, so you get significant cost savings. If you lose the internet connectivity you will not be able to access all of your data
Gateway Virtual Tape Library(VTL): Have a limitless collection of virtual tapes. Each virtual tape can be stored in a Virtual Tape library backed by Amazon S3 or a Virtual tape shelf backed by Amazon Glacier. The VTL exposes an industry standard iSCSI interface which provides your backup application with online access to the virtual tapes
2 types:
Import/Export Disk: Accelerates moving large amount of data into and out of the AWS cloud using portable storage devices for transport. It transfers your data directly and off of storage devices using Amazon’s high-speed internal network and bypassing the internet. Faster than the internet transfer and more cost effective than upgrading your connectivity Allows to import to EBS, S3, Glacier, export from S3 you pay only for what you use. 3 pricing components: per device fee, a data load time charge, possible return shipping charges, or shipping to destinations not local to AWS
Snowball: This is a petabyte scale data transport solution that uses secure appliances to transfer large amounts of data into and out of AWS. It addresses common challenges with large-scale data transfers such as high network costs, long transfer times, and security concerns. Transferring data with snowball is fast, simple, secure and can be as little as 1/5th the cost of high-speed internet. Currently, only available in the US, and only works with S3 both with importing and exporting. Each snowball can transfer upto 50Tb of data, and multiple appliances can be used for larger workloads. Snowball uses tamper resistant enclosures, 256-bit encryption, and industry-standard Trusted Platform Module(TPM) that is designed to ensure both security and full chain-of-custody or your data, as well as reduce management overhead involved with transferring data into or out of AWs.
Provides resizable compute capacity in the cloud. Reduces the time required to obtain and boot new server instances to minutes, allowing you to quickly scale capacity, both up and down, as computing requirements change.
EC2 options:
On demand: Allow you to pay a fixed rate by the hour with no commitment. User that want low cost and flexibility without any upfront payment or long-term commitment. Apps with spiky, short term, or unpredictable workloads that cannot be interrupted. Apps being developed or tested for the first time
Reserved: 1 or 3 year terms, provide discounts on the hourly charge by providing a capacity reservation Apps with steady state or predictable usage. Apps that require reserved capacity. Users able to make upfront payments to reduce their total computing costs even further
Spot: Enable you to bid whatever price you want for instance capacity, providing for even greater savings if your app has flexible start and end times Apps that are feasible to very low compute prices. Users with urgent computing needs for large amounts of additional capacity If the spot instance is terminated by Amazon EC2, you will not be charged for the partial hour of usage, but if you terminate the instance yourself, you will be charged for any hour in which the instance ran
| Family | Speciality | Use Cases |
|---|---|---|
| T2 | Lowest Cost, General Purpose | Web Servers/Small DBs |
| M4 | General Purpose | Application Servers |
| M3 | General Purpose | Application Servers |
| C4 | Compute Optimized | CPU Intensive Apps/DBs |
| C3 | Compute Optimized | CPU Intensive Apps/DBs |
| R3 | Memory Optimized | Memory Intensive Apps/ DBs |
| G2 | Graphics/General Purpose GPU | Video Encoding, Machine Learning, 3D Application Streaming |
| I2 | High Speed Storage | NoSQL DBs, Data Warehousing etc. |
| D2 | Dense storage | File Servers/Data Warehousing/Hadoop |
D for Density I for IOPS R for RAM T for cheap general purpose(think of T2 Micro) M - main choice for general purpose apps C for Compute G - Graphics
Allows you to create storage volumes and attach them to Amazon EC2 instances. Once attached, you can create a file system on top of these volumes, run a database, or use them in any other way you would use a block device. Amazon EBS volumes are places in specific Availability Zone, where they are automatically replicated to protect you from the failure of a single component.
On an EBS-backed instance, the default action is for the root EBS volume to be deleted when the instance is terminated Root volumes cannot be encrypted by default, you need a third party tool(bitlocker) to encrypt the root volume Additional volumes can be encrypted
Volume:
Snapshot:
Volume vs snapshots - security:
Snapshots of Root Device Volumes:
To create snapshot for Amazon EBS volumes that serve as root devices, you should stop the instance before taking a snapshot
RAID:
Redundant Array of Independent Disks
Types:
How do I take a snapshot of a RAID Array:
Problem:
Take a snapshot, the snapshot excludes data held in the cache by apps 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:
How can we do this?
Provides the information required to launch a virtual server in the cloud. You specify an AMI when you launch an instance, and you can launch as many instances from the AMI as you need. You can also launch instances from as many different AMIs as you need.
It consists of the following:
AMIs 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
You can select an AMI from
By default both ROOT volumes will be deleted on termination, however with EBS volumes, you can tell AWS to keep the root device volume.
What is a placement group?:
A compute service where you can upload your code and create a lambda function Takes care of provisioning and managing the servers that you use to run the code We need not worry about OS, patching, scaling etc.
As an event-driven compute service where AWS Lambda runs your code in response to events. These events could change 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.
How to do it?
Stop the application from writing to the disk
Flush all caches to the disk
How can we do this?
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
Please read the definition for Lambda above
automation - scriptable infrastructure
auto-scaling
proactive scaling
more efficient development lifecycle
improved testability
disaster recovery and business continuity
overflow traffic to the cloud
Be a pessimist when designing architectures in the cloud; assume things will fail. In other words, always design, implement and deploy for automated recovery from failure
Decouple your components: build components that do not have tight dependencies on each other, so that one component dies/sleeps/busy then other components in the system are built so as to continue to work as if no failure is happening. Loose coupling isolates the various layers and components of your application so that each component interacts asynchronously with the others
Implement elasticity: can be implemented in 3 ways
secure your application
We have a paying account, and this account is linked to separate AWS accounts such as test/dev, production and bank office accounts respectively. Paying account is independent. It cannot access resources of other accounts. All linked accounts are independent. There is a limit of 20 linked accounts for consolidated billing
| Back | FazBrowse Home | New Git URL |