AWS SAA 学习笔记

2021-03-28  本文已影响0人  西部小笼包

前言

因工作内容需要,需要大量基于aws去构建系统。因为此前没有aws的任何经验,最近学习了一波aws的一些服务,顺便报了一下soa的考试。


image.png

在学完aws各种服务的作用之后,准备考试就离不开练习。我用了下述材料。

下属知识点 来自于这份试卷

个人比较推荐,因为这份试卷的题目,背后都有详细的解答,每道题为什么要选这个,为什么不选其他的。个人观点,对aws的基本服务都了解后,把这份试卷里的知识点都搞清楚。过考试应该问题不大。

EC2 instance standby state

image.png

ALB Routing Method

ASG rebalance 策略

image.png

RDS 维护

image.png

HPC

Elastic Fabric Adapter (EFA)是Amazon EC2实例的网络接口,它允许客户在AWS上运行需要高级别节点间通信的应用程序。其定制的操作系统(OS)旁路硬件接口提高了实例间通信的性能,这对扩展这些应用程序至关重要。

限制可以看的资源

Many companies that distribute content over the internet want to restrict access to documents, business data, media streams, or content that is intended for selected users, for example, users who have paid a fee.

To securely serve this private content by using CloudFront, you can do the following:

Require that your users access your private content by using special CloudFront signed URLs or signed cookies.

image.png

Amazon FSx for Windows File Server

支持

Route 53 policy

image.png

RDS Deployment

image.png

snowball vs snowmobile

snowball 80TB 的存储。 snowmobile 至少10PB

direct connect 非常COST

Direct Connect involves significant monetary investment and takes several months to set up

S3 Transfer Acceleration (S3TA) Overview

image.png

Price for storage

With Amazon EFS, you pay only for the resources that you use. The EFS Standard Storage pricing is 0.30 per GB per month. Therefore the cost for storing the test file on EFS is0.30 for the month.

For EBS General Purpose SSD (gp2) volumes, the charges are 0.10 per GB-month of provisioned storage. Therefore, for a provisioned storage of 100GB for this use-case, the monthly cost on EBS is0.10*100 = $10. This cost is irrespective of how much storage is actually consumed by the test file.

For S3 Standard storage, the pricing is 0.023 per GB per month. Therefore, the monthly storage cost on S3 for the test file is0.023.

AURORA 选主策略

  1. 首先比较谁的tier 低(越低,优先级越高)
  2. 然后相同tier,看谁的size 大
  3. 如果还一样,任意选1个。

kinesis firehose vs analytics vs glue job vs spark streaming

AWS Lambda 最高并发执行度是1000,可以找AWS support to raise the account limit

spread placement group config

A spread placement group can span multiple Availability Zones in the same Region. You can have a maximum of seven running instances per Availability Zone per group. Therefore, to deploy 15 EC2 instances in a single Spread placement group, the company needs to use 3 AZs.

AWS Storage gateway choice

AWS root account security

HOW ASG life cycle work

image.png

AMI

image.png

delete a CMK

image.png

S3 Versioning

image.png

Tuning S3

image.png

direct connect

With AWS Direct Connect plus VPN, you can combine one or more AWS Direct Connect dedicated network connections with the Amazon VPC VPN. This combination provides an IPsec-encrypted private connection that also reduces network costs, increases bandwidth throughput, and provides a more consistent network experience than internet-based VPN connections.

orgnaization SCP

Secrets Manager vs SSM Parameter Store

前者专门用来存密码的,后者范围更广也可以存密码。但是前者提供auto-rotate 功能,后者需要手动。

NACL vs AWS-Shield Advanced vs WAF

AWS WAF is a web application firewall that helps protect your web applications or APIs against common web exploits that may affect availability, compromise security, or consume excessive resources. AWS WAF gives you control over how traffic reaches your applications by enabling you to create security rules that block common attack patterns, such as SQL injection or cross-site scripting, and rules that filter out specific traffic patterns you define.

