精华内容
下载资源
问答
  • AWS EC2

    2018-07-10 15:22:27
    1. AWS介绍,EC2介绍 https://blog.csdn.net/yangss123/article/details/701749332. EX2的类型https://blog.csdn.net/Swallow_he/article/details/76205146官网:

    官网:https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html

    What Is Amazon EC2?

    Amazon Elastic Compute Cloud (Amazon EC2) provides scalable computing capacity in the Amazon Web Services (AWS) cloud. Using Amazon EC2 eliminates your need to invest in hardware up front, so you can develop and deploy applications faster. You can use Amazon EC2 to launch as many or as few virtual servers as you need, configure security and networking, and manage storage. Amazon EC2 enables you to scale up or down to handle changes in requirements or spikes in popularity, reducing your need to forecast traffic.

    Features of Amazon EC2

    Amazon EC2 provides the following features:

    • Virtual computing environments, known as instances

    • Preconfigured templates for your instances, known as Amazon Machine Images (AMIs), that package the bits you need for your server (including the operating system and additional software)

    • Various configurations of CPU, memory, storage, and networking capacity for your instances, known as instance types

    • Secure login information for your instances using key pairs (AWS stores the public key, and you store the private key in a secure place)

    • Storage volumes for temporary data that's deleted when you stop or terminate your instance, known as instance store volumes

    • Persistent storage volumes for your data using Amazon Elastic Block Store (Amazon EBS), known as Amazon EBS volumes

    • Multiple physical locations for your resources, such as instances and Amazon EBS volumes, known as regions and Availability Zones

    • A firewall that enables you to specify the protocols, ports, and source IP ranges that can reach your instances using security groups

    • Static IPv4 addresses for dynamic cloud computing, known as Elastic IP addresses

    • Metadata, known as tags, that you can create and assign to your Amazon EC2 resources

    • Virtual networks you can create that are logically isolated from the rest of the AWS cloud, and that you can optionally connect to your own network, known as virtual private clouds(VPCs)


      EC2的关键词在于可伸缩,需要多少个instance,可以在短时间内建成不需要的时候可以立刻terminate。

      instance相当于虚拟机,也相当于virtual box的一个窗口。

      AMI包括操作系统,其他软体

      instance type 在这选择多种cpu,内存,储存空间,网络性能

      instance store volumes,每个新建的instance,数据都会暂时保存在instance store volumes里面。stop或terminate instance1之后,instance store上存储的instance1的数据会消失。

      通常建一个instance流程

      选择images->新建instance->选择instance type->metadata->建成


    Amazon EC2 Instance Store

    An instance store provides temporary block-level storage for your instance. This storage is located on disks that are physically attached to the host computer. Instance store is ideal for temporary storage of information that changes frequently, such as buffers, caches, scratch data, and other temporary content, or for data that is replicated across a fleet of instances, such as a load-balanced pool of web servers.

    An instance store consists of one or more instance store volumes exposed as block devices. The size of an instance store as well as the number of devices available varies by instance type. While an instance store is dedicated to a particular instance, the disk subsystem is shared among instances on a host computer.

    The virtual devices for instance store volumes are ephemeral[0-23]. Instance types that support one instance store volume have ephemeral0. Instance types that support two instance store volumes have ephemeral0 and ephemeral1, and so on.

    Amazon EC2 instance storage

    Instance Store Lifetime

    You can specify instance store volumes for an instance only when you launch it. You can't detach an instance store volume from one instance and attach it to a different instance.

    The data in an instance store persists only during the lifetime of its associated instance. If an instance reboots (intentionally or unintentionally), data in the instance store persists. However, data in the instance store is lost under any of the following circumstances:

    • The underlying disk drive fails

    • The instance stops

    • The instance terminates

    Therefore, do not rely on instance store for valuable, long-term data. Instead, use more durable data storage, such as Amazon S3, Amazon EBS, or Amazon EFS.

    When you stop or terminate an instance, every block of storage in the instance store is reset. Therefore, your data cannot be accessed through the instance store of another instance.

    If you create an AMI from an instance, the data on its instance store volumes isn't preserved and isn't present on the instance store volumes of the instances that you launch from the AMI.

    Instance Store Volumes

    The instance type determines the size of the instance store available and the type of hardware used for the instance store volumes. Instance store volumes are included as part of the instance's usage cost. You must specify the instance store volumes that you'd like to use when you launch the instance (except for NVMe instance store volumes, which are available by default). Then format and mount the instance store volumes before using them. You can't make an instance store volume available after you launch the instance. For more information, see Add Instance Store Volumes to Your EC2 Instance.

    Some instance types use NVMe or SATA-based solid state drives (SSD) to deliver high random I/O performance. This is a good option when you need storage with very low latency, but you don't need the data to persist when the instance terminates or you can take advantage of fault-tolerant architectures. For more information, see SSD Instance Store Volumes.

    The following table provides the quantity, size, type, and performance optimizations of instance store volumes available on each supported instance type. For a complete list of instance types, including EBS-only types, see Amazon EC2 Instance Types.

    Instance TypeInstance Store VolumesTypeNeeds Initialization*TRIM Support**

    c1.medium

    1 x 350 GB†

    HDD 

    c1.xlarge

    4 x 420 GB (1,680 GB)

    HDD 

    c3.large

    2 x 16 GB (32 GB)

    SSD 

    c3.xlarge

    2 x 40 GB (80 GB)

    SSD 

    c3.2xlarge

    2 x 80 GB (160 GB)

    SSD 

    c3.4xlarge

    2 x 160 GB (320 GB)

    SSD 

    c3.8xlarge

    2 x 320 GB (640 GB)

    SSD 
    c5d.large1 x 50 GB NVMe SSD 
    c5d.xlarge1 x 100 GBNVMe SSD 
    c5d.2xlarge1 x 200 GBNVMe SSD 
    c5d.4xlarge1 x 400 GBNVMe SSD 
    c5d.9xlarge1 x 900 GBNVMe SSD 
    c5d.18xlarge2 x 900 GB (1.8 TB)NVMe SSD 

    cc2.8xlarge

    4 x 840 GB (3,360 GB)

    HDD 

    cr1.8xlarge

    2 x 120 GB (240 GB)

    SSD 

    d2.xlarge

    3 x 2,000 GB (6 TB)

    HDD  

    d2.2xlarge

    6 x 2,000 GB (12 TB)

    HDD  

    d2.4xlarge

    12 x 2,000 GB (24 TB)

    HDD  

    d2.8xlarge

    24 x 2,000 GB (48 TB)

    HDD  

    f1.2xlarge

    1 x 470 GB

    NVMe SSD 

    f1.16xlarge

    4 x 940 GB

    NVMe SSD 
    g2.2xlarge1 x 60 GBSSD 
    g2.8xlarge2 x 120 GB (240 GB)SSD 
    h1.2xlarge1 x 2000 GB (2 TB)HDD  
    h1.4xlarge2 x 2000 GB (4 TB)HDD  
    h1.8xlarge4 x 2000 GB (8 TB)HDD  
    h1.16xlarge8 x 2000 GB (16 TB)HDD  

    hs1.8xlarge

    24 x 2,000 GB (48 TB)

    HDD 

    i2.xlarge

    1 x 800 GB

    SSD 

    i2.2xlarge

    2 x 800 GB (1,600 GB)

    SSD 

    i2.4xlarge

    4 x 800 GB (3,200 GB)

    SSD 

    i2.8xlarge

    8 x 800 GB (6,400 GB)

    SSD 

    i3.large

    1 x 475 GB

    NVMe SSD 

    i3.xlarge

    1 x 950 GB

    NVMe SSD 

    i3.2xlarge

    1 x 1,900 GB

    NVMe SSD 

    i3.4xlarge

    2 x 1,900 GB (3.8 TB)

    NVMe SSD 

    i3.8xlarge

    4 x 1,900 GB (7.6 TB)

    NVMe SSD 

    i3.16xlarge

    8 x 1,900 GB (15.2 TB)

    NVMe SSD 

    i3.metal

    8 x 1,900 GB (15.2 TB)

    NVMe SSD 

    m1.small

    1 x 160 GB†

    HDD 

    m1.medium

    1 x 410 GB

    HDD 

    m1.large

    2 x 420 GB (840 GB)

    HDD 

    m1.xlarge

    4 x 420 GB (1,680 GB)

    HDD 

    m2.xlarge

    1 x 420 GB

    HDD 

    m2.2xlarge

    1 x 850 GB

    HDD 

    m2.4xlarge

    2 x 840 GB (1,680 GB)

    HDD 

    m3.medium

    1 x 4 GB

    SSD 

    m3.large

    1 x 32 GB

    SSD 

    m3.xlarge

    2 x 40 GB (80 GB)

    SSD 

    m3.2xlarge

    2 x 80 GB (160 GB)

    SSD 
    m5d.large1 x 75 GB NVMe SSD 
    m5d.xlarge1 x 150 GBNVMe SSD 
    m5d.2xlarge1 x 300 GBNVMe SSD 
    m5d.4xlarge2 x 300 GBNVMe SSD 
    m5d.12xlarge2 x 900 GBNVMe SSD 
    m5d.24xlarge4 x 900 GB (3.6 TB)NVMe SSD 

    r3.large

    1 x 32 GB

    SSD 

    r3.xlarge

    1 x 80 GB

    SSD 

    r3.2xlarge

    1 x 160 GB

    SSD 

    r3.4xlarge

    1 x 320 GB

    SSD 

    r3.8xlarge

    2 x 320 GB (640 GB)

    SSD 

    x1.16xlarge

    1 x 1,920 GB

    SSD  

    x1.32xlarge

    2 x 1,920 GB (3,840 GB)

    SSD  

    x1e.xlarge

    1 x 120 GB

    SSD  

    x1e.2xlarge

    1 x 240 GB

    SSD  

    x1e.4xlarge

    1 x 480 GB

    SSD  

    x1e.8xlarge

    1 x 960 GB

    SSD  

    x1e.16xlarge

    1 x 1,920 GB

    SSD  

    x1e.32xlarge

    2 x 1,920 GB (3,840 GB)

    SSD  

    * Volumes attached to certain instances suffer a first-write penalty unless initialized. For more information, see Optimizing Disk Performance for Instance Store Volumes.

    ** For more information, see Instance Store Volume TRIM Support.

    † The c1.medium and m1.small instance types also include a 900 MB instance store swap volume, which may not be automatically enabled at boot time. For more information, see Instance Store Swap Volumes.




    展开全文
  • aws ec2_ec2 aws的心

    2020-10-10 06:38:51
    aws ec2Amazon web services have so many services to offer it often feels like finding a needle in a haystack.亚马逊网络服务提供了如此多的服务,感觉就像在大海捞针。 EC2 is one of the most popular ...

    aws ec2

    Amazon web services have so many services to offer it often feels like finding a needle in a haystack.

    亚马逊网络服务提供了如此多的服务,感觉就像在大海捞针。

    EC2 is one of the most popular offerings of AWS.

    EC2是AWS最受欢迎的产品之一。

    Elastic Cloud Compute is the scalable compute capacity provided by AWS. It is your hardware on the cloud which is on-demand and ready to be provisioned with a lot of options to choose from. Imagine having the power to provide an unlimited fleet of Instance with a lot of computing capacity and no upfront payment.

    弹性云计算是AWS提供的可扩展计算能力。 随需应变的是您在云上的硬件,随时可以为其提供许多选择。 想象一下,有能力提供具有大量计算能力且无需预付款的无限实例实例。

    EC2 mainly consists of capabilities such as Renting virtual machines, storing data on virtual devices using EBS, distributing the load across machines using ELB, and scaling services using the auto-scaling groups.

    EC2主要包括以下功能:租用虚拟机,使用EBS在虚拟设备上存储数据,使用ELB在计算机之间分配负载以及使用自动扩展组扩展服务。

    Renting virtual machines:

    租用虚拟机:

    Virtual machines are the heart of cloud computing if you ignore serverless for a moment. Nearly every application running on the cloud uses a virtual machine as their host.

    如果您暂时忽略无服务器,虚拟机将是云计算的核心。 几乎所有在云上运行的应用程序都使用虚拟机作为其主机。

    AWS provides a variety of virtual machines to rent with different sizes and memory or compute capacity or based on the payment options as well. The instances sizes vary from t2.nano being the smallest to i3en.metal with various combinations of memory-optimized, compute-optimized, storage-optimized, and General purpose.

    AWS提供了各种虚拟机,它们可以租用具有不同大小和内存或计算能力的虚拟机,也可以基于付款方式租用。 实例的大小从最小的t2.nano到i3en.metal,具有内存优化,计算优化,存储优化和通用的各种组合。

    It has so many options that one can easily get confused while choosing the right instance for their type of workload. But having so many options to choose from and having categorized instances based on the type of workload they can optimally handle can also provide some help while choosing the instance type.

    它有很多选择,以至于在为他们的工作负载类型选择合适的实例时,很容易感到困惑。 但是,有太多选项可供选择,并且根据实例可以优化处理的工作负载类型对其进行了分类,这也可以在选择实例类型时提供一些帮助。

    Pricing of virtual machines also varies from no upfront payment to reserved instances which also provides options to its customer on whether they want to a commitment or not. The pay as you go model can help some to save money if you have no idea about the workload you are going to have. While reserving instances or Host for a period of time can also save some money for customers who know their workload and can commit for a period of time to have stability. There are many more options such as spot instances that are super cheap but can be taken away if the bid goes higher.

    虚拟机的定价也从无预付款到预留实例不等,这也为其客户提供了是否要承诺的选项。 如果您不知道要承担的工作量,那么按需付款模型可以帮助一些人省钱。 在保留实例或主机一段时间后,还可以为知道其工作量并可以承诺一定时间保持稳定性的客户节省一些钱。 还有很多其他选择,例如现货实例,它们非常便宜,但是如果出价提高,可以将其取消。

    存储数据: (Storing data:)

    Elastic Block Storage is a network drive for AWS, It acts as a raw disk for storage in EC2. It is like a detachable drive on the cloud. You can use EBS volumes and attach them to any instance and start using them instantly. In the case of instance failure, the data stored in EBS is secured and can be detached from the instance and used somewhere else.

    Elastic Block Storage是AWS的网络驱动器,它充当EC2中存储的原始磁盘。 就像云上的可拆卸驱动器。 您可以使用EBS卷并将它们附加到任何实例,然后立即开始使用它们。 在实例失败的情况下,存储在EBS中的数据是安全的,可以与实例分离并在其他地方使用。

    As EBS acts as an independent entity it can be detached from one instance and can be attached to another. EBS volumes are locked to an Availability zone and have a provisioned capacity. EBS volumes come in 4 types i.e.

    由于EBS充当独立实体,因此它可以与一个实例分离并可以附加到另一个实例。 EBS卷被锁定到“可用性”区域并具有预配置的容量。 EBS卷有4种类型,即

    Elastic Block Storage
    EBS
    电子广播系统
    1. GP2 (SSD)

      GP2(固态硬碟)
    2. IO1 (SSD)

      IO1(SSD)
    3. ST1 (HDD)

      ST1(硬盘)
    4. SC1 (HDD)

      SC1(硬碟)

    Instance Store also provides temporary block storage for instances. These are different from EBS as they are physically attached to the Host instance, this comes with its pros and cons.

    实例存储还为实例提供临时块存储。 这些与EBS有所不同,因为它们物理连接到Host实例,这具有其优缺点。

    Instance Store with EC2
    Instance Store
    实例存储

    Pros being:

    优点是:

    1. As they are physically attached to the host instance it has better I/O performance.

      由于它们物理连接到主机实例,因此具有更好的I / O性能。
    2. The instance store can be used as a Buffer or a cache.

      实例存储可以用作缓冲区或缓存。
    3. The data stored in the Instance store is persisted during reboots.

      重新启动期间,实例存储中存储的数据将保持不变。

    Cons being:

    缺点是:

    1. On stop or termination, the instance store is lost along with the data stored in it.

      在停止或终止时,实例存储及其中存储的数据都会丢失。
    2. You cannot resize the instance store.

      您无法调整实例存储的大小。
    3. If you need to back up the data in the instance store we manually need to back it up there is no automated process. In short Instance store is a physical disk with very high ops that cannot be increased in size and has a risk of data loss if hardware fails.

      如果您需要备份实例存储中的数据,我们需要手动备份,因此没有自动过程。 简而言之,实例存储是具有很高操作性能的物理磁盘,无法增加其大小,并且如果硬件出现故障,则存在数据丢失的风险。

    EFS (Elastic File Storage)Amazon EFS is a network file system that is managed by AWS. It provides scalable file storage. It is said to be infinitely scalable and has so many advantages over EBS and Instance Store. We can configure multiple instances to have a common file system. It also works in multiple Availability Zones, which makes it easy for instances from different Availability Zones to connect to the file system and work from the same data source.

    EFS(弹性文件存储) Amazon EFS是由AWS管理的网络文件系统。 它提供可扩展的文件存储。 据说它具有无限的可扩展性,并且与EBS和实例存储相比具有许多优势。 我们可以将多个实例配置为具有公共文件系统。 它还可以在多个可用区中使用,这使得来自不同可用区的实例很容易连接到文件系统并从同一数据源进行工作。

    Elastic File Storage
    Elastic File Storage
    弹性文件存储

    EFS uses the NFS v4.1 protocol. It is a highly available, scalable, and Expensive service i.e 3 times more expensive from GP2 of EBS. We can use security groups to control access to EFS. We can have encryption at rest using the KMS service.

    EFS使用NFS v4.1协议。 它是一种高度可用,可扩展且昂贵的服务,即价格是EBS的GP2的三倍。 我们可以使用安全组来控制对EFS的访问。 使用KMS服务,我们可以在静止状态下进行加密。

    NOTE: It is only compatible with Linux based AMI and not windows.

    注意:它仅与基于Linux的AMI兼容,而与Windows不兼容。

    分配负载: (Distributing load:)

    EC2 service provides a load balancer for distributing load between multiple instances in AWS. Using a load balancer helps us to manage the incoming request and balance it across a fleet of instances. This helps us ensure that our application’s downtime is minimized as much as possible.

    EC2服务提供了一个负载均衡器,用于在AWS中的多个实例之间分配负载。 使用负载平衡器有助于我们管理传入的请求并在一系列实例之间平衡它。 这有助于我们确保尽可能减少应用程序的停机时间。

    We can have multiple downstream instances to balance your load while exposing a single point of access or DNS. This helps us manage failure, Load balancer regularly health checks the instances, and if an instance fails it stops sending traffic to those instances and triggers an alarm. It also provides SSL termination.

    我们可以有多个下游实例来平衡您的负载,同时公开一个访问点或DNS。 这有助于我们管理故障,负载均衡器定期对实例进行运行状况检查,如果实例失败,它将停止向这些实例发送流量并触发警报。 它还提供SSL终止。

    Load Balancer

    There are three types of load balancer in AWS i.e.

    AWS中有三种类型的负载均衡器,即

    1. Classic load balancer (V1)

      经典负载均衡器(V1)
    2. Application load balancer (V2)

      应用程序负载平衡器(V2)
    3. Network load balancer (V2)

      网络负载平衡器(V2)

    We can also set up a load balancer internally. So that we can load balance internally between the instances. for example, we can have a web tier and an application tier, the web tier sends a request to the application tier. We can set up an internal load balancer to balance requests coming from the web tier into the application tier.

    我们还可以在内部设置负载均衡器。 这样我们就可以在实例之间进行内部负载平衡。 例如,我们可以有一个Web层和一个应用程序层,该Web层向该应用程序层发送一个请求。 我们可以设置一个内部负载平衡器来平衡从Web层到应用程序层的请求。

    Internal Load Balancer

    We can also set up stickiness so that the request from one user only goes to a single instance for a period of time to ensure consistency.

    我们还可以设置粘性,以便一个用户的请求仅在一段时间内转到单个实例,以确保一致性。

    缩放服务: (Scaling Services:)

    Selecting the perfect instance for the workload is one of the most difficult tasks for a solutions architect. Even though there is a range of options to choose from, we still can’t predict the correct amount of instances required to balance our workload. AWS’s Auto-scaling does a commendable job in balancing the number of instances.

    为工作负载选择理想的实例是解决方案架构师最困难的任务之一。 即使有多种选择,我们仍然无法预测平衡工作量所需的正确实例数量。 AWS的自动扩展在平衡实例数量方面做得可圈可点。

    Just imagine your server having more workload on Wednesdays and less on Sundays, how will you commission servers to match the workload? No worries, we just need to add our instances into an Auto-Scaling group and define policies on how you want to scale your instances. If you have a predictive workload you can set up a policy saying that increases the number of instances to 5 on Wednesdays or if you have an unpredictable workload you can set up policies based on various parameters such as CPU or memory usage. Say if my instances have more than 80% of CPU utilization increase the number of instances by one.

    试想一下,您的服务器在星期三有更多的工作量,而在星期天有更少的工作量,您将如何调试服务器以匹配工作量? 不用担心,我们只需要将实例添加到Auto-Scaling组中,并定义有关如何扩展实例的策略。 如果您有预测性的工作负载,则可以设置一个策略,说在星期三将实例数增加到5;如果您有不可预测的工作负载,则可以基于各种参数(例如CPU或内存使用率)来设置策略。 假设我的实例的CPU利用率超过80%,则实例数增加1。

    We can also set up an scale in policy that will ensure that we don’t over provision instances that are of no use. So we can set a policy that says remove instances if the CPU utilization is below 20%. In this way, you can automate the process of scaling in and out instances with no manual intervention. Auto-Scaling ensures high availability and when used along with load balancer can help us provide quality service to our customers.

    我们还可以在策略中设置规模,以确保我们不会过度配置无用的实例。 因此,我们可以设置一个策略,如果CPU利用率低于20%,则删除实例。 这样,您无需手动干预即可自动执行扩展和扩展实例的过程。 自动扩展可确保高可用性,并且与负载平衡器一起使用时,可以帮助我们为客户提供优质的服务。

    Auto Scaling group

    结论: (Conclusion:)

    EC2 is one of the most popular offerings of AWS and there is much more to discuss and learn in EC2.

    EC2是AWS最受欢迎的产品之一,在EC2中还有更多的讨论和学习。

    翻译自: https://medium.com/swlh/ec2-the-heart-of-aws-7452889f20f2

    aws ec2

    展开全文
  • aws ec2 选择可用区 In this article, we will review how to set up multi-subnet Always On Availability groups using AWS EC2 instances and AWS FSx as file share witness. 在本文中,我们将回顾如何...

    aws ec2 选择可用区

    In this article, we will review how to set up multi-subnet Always On Availability groups using AWS EC2 instances and AWS FSx as file share witness.

    在本文中,我们将回顾如何使用AWS EC2实例和AWS FSx作为文件共享见证来设置多子网Always On可用性组。

    The following are the steps involved in creating a multi-subnet Always On Availability groups in AWS EC2 instances:

    以下是在AWS EC2实例中创建多子网Always On可用性组所涉及的步骤:

    • Prepare EC2 instances

      准备EC2实例
    • Create AWS FSx for file share witness

      创建用于文件共享见证的AWS FSx
    • Create Windows Server Failover cluster

      创建Windows Server故障转移群集
    • Create Always On Availability Groups

      创建始终在线可用性组

    Let’s go over these steps one by one.

    让我们一步一步地进行这些步骤。

    准备EC2实例 (Preparing EC2 instances)

    Log in to the AWS management console, click on Services, and navigate to the EC2 console.

    登录到AWS管理控制台,单击服务 ,然后导航到EC2控制台。

    EC2 Console

    Click on the Launch Instance button and choose the instance of your choice. For demo purposes, I used Windows Server 2019 with SQL Server 2017 Enterprise edition image. You can also launch windows server image and install SQL Server by bringing your own license method (BYOL).

    单击启动实例按钮,然后选择所需的实例。 出于演示目的,我将Windows Server 2019与SQL Server 2017 Enterprise版映像一起使用。 您还可以通过自带许可证方法(BYOL)启动Windows Server映像并安装SQL Server。

    Instance for Always On Availability groups

    Choose the instance type of your choice and configure the instance details like virtual private cloud network (VPC), subnet, etc. In this case, I am launching node 1 in the us-east-1a availability zone.

    选择所需的实例类型,然后配置实例详细信息,例如虚拟私有云网络(VPC),子网等。在这种情况下,我将在us-east-1a可用性区域中启动节点1。

    EC2 instance details

    Add the storage and tag the instances. Configure the security group and launch the instance. Similarly, launch node 2 in the same virtual private cloud network (VPC) but a different availability zone i.e., us-east-1b. So, we have both the nodes up and running in the respective availability zones.

    添加存储并标记实例。 配置安全组并启动实例。 同样,在相同的虚拟私有云网络(VPC)中启动节点2,但在不同的可用区域(即us-east-1b)中启动节点2。 因此,我们在相应的可用区中都启动并运行了节点。

    Ec2 instances in different zones

    Add two secondary IPs for each node. One is used for Windows Server Failover Clustering, and the other will be used for Always On Availability group listener.

    为每个节点添加两个辅助IP。 一种用于Windows Server故障转移群集,另一种用于Always On可用性组侦听器。

    To add the secondary IPs, select the node, and click on Actions (1). Click on Networking (2) and finally select Manage IP Addresses (3).

    要添加辅助IP,请选择节点,然后单击“操作(1)”。 单击网络(2),最后选择管理IP地址(3)。

    Secondary IP address for EC2 instances

    In Manage IP Addresses pop up, Click on Assign new IP two times and then click on Yes, Update as shown in the below image. You can input the custom IP addresses that are available or use the auto-assign option, which assigns a random IP address automatically.

    在弹出的“ 管理IP地址”中 ,单击两次“ 分配新IP” ,然后单击“ 是,更新” ,如下图所示。 您可以输入可用的自定义IP地址,也可以使用自动分配选项,该选项会自动分配一个随机IP地址。

    Similarly, assign two secondary IP addresses on node-2 as well.

    同样,在节点2上也分配两个辅助IP地址。

    Node 1 IP addresses:

    节点1的IP地址:

    Windows OS

    172.31.44.241

    Windows Failover cluster

    172.31.44.223

    Always On Availability groups Listener

    172.31.44.110

    Windows操作系统

    172.31.44.241

    Windows故障转移群集

    172.31.44.223

    始终在线可用性组侦听器

    172.31.44.110

    Node 1 IP addresses

    Node 2 IP addresses:

    节点2的IP地址:

    Windows OS

    172.31.3.187

    Windows Failover cluster

    172.31.4.222

    Always On Availability groups Listener

    172.31.15.89

    Windows操作系统

    172.31.3.187

    Windows故障转移群集

    172.31.4.222

    始终在线可用性组侦听器

    172.31.15.89

    Node 2 IP addresses

    Now we need to add both the nodes to a domain. For detailed steps of adding the nodes to the domain, you can refer to the following SQL Shack articles:

    现在,我们需要将两个节点都添加到域中。 有关将节点添加到域中的详细步骤,可以参考以下SQL Shack文章:

    Adding to domain

    After adding nodes to the window’s active directory domain, restart both the nodes.

    将节点添加到窗口的活动目录域后,重新启动两个节点。

    Log in to each node using the remote desktop protocol (RDP) and start installing the Failover Cluster feature. To install the Failover Cluster feature, Open Server Manager, and click on Add roles and features.

    使用远程桌面协议(RDP)登录到每个节点,然后开始安装故障转移群集功能。 要安装故障转移群集功能,请打开服务器管理器,然后单击添加角色和功能

    Install failover cluster

    Click on the Next button and select Roles-based or feature-based installation. Select the server and click on the Next button. On Features pane, select the Failover clustering feature and click on the Add Features button.

    单击下一步按钮,然后选择基于角色的安装或基于功能的安装。 选择服务器,然后单击下一步按钮。 在“ 功能”窗格上,选择“故障转移”群集功能,然后单击“ 添加功能”按钮。

    Failover cluster feature

    Click Next and select restart the destination server if required. Click on the Install button. Similarly, install the failover cluster feature on node-2 as well.

    单击下一步,然后根据需要选择重新启动目标服务器。 单击安装按钮。 同样,在节点2上也安装故障转移群集功能。

    为文件共享见证创建AWS FSx (Creating AWS FSx for file share witness)

    Log in to the AWS management console, click on Services and navigate to FSx console, as shown in the below image.

    登录到AWS管理控制台,单击服务 ,然后导航到FSx控制台,如下图所示。

    Fsx console

    Click on Create file system and select Amazon FSx for Windows File Server. Click on the Next button.

    单击创建文件系统,然后选择适用于Windows File Server的 Amazon FSx 。 单击下一步按钮。

    Fsx file server

    Enter the file system name, select the configuration options like virtual private cloud (VPC) network, subnet, and security groups. Select self-managed Microsoft Active Directory and enter the domain name and the IP address of the domain controller. Enter the user name and password, which has the right permissions to create AWS FSx objects in Microsoft Active Directory. Click on the Next button and click on Create file system.

    输入文件系统名称,选择配置选项,例如虚拟私有云(VPC)网络,子网和安全组。 选择自我管理的Microsoft Active Directory,然后输入域控制器的域名和IP地址。 输入用户名和密码,该用户名和密码具有在Microsoft Active Directory中创建AWS FSx对象的权限。 单击下一步按钮,然后单击创建文件系统。

    Fsx DNS name

    Once the file system is created successfully and available, click on the file system name to navigate to the file system details page where you can see the DNS name of the file system. You can access the file system using the DNS name. For example, if DNS name is amznfsxnhgf0abc.domain.com then you can access file share using amznfsxnhgf0abc.domain.com\share and the same will be used as file share witness in Always On Availability groups cluster

    成功创建文件系统并使其可用后,单击文件系统名称以导航至文件系统详细信息页面,您可以在其中查看文件系统的DNS名称。 您可以使用DNS名称访问文件系统。 例如,如果DNS名称为amznfsxnhgf0abc.domain.com,则可以使用amznfsxnhgf0abc.domain.com \ share访问文件共享,并且该文件将用作Always On可用性组群集中的文件共享见证。

    Fsx details

    Make sure you have the connectivity to file system from both the nodes by adding rules in the Fsx security group to allow inbound connections from both the nodes.

    通过在Fsx安全组中添加规则以允许来自两个节点的入站连接,确保从两个节点都具有到文件系统的连接性。

    创建Windows Server故障转移群集 (Creating Windows Server Failover cluster)

    Log in to node 1 using the remote desktop protocol (RDP) and launch failover cluster manager. Click on Create Cluster, as shown in the below image.

    使用远程桌面协议(RDP)登录到节点1,并启动故障转移群集管理器。 单击Create Cluster ,如下图所示。

    Windows failover cluster

    Click on the Next button. Add both the nodes and click the Next button.

    单击下一步按钮。 添加两个节点,然后单击下一步按钮。

    Adding nodes to wfcs

    Select Yes to run the validation tests and access the validation report. In this case, I am ignoring the validation test. Click Next.

    选择“ 是”以运行验证测试并访问验证报告。 在这种情况下,我将忽略验证测试。 单击下一步

    Validation on cluster creation

    Enter the name of the failover cluster and click on the Next button to create a Windows failover cluster which manages the Always On Availability groups failover.

    输入故障转移群集的名称,然后单击下一步按钮以创建Windows故障转移群集,该群集管理Always On Availability组故障转移。

    Cluster name

    Once the cluster creation is successful, open the failover cluster manager. Click on the cluster you created (1). Right-click on the IP address under cluster core resources and click on Properties (2). Select the Static IP address and input one of the secondary IP address from the node, which is in 172.31.32.0/20 subnet.

    集群创建成功后,打开故障转移集群管理器。 单击您创建的集群(1)。 右键单击群集核心资源下的IP地址,然后单击属性(2)。 选择静态IP地址,然后从172.31.32.0/20子网中的节点输入辅助IP地址之一。

    Similarly, right-click on the cluster network 1 IP address and click on Properties. Select the static IP address and input one of the secondary IP addresses from another node.

    同样,右键单击群集网络1的IP地址,然后单击“属性”。 选择静态IP地址,然后从另一个节点输入一个辅助IP地址。

    Cluster IP addresses

    Now bring the cluster resource online.

    现在使群集资源联机。

    Cluster resource

    Now let us configure the file share witness. Right-click on the cluster (1) and select More Actions (2). Finally, click on Configure Cluster Quorum Settings… (3).

    现在,让我们配置文件共享见证。 右键单击群集(1),然后选择“更多操作”(2)。 最后,单击“配置群集仲裁设置…”(3)。

    Fileshare witness for cluster

    Click on the Next button. Select the Quorum witness and click Next. Select configure a file share as witness and click Next. Input the file share path and click Next.

    单击下一步按钮 选择仲裁见证人,然后单击下一步 。 选择将文件共享配置为见证服务器,然后单击下一步 。 输入文件共享路径,然后单击“ 下一步”。

    创建始终在线可用性组 (Creating Always on Availability Group)

    Log in to the node 1 using the remote desktop protocol (RDP) and open SQL Server configuration manager. Click on SQL Server Services and right-click on SQL Server service. Click on Properties. Navigate to AlwaysOn High Availability tab and Enable AlwaysOn Availability groups and restart the SQL Server services. Repeat the same steps on node 2 to enable AlwaysOn Availability Groups.

    使用远程桌面协议(RDP)登录到节点1并打开SQL Server配置管理器。 单击“ SQL Server服务”,然后右键单击“ SQL Server服务”。 单击属性。 导航到AlwaysOn高可用性选项卡,然后启用AlwaysOn可用性组,然后重新启动SQL Server服务。 在节点2上重复相同的步骤以启用AlwaysOn可用性组。

    Enable Always-On Availability groups

    Open SQL Server management studio (SSMS) on node-1 and log in to the SQL server. Navigate to Always On High Availability and right-click on it and select New Availability Group Wizard. Click on the Next button.

    在节点1上打开SQL Server Management Studio(SSMS),然后登录到SQL Server。 导航到Always On高可用性,然后右键单击它,然后选择New Availability Group Wizard。 单击下一步按钮。

    Enter the Always On Availability group’s name and click on the Next button.

    输入Always On Availability组的名称,然后单击Next按钮。

    Availibilty group name

    Select the databases that need to be added to the availability group and Add the secondary node as Replica. In the listener tab, enter the listener name and add the secondary IP from both nodes which are not used. Click Next.

    选择需要添加到可用性组的数据库,然后将辅助节点添加为副本。 在“侦听器”选项卡中,输入侦听器名称,并从两个未使用的节点中添加辅助IP。 单击下一步

    AOAG listner

    Select the type of data synchronization as per your choice. In this case, I used a full database backup and log backup. Click Next and Finish.

    根据您的选择选择数据同步的类型。 在这种情况下,我使用了完整的数据库备份和日志备份。 单击下一步,然后单击完成

    After successful creation of Always on Availability group, navigate to the availability group in SQL Server management studio (SSMS). Right-click on the availability group and click on Show Dashboard to see the health of Always on Availability groups. Please refer to the below image for the dashboard.

    成功创建始终在线可用性组后,请导航到SQL Server Management Studio(SSMS)中的可用性组。 右键单击可用性组,然后单击“ 显示仪表板”以查看“始终可用”组的运行状况。 请参考下图的仪表板。

    AOAG health

    To test the failover, I shutdown the current primary node and connected using Always On listener name from SQL Server management studio (SSMS). Please refer to the below image for the Always-On dashboard after automatic failover. We can see that the previous primary node is shut down, and the previous secondary node became the primary node after automatic failover. The listener will serve requests from the listener IP address of the currently active node.

    为了测试故障转移,我关闭了当前的主节点,并使用来自SQL Server Management Studio(SSMS)的Always On侦听器名称进行了连接。 自动故障转移后,请参考下图的始终在线仪表板。 我们可以看到先前的主节点已关闭,并且先前的辅助节点在自动故障转移后成为了主节点。 侦听器将处理来自当前活动节点的侦听器IP地址的请求。

    Always on failover

    结论 (Conclusion)

    In this article, we explored how to set up multi-subnet Always On Availability Groups using AWS EC2 instances. In case you have any questions, please feel free to ask in the comment section below. To continue you learning about Always On Availability Groups, Please refer to the AlwaysOn Availability Groups category.

    在本文中,我们探讨了如何使用AWS EC2实例设置多子网Always On可用性组。 如果您有任何疑问,请随时在下面的评论部分中提问。 若要继续学习Always On可用性组,请参考AlwaysOn可用性组类别。

    翻译自: https://www.sqlshack.com/configuring-sql-server-always-on-availability-groups-on-aws-ec2/

    aws ec2 选择可用区

    展开全文
  • 实例连接器和实例之间的连接器,以及实例AWS EC2(没有SSH的所有外部版本)。 最新的博客文章:TOBECOMPLETED 使用率 Tous ces模块可以使用avec Terraform。 注释avec Terraform 0.13.4主要声明兼容版本的antcé...
  • AWS EC2 API

    2015-06-12 08:37:10
    AWS EC2 API (English Version)
  • 使用IAM管理AWS EC2 SSH访问 2019年6月:签出作为该项目的替代品 2018年9月:检出以替代该项目 使用IAM用户的公共SSH密钥通过SSH访问正在运行的EC2实例 亚马逊Linux 2017.09 亚马逊Linux 2 2017.12 Ubuntu 16.04 ...
  • terraform-aws-ec2-instance 这个terraform模块创建一个ec2实例。 它支持以下配置: n个AWS EC2实例数 (可选)创建ec2密钥对 (可选)创建EC2实例自动恢复cloudwatch警报 可选的cloud-init gzip + base64 ...
  • aws-ec2-调度程序 定期启动和关闭 AWS EC2 实例的调度程序 安装 如果您全局安装了 composer,只需运行 composer install 否则从获取作曲家 配置 将 config/settings.yml.dist 文件复制到 config/settings.yml 并...
  • aws-ec2-assign-elastic-ip, 自动分配弹性ip到 AWS EC2自动缩放组实例 aws-ec2-assign-elastic-ip 自动分配弹性ip到 AWS EC2实例。 在自动缩放组中,这可以能非常好,你需要通信ip第三方系统。应该在应该分配有弹性...
  • AWS EC2用户指南

    2016-01-13 11:02:24
    精品AWS EC2用户指南, 高清,压箱底资料.pdf
  • Deploying on AWS EC2

    2020-12-01 16:36:38
    <div><p>I am currently have the original one deployed on my AWS EC2 Instance, but I am getting a connection refused error when the API is trying to make a call. The products would not show up if I ...
  • AWS-EC2-Instance-Store-Raid0-脚本 什么是EC2-Instance-Store? AWS EC2实例提供了实例存储,但它们是临时的块级存储。 如果停止ec2实例并重新启动实例,则会发现实例存储中的数据可能会丢失。 如果要防止这种情况...
  • AWS EC2实例切换器 按计划启动,停止,重启或终止AWS EC2实例 用例示例: 我们希望在每个工作日8点开始开发环境,在18个工作日停止它。 我们希望在10时开始开发环境,而在星期六将其停止在16时。 我们想在10时...
  • Install Minishift on AWS ec2

    2020-12-02 13:37:55
    I want to install Minishift on AWS ec2 instance OS : Red Hat Enterprise Linux 7.5 (HVM), Ubuntu Server 16.04 LTS (HVM) , Instance type: t2.micro </li></ul> <p>I am trying to install on aws ec2 but i ...
  • AWS-EC2-分配弹性IP 自动将弹性IP分配给AWS EC2实例。 如果需要将外部IP与第三方系统进行通信,这在自动伸缩组中会非常好。 该脚本应在应为其分配了弹性IP的EC2实例上执行。 通常,这是在实例启动过程中完成的。 ...
  • slim on AWS EC2

    2020-11-29 23:16:34
    <div><p>Hello, <p>I'm trying to boot an image from slim on AWS EC2 but I'm unable to make it work: ...
  • 该项目将创建一个运行最新LTS版本的Ubuntu Linux的远程AWS EC2实例。 将在实例上安装 ,并创建一个用户。 尽管AWS提供了用于运行和管理容器的多种服务,但该项目旨在为想要探索Docker但不确定如何启动或只是想运行几...
  • 将月度和年度定价计算添加到AWS上的AWS EC2点播和竞价型实例定价页面。 运行此扩展程序时,以下页面将更新。 * https://aws.amazon.com/ec2/pricing/on-demand/ * https://aws.amazon.com/ec2/spot/pricing/注意:...
  • Amazon-AWS-EC2-Deploy-Instruct 葡萄牙语 没有在Amazon AWS EC2(E.Cloud 2)中部署React.js的文档文档 安装ssh -i“ MeuKeyPair.pem”的 Comando parapermissõeseatualizaçõesdamáquinasudo su yum update -y...
  • ec2-tags-env:将AWS EC2标记导入为环境变量
  • Vault AWS EC2 auth

    2020-11-26 18:13:40
    <div><p>This requires #177 to be merged first. <p>Add AWS ec2 auth support for Vault.</p><p>该提问来源于开源项目:hairyhenderson/gomplate</p></div>
  • aws ec2流量限制If a team with many accounts share and manages the virtual machines under that same AWS accounts, it is a common practice to limit AWS EC2 accounts’ access to view or start all VMs yet...

    aws ec2流量限制

    If a team with many accounts share and manages the virtual machines under that same AWS accounts, it is a common practice to limit AWS EC2 accounts’ access to view or start all VMs yet stop only certain VMs. For example, one account has 50 VMs tagged "prod" while 25 VMs tagged "dev". The developers should be able to start all the "prod" and "dev" VMs while they only be able to stop the "dev" VMs unless they have accesses to the "prod" VMs. These limitations can avoid accidentally shutting down production virtual machines.

    如果拥有多个账户的团队在同一 AWS账户下共享和管理虚拟机,通常的做法是限制AWS EC2账户的访问权限以查看或启动所有VM,而仅停止某些VM。 例如,一个帐户有50个标记为“ prod”的VM,而25个标记为“ dev”的VM。 开发人员应该能够启动所有“ prod”和“ dev” VM,而他们只能停止“ dev” VM,除非他们有权访问“ prod” VM。 这些限制可以避免意外关闭生产虚拟机。

    AWS gives the mechanism to achieve so in the IAM management. We show how to make use of the policies in AWS IAM management to achieve such goals.

    AWS提供了在IAM管理中实现这一目标的机制。 我们将展示如何利用AWS IAM管理中的策略来实现这些目标。

    In AWS, VMs can be tagged, and there are policies the can filter VMs by tags. There are user groups and users. User can be assgined to one or many user groups and the policies can be attached to the user groups to give access rights.

    在AWS中,可以对VM进行标记,并且存在可以按标记过滤 VM的策略。 有用户组和用户。 可以将用户分配给一个或多个用户组,并且可以将策略附加到这些用户组以提供访问权限。

    users---belong to---> user group <---attached to---policy

    To limit certain users’ accesses, we can create user groups and policies attached to the user groups, and assign the users to these groups.

    为了限制某些用户的访问,我们可以创建用户组和附加到用户组的策略,然后将用户分配给这些组。

    建立政策 (Create policies)

    AWS’ policy system is very flexible and at fine granularity. The policies can be implemented as a JSON file and uploaded to AWS management console to take effect. In this example, we will create 2 policies to

    AWS的策略系统非常灵活且粒度精细。 这些策略可以实现为JSON文件,并上传到AWS管理控制台以生效。 在此示例中,我们将创建2个策略

    • list all instances

      列出所有实例
    • start all instances

      启动所有实例
    • stop instances that have a tag "Prod/Dev" set to "dev"

      停止将标签“ Prod / Dev”设置为“ dev”的实例

    We will implement the rules in 2 policies.

    我们将在2个策略中实施规则。

    The policy control web page interface in the IAM management allows us to create new policies as follows.

    IAM管理中的策略控制网页界面使我们可以如下创建新策略。

    We create two policies with JSON content as follows.

    我们创建具有JSON内容的两个策略,如下所示。

    ListAndStartInstances

    ListAndStartInstances

    {
        "Version": "2012-10-17",
        "Statement": [
            {
                "Sid": "VisualEditor0",
                "Effect": "Allow",
                "Action": [
                    "ec2:StartInstances",
                    "ec2:GetConsoleScreenshot"
                ],
                "Resource": "arn:aws:ec2:*:*:instance/*"
            },
            {
                "Sid": "VisualEditor1",
                "Effect": "Allow",
                "Action": [
                    "ec2:DescribeInstances",
                    "ec2:DescribeAggregateIdFormat",
                    "ec2:DescribeVolumesModifications",
                    "ec2:GetHostReservationPurchasePreview",
                    "ec2:DescribeSnapshots",
                    "ec2:DescribePlacementGroups",
                    "ec2:DescribeHostReservationOfferings",
                    "ec2:DescribeInternetGateways",
                    "ec2:DescribeVolumeStatus",
                    "ec2:GetLaunchTemplateData",
                    "ec2:DescribeScheduledInstanceAvailability",
                    "ec2:DescribeSpotDatafeedSubscription",
                    "ec2:DescribeVolumes",
                    "ec2:DescribeFpgaImageAttribute",
                    "ec2:DescribeAccountAttributes",
                    "ec2:DescribeExportTasks",
                    "ec2:DescribeNetworkInterfacePermissions",
                    "ec2:DescribeReservedInstances",
                    "ec2:DescribeKeyPairs",
                    "ec2:DescribeNetworkAcls",
                    "ec2:DescribeRouteTables",
                    "ec2:DescribeEgressOnlyInternetGateways",
                    "ec2:DescribeReservedInstancesListings",
                    "ec2:DescribeSpotFleetRequestHistory",
                    "ec2:DescribeLaunchTemplates",
                    "ec2:DescribeSnapshotAttribute",
                    "ec2:DescribeVpcClassicLinkDnsSupport",
                    "ec2:DescribeVpcPeeringConnections",
                    "ec2:DescribeVpnConnections",
                    "ec2:DescribeIdFormat",
                    "ec2:DescribeReservedInstancesOfferings",
                    "ec2:DescribeFleetInstances",
                    "ec2:DescribeVpcEndpointServiceConfigurations",
                    "ec2:DescribePrefixLists",
                    "ec2:GetReservedInstancesExchangeQuote",
                    "ec2:DescribeInstanceCreditSpecifications",
                    "ec2:DescribeVolumeAttribute",
                    "ec2:DescribeVpcClassicLink",
                    "ec2:DescribeImportSnapshotTasks",
                    "ec2:DescribeVpcEndpointServicePermissions",
                    "ec2:GetPasswordData",
                    "ec2:DescribeScheduledInstances",
                    "ec2:DescribeImageAttribute",
                    "ec2:DescribeFleets",
                    "ec2:DescribeElasticGpus",
                    "ec2:DescribeReservedInstancesModifications",
                    "ec2:DescribeVpcEndpoints",
                    "ec2:DescribeSubnets",
                    "ec2:DescribeVpnGateways",
                    "ec2:DescribeMovingAddresses",
                    "ec2:DescribeFleetHistory",
                    "ec2:DescribeAddresses",
                    "ec2:DescribePrincipalIdFormat",
                    "ec2:DescribeInstanceAttribute",
                    "ec2:DescribeFlowLogs",
                    "ec2:DescribeRegions",
                    "ec2:DescribeDhcpOptions",
                    "ec2:DescribeVpcEndpointServices",
                    "ec2:DescribeSpotInstanceRequests",
                    "ec2:DescribeVpcAttribute",
                    "ec2:GetConsoleOutput",
                    "ec2:DescribeSpotPriceHistory",
                    "ec2:DescribeNetworkInterfaces",
                    "ec2:DescribeAvailabilityZones",
                    "ec2:DescribeNetworkInterfaceAttribute",
                    "ec2:DescribeVpcEndpointConnections",
                    "ec2:DescribeInstanceStatus",
                    "ec2:DescribeHostReservations",
                    "ec2:DescribeIamInstanceProfileAssociations",
                    "ec2:DescribeTags",
                    "ec2:DescribeLaunchTemplateVersions",
                    "ec2:DescribeBundleTasks",
                    "ec2:DescribeClassicLinkInstances",
                    "ec2:DescribeIdentityIdFormat",
                    "ec2:DescribeImportImageTasks",
                    "ec2:DescribeNatGateways",
                    "ec2:DescribeCustomerGateways",
                    "ec2:DescribeVpcEndpointConnectionNotifications",
                    "ec2:DescribeSecurityGroups",
                    "ec2:DescribeSpotFleetRequests",
                    "ec2:DescribeHosts",
                    "ec2:DescribeImages",
                    "ec2:DescribeFpgaImages",
                    "ec2:DescribeSpotFleetInstances",
                    "ec2:DescribeSecurityGroupReferences",
                    "ec2:DescribeVpcs",
                    "ec2:DescribeConversionTasks",
                    "ec2:DescribeStaleSecurityGroups"
                ],
                "Resource": "*"
            }

    StopDevInstances

    StopDevInstances

    {
        "Version": "2012-10-17",
        "Statement": [
            {
                "Sid": "VisualEditor0",
                "Effect": "Allow",
                "Action": "ec2:StopInstances",
                "Resource": "arn:aws:ec2:*:*:instance/*",
                "Condition": {
                    "StringEquals": {
                        "ec2:ResourceTag/Prod/Dev": "dev"
                    }
                }
            }
        ]
    }

    ListAndStartInstances allows users to view and start EC2 VMs. StopDevInstances allows users to shutdown VMs whose tag "Prod/Dev" is "dev".

    ListAndStartInstances允许用户查看和启动EC2 VM。 StopDevInstances允许用户关闭标记为“ Prod / Dev”为“ dev”的VM。

    创建组 (Create group)

    In the next step, we create a "devs" user group so that the policies can be attached to.

    在下一步中,我们创建一个“ devs”用户组,以便可以将策略附加到该用户组。

    This can be done in the "Group" page.

    这可以在“组”页面中完成。

    将策略附加到组 (Attach policies to the group)

    We can then attache the 2 policies to the "devs" user group.

    然后,我们可以将这两个策略附加到“ devs”用户组。

    新增使用者 (Add users)

    If the users are not yet created, we need to create the users.

    如果尚未创建用户,则需要创建用户。

    将用户添加到组 (Add users to the group)

    Then we add these users to the "devs" user group.

    然后,我们将这些用户添加到“ devs”用户组中。

    Now, we are done in setting the "devs" user group and the policies to limit its accesses to control the VMs in AWS EC2. You can use the technique shown here further to control and manage other resources in AWS or implement other management rules.

    现在,我们完成了设置“ devs”用户组和策略的操作,以限制其访问权限以控制AWS EC2中的VM。 您可以进一步使用此处显示的技术来控制和管理AWS中的其他资源或实施其他管理规则。

    翻译自: https://www.systutorials.com/how-to-limit-shared-aws-ec2-accounts-access-to-view-and-start-all-vms-yet-stop-only-certain-vms/

    aws ec2流量限制

    展开全文
  • 数据是从发布的EC2服务生成的,该服务是一个巨大的(> 535M)json文件AWS,只要ec2服务发生变化(新实例,降价,其他区域等),AWS就会随时更新。 该文件的问题在于它太钝了(仅需要使用即可读取它)并且需要解析...
  • 如何让AWS EC2实例支持root账号密码登录? 实例系统环境: CentOS 7 AWS默认使用 用户名centos 与 public key秘钥登录 sudo passwd root 输入两次password,为root用户添加密码; su root 输入password 切换到 root...
  • AWS EC2文件上传

    千次阅读 2019-01-22 16:31:11
    AWS EC2申请配置、文件上传、nginx安装部署、tomcat安装和项目部署、域名绑定 AWS EC2服务器申请配置 我这里是参考简书的一篇博客: 利用 AWSEC2来搭建属于自己的 VPN 服务器(MAC平台) 在步骤4搭建vpn...
  • 创建AWS EC2实例

    2021-02-18 10:59:25
    创建AWS EC2实例前提条件创建EC2步骤 前提条件 需要自行到AWS官网先注册AWS账号。本文不叙述注册账号过程! 创建EC2步骤 根据自己的需求选择系统镜像AMI,如果仅需免费套餐可以勾选仅免费套餐,如下图所示。 ...
  • PureWeb:registered: AWS EC2 调度程序 需要创建 Amazon Linux AMI 才能以设定的时间间隔(5 分钟让实例有时间启动/停止)运行脚本 ec2_operator_pureweb_design.py 创建实例时,将这个存储库中 pureweb-design-ec2...
  • Amazon Elastic Compute Cloud (EC2) 是一项Web服务,提供规模可调的云服务器托管服务,让开发人员能轻易地使用web级计算亚马逊AWS EC2 windows实例用户指南

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 13,097
精华内容 5,238
关键字:

awsec2