helps to block specific IPs. On top of things, NACLs are defined at the subnet level

AWS Shield is a managed Distributed Denial of Service (DDoS) protection service that safeguards applications running on AWS. AWS Shield provides always-on detection and automatic inline mitigations that minimize application downtime and latency, so there is no need to engage AWS Support to benefit from DDoS protection. (no rate-based rules)

RAM

AWS Resource Access Manager (RAM) is a service that enables you to easily and securely share AWS resources with any AWS account or within your AWS Organization. You can share AWS Transit Gateways, Subnets, AWS License Manager configurations, and Amazon Route 53 Resolver rules resources with RAM. RAM eliminates the need to create duplicate resources in multiple accounts, reducing the operational overhead of managing those resources in every single account you own. You can create resources centrally in a multi-account environment, and use RAM to share those resources across accounts in three simple steps: create a Resource Share, specify resources, and specify accounts. RAM is available to you at no additional charge.

S3 Strong consistency

all S3 GET, PUT, and LIST operations, as well as operations that change object tags, ACLs, or metadata, are strongly consistent. What you write is what you will read, and the results of a LIST will be an accurate reflection of what’s in the bucket.

spot blocks

Spot Instances with a defined duration (also known as Spot blocks) are designed not to be interrupted and will run continuously for the duration you select. This makes them ideal for jobs that take a finite time to complete, such as batch processing, encoding and rendering, modeling and analysis, and continuous integration.

AWS access policy

https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html

bastion host

Including bastion hosts in your VPC environment enables you to securely connect to your Linux instances without exposing your environment to the Internet. After you set up your bastion hosts, you can access the other instances in your VPC through Secure Shell (SSH) connections on Linux. Bastion hosts are also configured with security groups to provide fine-grained ingress control.

You need to remember that Bastion Hosts are using the SSH protocol, which is a TCP based protocol on port 22. They must be publicly accessible.

S3 partial fetch

Using the Range HTTP header in a GET Object request, you can fetch a byte-range from an object, transferring only the specified portion. You can use concurrent connections to Amazon S3 to fetch different byte ranges from within the same object. This helps you achieve higher aggregate throughput versus a single whole-object request. Fetching smaller ranges of a large object also allows your application to improve retry times when requests are interrupted.

with Amazon S3 Select, you can scan a subset of an object by specifying a range of bytes to query using the ScanRange parameter. This capability lets you parallelize scanning the whole object by splitting the work into separate Amazon S3 Select requests for a series of non-overlapping scan ranges. Use the Amazon S3 Select ScanRange parameter and Start at (Byte) and End at (Byte).

AWS on-premise backup

  1. 如果你在on-premise环境有自己的backup and archive software能够使用S3提供的API。
    那意味着该软件是AWS认可的,可以直接backup,其他啥也不需要。

  2. 如果这个软件没有natively support the AWS Cloud,可以使用can use AWS Storage Gateway

  3. Storage Gateway的本质目标是让你在on-premise的系统可以直接接入scalable cloud storage

  4. 你可以部署AWS Storage Gateway通过VM 或者专属硬件

  5. storage gateway下有3种模式, file, tape, volume

    • File gateway 是在你有自己的backup application却无法使用S3 API时 想backup使用. 原理是它的SMB和NFS接口支持为IT group提供了一种将备份作业从现有的本地备份系统转移到云上的方法。对于必须快速恢复最近备份的文件的场景,它特别有用。因为通过SMB,NFS,用户可以像访问网络共享文件一样的去访问文件。通过object versioning, 还可以访问它的以前的版本。
    • volume gateway 是给你的本地system提供cloud-based iSCSI block storage volumes。它的备份是能够把你本地system的在一个时间点上的volume snapshot给存储进AWS上的EBS的snapshot.有了EBS snapshot,我们就可以在任意的EC2上attach它们,起到disaster recovery的效果。也正是因为基于了EBS snapshot,他就可以被aws backup去接管,去设计plan对它进行再备份。


      image.png

    AWS Backup 原理
    核心作用是提供备份功能,方便你去管理定制备份计划。

    1. 对其他支持的SERVICE, 通过系统内置的backup功能进行备份。
    2. 对EC2,会备份the root volume, all data volumes, instance configurations. 所以原理就是获取上述所有东西的snapshot,这些数据会被存放进EBS volume-backed AMI
    • tape gateway 会把到AWS S3的数据在3个AZ复制,达到11个9的持久性。要使用它关键是需要你本地backup application 支持iSCSI-based tape library interface,还要保证每个tape 至少要100 GB空间
image.png

AWS Global Accelerator vs Transfer Acceleration

Transfer Acceleration 可以吧文件放到edge location,同时兼容multipart upload

Global Accelerator 主要是帮你路由到最低延迟的区域,同时提供health check和DDOS保护

Global Accelerator vs CloudFront

都有DDOS保护

AWS Global Accelerator and Amazon CloudFront are separate services that use the AWS global network and its edge locations around the world. CloudFront improves performance for both cacheable content (such as images and videos) and dynamic content (such as API acceleration and dynamic site delivery). Global Accelerator improves performance for a wide range of applications over TCP or UDP by proxying packets at the edge to applications running in one or more AWS Regions.

Global Accelerator is a good fit for non-HTTP use cases, such as gaming (UDP), IoT (MQTT), or Voice over IP, as well as for HTTP use cases that specifically require static IP addresses or deterministic, fast regional failover. Both services integrate with AWS Shield for DDoS protection.

direct connect vs site-2-site VPN

dc 是private的连接。

interface endpoints vs gateway endpoints

IAM vs ACL vs SG vs S3 Bucket Policies

要从S3 Standrad 转移到其他存储至少需要30天

Amazon FSx for Lustre vs Amazon FSx for Windows File Server

lustre主要是处理ML, HPC, 视频处理, 财务模型。 它集成了S3,把S3 OBJECT 直接当作自己的FILE, 也允许直接透明的写回S3。
提供并行处理'hot data'用分布式的方式,也可以支持对'cold data'存储进S3。

Windows File Server 提供SMB 协议, 构建在windows server上。 提供的feature有 user quotas, end-user file restore, Microsoft AD integration.
不支持S3的集成。

ElastiCache redis vs memcache

LaunchTemplate vs Launch Configuration

都可以配置AM, instance type, key pair, security group.

不同之处

  1. configuration 必须每次re-create
  2. template 可以有多个version, 支持parameter 子集重用,可以混合on-demand and spot instances
  3. template 可以使用 T2 unlimited burst feature

EC2 创建策略

EC2服务试图以这样一种方式放置实例,即所有实例都分散在底层硬件上,以最小化相关故障。
我们可以use placement groups to influence the placement of a group of interdependent instances to meet the needs of your workload.

VPC Peering, software VPN, VPN CloudHub, VPC Endpoint

NAT instance vs gateway

nat_instance_vs_gw.png

NLB 转发到目标的PRIVATE IPS

A Network Load Balancer functions at the fourth layer of the Open Systems Interconnection (OSI) model. It can handle millions of requests per second. After the load balancer receives a connection request, it selects a target from the target group for the default rule. It attempts to open a TCP connection to the selected target on the port specified in the listener configuration.

Request Routing and IP Addresses -

If you specify targets using an instance ID, traffic is routed to instances using the primary private IP address specified in the primary network interface for the instance. The load balancer rewrites the destination IP address from the data packet before forwarding it to the target instance.

If you specify targets using IP addresses, you can route traffic to an instance using any private IP address from one or more network interfaces. This enables multiple applications on an instance to use the same port. Note that each network interface can have its security group. The load balancer rewrites the destination IP address before forwarding it to the target.

Dedicated Host vs Dedicated Instance

dedicate_host_vs_instance.png

On-demand vs Spot Instance

ondemand_spot_instance.png

Amazon VPC console wizard

支持4种模式

  1. 单独的public subset, 如博客
  2. public subset + private subset, 一个对外的服务,接一个在内网的数据库
  3. public subset + private subset + Site-to-Site VPN access, 内网可以extend到其他的云服务那
  4. private subset + Site-to-Site VPN access, 使用Amazon的基础设施将网络扩展到云中,而不向Internet公开网络

How WAF Works

waf.png

security groups

A security group acts as a virtual firewall that controls the traffic for one or more instances. When you launch an instance, you can specify one or more security groups; otherwise, we use the default security group. You can add rules to each security group that allow traffic to or from its associated instances. You can modify the rules for a security group at any time; the new rules are automatically applied to all instances that are associated with the security group. When we decide whether to allow traffic to reach an instance, we evaluate all the rules from all the security groups that are associated with the instance. The following are the characteristics of security group rules: By default, security groups allow all outbound traffic. Security group rules are always permissive; you can't create rules that deny access. Security groups are stateful.

IAM roles

IAM roles allow you to delegate access to users or services that normally don't have access to your organization's AWS resources. IAM users or AWS services can assume a role to obtain temporary security credentials that can be used to make AWS API calls. Consequently, you don't have to share long-term credentials for access to a resource. Using IAM roles, it is possible to access cross-account resources.

RAM

VPC sharing (part of Resource Access Manager) allows multiple AWS accounts to create their application resources such as EC2 instances, RDS databases, Redshift clusters, and Lambda functions, into shared and centrally-managed Amazon Virtual Private Clouds (VPCs). To set this up, the account that owns the VPC (owner) shares one or more subnets with other accounts (participants) that belong to the same organization from AWS Organizations. After a subnet is shared, the participants can view, create, modify, and delete their application resources in the subnets shared with them. Participants cannot view, modify, or delete resources that belong to other participants or the VPC owner.

You can share Amazon VPCs to leverage the implicit routing within a VPC for applications that require a high degree of interconnectivity and are within the same trust boundaries. This reduces the number of VPCs that you create and manage while using separate accounts for billing and access control.

transit gateway

he AWS Transit Gateway allows customers to connect their Amazon VPCs and their on-premises networks to a single gateway. As your number of workloads running on AWS increases, you need to be able to scale your networks across multiple accounts and Amazon VPCs to keep up with the growth. With AWS Transit Gateway, you only have to create and manage a single connection from the central gateway into each Amazon VPC, on-premises data center, or remote office across your network. AWS Transit Gateway acts as a hub that controls how traffic is routed among all the connected networks, which act like spokes. This hub and spoke model simplifies management and reduces operational costs because each network only has to connect to the Transit Gateway and not to every other network.

root account vs admin user account

Some of the AWS tasks that only a root account user can do are as follows: change account name or root password or root email address, change AWS support plan, close AWS account, enable MFA on S3 bucket delete, create Cloudfront key pair, register for GovCloud.

user pool vs identity pool

user_id_pool.png

visibility timeout vs delay queue

一个是防止重复消费。一个是延迟消费

storage gateway

可以暴露S3作为存储使得自己的站点可以使用AWS S3作为存储
内置了3种GATEWAY,分别是file, volume, tape

使用spot instance 一些注意事项

"AWS Managed Microsoft AD" vs "AD Connector" vs "Simple AD"

launch configuration

kinesis 3 vs SQS

"DataSync" vs "FileGateway" vs "SnowballEdge" vs "Transfer Family"

Route53

cloudwatch recover instance

"AWS Config" vs "Management console" vs "System manager" vs "Trusted Advisor"

Think resource performance monitoring, events, and alerts; think CloudWatch.

Think account-specific activity and audit; think CloudTrail.

Think resource-specific history, audit, and compliance; think Config.

ASG 的监控

单测错题

上一篇 下一篇

猜你喜欢

热点阅读