Easy ReviewDOP-C02
SDLC Automation45

EC2

Share and copy instance images, plan for temporary disk data loss, and recover supported instances after host failures.

Este conteúdo de estudo ainda não foi traduzido, então aparece em inglês. Ajude a traduzir

EC2 runs virtual servers called instances. Use Amazon Machine Images (AMIs) to launch their software, instance store for temporary local data, and automatic recovery to restore supported instances after an underlying host failure.

Instance types

An EC2 instance typeThe choice that determines an EC2 instance's compute, memory and storage hardware capabilities. sets the CPU, memory, storage and networking of a virtual server. Types are grouped into categories by what they’re good at, so the first choice is the category that matches the workload.

How it works

  1. Identify the workload’s bottleneck: CPU, memory, local disk, or specialized math such as graphics.
  2. Pick the matching category, then the family and size inside it.
  3. Measure and resize as usage changes (right-sizing).
Category Strength Example workloads
General purpose Balanced compute, memory and network Web servers, code repositories
Compute optimized High-performance processors Batch processing, media transcoding, gaming servers, ML inference
Memory optimized Large data sets in memory In-memory databases, real-time analytics
Storage optimized High sequential I/O on local storageTemporary instance storage provided by disks physically attached to its host. Data warehousing, large data sets on local disks
Accelerated computing Hardware accelerators such as GPUs Graphics, ML training, pattern matching
High-performance computing Price performance for HPC at scale Large simulations, deep learning

Exam cues

  • If the question says balanced or general web workload, think general purpose.
  • If the question says CPU-bound processing, think compute optimized.
  • If the question says large in-memory data sets, think memory optimized.
  • If the question says high I/O on local storage, think storage optimized.
  • If the question says GPUs or graphics, think accelerated computing.

Remember

  • Six categories: general purpose, compute, memory, storage, accelerated computing, HPC.

Trap: “Storage optimized” is about fast local instance storage, not about the most EBS capacity. Large EBS volumes attach to any category.

Da documentação da AWS (17)
  • An EC2 instance type determines the hardware of the host computer; each type offers different compute, memory and storage capabilities and belongs to an instance family grouped by those capabilities.
  • General purpose instances balance compute, memory and networking, which suits applications that use them in equal proportions, such as web servers and code repositories.
  • Compute optimized instances suit compute-intensive applications that benefit from high-performance processors, such as batch processing, media transcoding, high-performance web servers, scientific modeling, dedicated gaming servers and machine learning inference.
  • Memory optimized instances deliver fast performance for workloads that process large data sets in memory.
  • Storage optimized instances suit workloads that need high, sequential read and write access to very large data sets on local storage, delivering tens of thousands of low-latency random IOPS.
  • Accelerated computing instances use hardware accelerators, or co-processors, for functions such as floating point calculations, graphics processing or data pattern matching more efficiently than CPUs.
  • High-performance computing instances offer the best price performance for HPC workloads at scale, such as large, complex simulations and deep learning.
  • Amazon EC2 provides scalable compute capacity in the AWS Cloud as virtual servers (instances) that you configure and manage, including the operating system.
  • EC2 Mac instances run macOS on Apple hardware for building, testing and signing apps for Apple platforms such as iPhone, iPad and Mac; they run only on Dedicated Hosts with a 24-hour minimum allocation.
  • On Linux, EC2 user data scripts run as root on the first boot by default; the instance can be configured to run them again on later restarts.
  • Stopping, hibernating or terminating an instance erases its instance store data.
  • Instance store suits temporary data such as caches, buffers and scratch files.
  • To preserve instance store data beyond the instance lifetime, copy it to persistent storage such as EBS, S3 or EFS.
  • Instance store is temporary block storage on disks physically attached to the host computer, suited to buffers, caches and scratch data.
  • Instance store volumes have no additional charge; they are included in the instance usage cost.
  • An Amazon Machine Image (AMI) supplies the software used to set up and boot an EC2 instance.
  • An AMI must be compatible with the instance type selected for launch.

AMI scope and sharing

An Amazon Machine ImageA software image used to set up and boot an EC2 instance. (AMI) is a software template for setting up and booting EC2 instances. Sharing lets another account launch from your template; copying creates a separate image. An EBS-backed AMIA launch image whose disk data comes from EBS snapshots. uses EBS snapshotsA backup of an EBS volume's data at a particular point in time., point-in-time backups of disk volumes.

How it works

  1. Select an AMI in the launch RegionA separate geographic area containing AWS infrastructure. that supports the chosen instance typeThe choice that determines an EC2 instance's compute, memory and storage hardware capabilities., the instance’s hardware configuration. A Region is a separate geographic area containing isolated locations called Availability Zones.
  2. To let another account launch from your AMI, grant it launch permissionPermission to launch EC2 instances from an AMI without owning that image.. The source AMI remains yours.
  3. For encrypted snapshots, grant access to their KMS encryption keys too. Use a customer managed keyAn encryption key that you create and control in AWS KMS., which you create and control. An AWS managed keyA KMS key whose lifecycle and permissions AWS controls for use with its designated service in your account., whose permissions AWS controls, cannot support cross-account AMI sharing.
  4. To give the recipient its own image, let it copy the shared AMI.
  5. For another Region, copy the AMI there and set launch permissions on the copy. Copying does not carry over those permissions. To select a different encryption key for the copy, set Encrypted and KmsKeyId on CopyImage.
  6. For another Availability ZoneAn isolated location within an AWS Region. in the same Region, create an AMI and launch a replacement in the destination subnetA range of IP addresses in a VPC that lies within one Availability Zone.. A subnet is a range of addresses in your virtual private cloud (VPC) within one zone. AWSSupport-CopyEC2Instance automates this procedure. Update references to changed addresses.
Requirement Mechanism Ownership or scope
Another account needs to launch Share the AMI and any required encryption keys Source account owns the image
Another account needs its own image Copy the shared AMI Recipient owns the copy
Instances must run in another Region Copy the AMI into that Region Launch from the destination image
Instance must run in another zone Launch a replacement from an AMI in the destination subnet New instance and changed addresses

Exam cues

  • If the question says an encrypted shared AMI cannot launch, think KMS key access, because image permission alone does not authorize use of the encryption keys.
  • If the question says relocate an instance to another Availability Zone, think an AMI and a replacement launch, because the target subnet determines the zone.

Remember

  • AMIs are Regional; sharing does not extend their launch scope.
  • The source account pays for shared-image storage; the recipient owns an AMI it copies.
  • aws/ebs is an AWS managed key. An AMI encrypted with the default AWS managed key cannot be shared.
  • Copies need their own launch permissions. Encrypted snapshots cannot become unencrypted through copying.
  • Paid AMIs: the owner’s software rate plus standard EC2 fees.

Trap: A shared AMI is permission to use the owner’s image. It does not create an image owned by the recipient.

Relocate within a Region by launching from an AMI
Source zoneDestination zone12Source instancecurrent subnetRegional AMIinstance softwareNew instancedestination subnet
  1. Create an AMI from the source instance.

  2. Launch a new instance in the destination subnet and update references to changed addresses.

Da documentação da AWS (24)
  • An EC2 instance type determines the host hardware configuration used for an instance.
  • An AWS Region is a separate geographic area containing isolated locations called Availability Zones.
  • An AMI can launch instances only in its own AWS Region.
  • Sharing an AMI grants another account launch permission without transferring ownership of the source AMI.
  • The source account continues paying for the storage of a shared AMI.
  • A recipient of an encrypted AMI needs permission to use the KMS keys that encrypt its backing snapshots.
  • An AMI backed by snapshots encrypted with the default AWS managed key cannot be shared.
  • A customer managed key is a KMS key that the customer creates and controls.
  • AWS manages the lifecycle and permissions of an AWS managed KMS key such as aws/ebs.
  • Copying a shared AMI creates a target AMI owned by the recipient account.
  • To share an AMI in another Region, copy it to that Region and share the copy there.
  • AMI copying does not copy the source AMI launch permissions to the target AMI.
  • Setting Encrypted and KmsKeyId on CopyImage encrypts the target EBS snapshots with the specified KMS key.
  • An encrypted AMI snapshot cannot become unencrypted through AMI copying.
  • A subnet is an IP address range in a VPC that lies entirely within one Availability Zone.
  • AWSSupport-CopyEC2Instance can create an AMI and launch a new instance in a specified subnet to relocate an instance to another Availability Zone.
  • The replacement created by AWSSupport-CopyEC2Instance gets different private IPv4 or public IPv6 addresses and requires references to the old addresses to be updated.
  • An EBS snapshot is a point-in-time backup of an EBS volume.
  • An EBS-backed AMI uses EBS snapshots for its disk image data.
  • Copying an EBS-backed AMI to another Region creates copies of its backing snapshots there, billed as additional snapshot storage.
  • Block public access for AMIs is on by default for new accounts and for existing accounts that never had public AMIs; it is off by default for accounts that had public AMIs.
  • Turning on block public access for AMIs stops new attempts to make an AMI public, but AMIs that are already public stay public.
  • An AMI can be shared with a whole AWS organization or with organizational units instead of listing account IDs.
  • An instance launched from a paid AMI is charged at the rate the AMI owner sets plus the standard EC2 usage fees; AWS Marketplace is where such software is sold.

Instance store lifecycle

Instance storeTemporary instance storage provided by disks physically attached to its host. is temporary disk storage on the physical computer, or hostThe physical computer on which an EC2 instance runs., running an EC2 instance. It suits caches, which hold replaceable copies of data, and scratch filesTemporary working data that does not need permanent storage., which hold temporary working data. Think of it as storage tied to that instance’s local disks.

How it works

  1. Choose an instance typeThe choice that determines an EC2 instance's compute, memory and storage hardware capabilities. and size that provide the required instance store capacity. Not every type includes it.
  2. Attach instance store volumes at launch. A volumeA storage device that an instance can use like a disk. is a disk device the instance can use; you cannot attach these volumes later or move them to another instance.
  3. Use the volumes for temporary data. A reboot restarts the instance without erasing this data.
  4. Copy data that must survive to persistent storage such as EBS, S3 or EFS before stopping or replacing the instance. An EBS-backed AMIA launch image whose disk data comes from EBS snapshots., a launch imageA software image used to set up and boot an EC2 instance. built from EBS storage, does not capture instance store data.
  5. Rebuild temporary data after a stop, hibernationStopping an instance after saving its working memory to its EBS root volume so it can resume later., termination, disk failure or CloudWatch recovery. Hibernation saves working memoryThe instance's working memory, whose contents are lost during automatic recovery. to the EBS root volume before stopping; it still erases instance store data. Changing the instance type also does not carry the data over.
Event Instance store data
Normal instance reboot Retained
Stop, hibernation or termination Erased
Underlying disk failure Lost on the failed disk
Change instance type Does not transfer
Create an EBS-backed AMI Not included in the image
CloudWatch action based recovery Lost

Exam cues

  • If the question says replaceable cache or temporary working files, think instance store, because its disks provide temporary storage on the instance’s host.
  • If the question says local files must survive a stop or replacement, think copying to persistent storage, because instance store cannot preserve them through those events.
  • If the question says an AMI will back up every attached disk, think instance store exclusion, because an EBS-backed AMI does not include local instance store data.

Remember

  • Attach at launch only; you cannot detach and reattach instance store volumes elsewhere.
  • Reboot preserves the data. Stop, hibernation and termination erase it.
  • Instance store capacity depends on the instance type and size.
  • Instance store: host-attached disks, included in the instance price.
  • Instance store also fits temporary data replicated across a fleet.

Trap: Automatic recovery can look like a reboot to the operating system, but CloudWatch action based recovery loses instance store data. Ordinary reboot persistence does not imply recovery persistence.

Da documentação da AWS (15)
  • Instance store provides temporary disk storage physically attached to the EC2 host computer.
  • Instance store availability and capacity depend on the EC2 instance type and size.
  • Instance store volumes can be attached only when an instance launches.
  • An instance store volume cannot be detached and attached to a different instance.
  • Instance store data survives an instance reboot.
  • Stopping, hibernating or terminating an instance erases its instance store data.
  • Failure of an underlying instance store disk loses the data on that disk.
  • Changing an EC2 instance type does not transfer instance store data to the new instance configuration.
  • Creating an EBS-backed AMI does not include the source instance's instance store data.
  • To preserve instance store data beyond the instance lifetime, copy it to persistent storage such as EBS, S3 or EFS.
  • CloudWatch action based EC2 recovery loses data on attached instance store volumes.
  • Successful automatic EC2 recovery appears to the instance as an unplanned reboot.
  • EC2 hibernation saves the instance's working memory to its EBS root volume before stopping.
  • An EBS-backed AMI uses EBS snapshots for its disk image data.
  • Instance store also suits temporary data replicated across a fleet of instances, such as a load-balanced pool of web servers.

Automatic instance recovery

EC2 automatic instance recovery attempts to restore an instance after a problem in its underlying hostThe physical computer on which an EC2 instance runs., the computer running it. The successful operation looks like an unplanned reboot while retaining the instance’s identity. It also retains the Availability ZoneAn isolated location within an AWS Region., an isolated location within an AWS RegionA separate geographic area containing AWS infrastructure., which is a separate geographic area.

How it works

  1. Distinguish the checks. A system status checkAn EC2 check for problems in the AWS infrastructure running an instance. tests AWS infrastructure; an instance status checkAn EC2 check of an individual instance's software and network connectivity. tests the individual instance’s software and network connectivity.
  2. For a supported standalone instance, simplified automatic recovery is enabled at launch by default. For alarm-controlled recovery, configure a CloudWatch alarmA monitor that evaluates a metric against a threshold over a period and can trigger an action. on StatusCheckFailed_System with the recover action. A metricA series of measurements recorded over time. records measurements over time; an alarm evaluates them against a threshold.
  3. After a system failure, AWS attempts to move the instance to another host. Recovery requires a running instance, available capacity and no service events listed in the AWS Health Dashboard.
  4. Successful recovery retains the instance ID, IP addresses, attached EBS disk volumes and zone. It also retains metadataInformation about an instance used to configure or manage it., the information used to configure or manage the instance. An Elastic IPA static public IPv4 address allocated to your AWS account. is a static public IPv4 address allocated to your account; it is retained too.
  5. Expect to lose RAMThe instance's working memory, whose contents are lost during automatic recovery., the instance’s working memory. Operating system uptime resets to zero. CloudWatch recovery also loses instance storeTemporary instance storage provided by disks physically attached to its host. data; simplified recovery excludes instances with instance store volumes.
  6. If recovery fails and the instance remains unreachable or keeps failing system checks, stop and start it manually. This can change its public IPv4 address unless it uses an Elastic IP.
Situation Mechanism Deciding limitation
Supported standalone instance, default recovery Simplified automatic recovery No instance store volumes
Supported standalone instance, alarm-controlled recovery CloudWatch recover action Selected instance store configurations supported, with data loss
Instance software failure, system check passes CloudWatch reboot action Recover cannot use StatusCheckFailed_Instance
Unhealthy Auto Scaling group member Auto Scaling replacement Neither individual-instance recovery mechanism supports group members

For a separate failover approach, a network interface is a virtual network card. A primary interface cannot be detached, but a secondary interface and its private IP addresses can move between EC2 instances within one Availability Zone.

Exam cues

  • If the question says host failure while preserving instance ID and addresses, think recover, because it attempts to restore the same instance on other hardware.
  • If the question says only the instance status check fails, think reboot or instance repair, because the recover action cannot use StatusCheckFailed_Instance.
  • If the question says an instance belongs to an Auto Scaling group, think group health-based replacement, because individual-instance recovery excludes group members.
  • If the question says fail over to another Availability Zone, think a separate replacement strategy, because automatic recovery retains the zone.
  • If the question says transfer private addresses to another instance in the same zone, think a secondary network interface, because its attributes move with it.

Remember

  • StatusCheckFailed_System: 0 means passed; 1 means failed.
  • Simplified recovery is enabled by default only on supported instances. CloudWatch recovery needs an alarm action.
  • With instance store volumes attached at launch, CloudWatch recovery supports M3, C3, R3, X1, X1e, X2idn and X2iedn. It loses their local data.
  • Stop and start an EBS-backed instance to move it to a new host; its public IPv4 address changes.

Trap: Recovery preserves instance identity, addresses and EBS volumes, but not RAM or instance store contents. It is not a guarantee of recovery when capacity is unavailable.

  • EC2 auto recovery handles standalone instances (StatusCheckFailed_System). In an ASG the group replaces the instance.
CloudWatch recovery attempts to restore the same instance
12EC2 instancesystem check failsCloudWatch alarmrecover actionEC2 instancesame ID and zone
  1. A configured alarm evaluates StatusCheckFailed_System and triggers its recovery action.

  2. AWS attempts recovery on another host; success preserves identity and EBS volumes but loses RAM and instance store data.

Da documentação da AWS (32)
  • EC2 system status checks detect problems in the AWS infrastructure hosting an instance.
  • EC2 instance status checks monitor the individual instance's software and network connectivity.
  • StatusCheckFailed_System is 0 for a passed system check and 1 for a failed system check.
  • Automatic instance recovery attempts to move an impaired instance to another host after an underlying hardware or software failure.
  • Successful automatic recovery appears to the instance as an unplanned reboot.
  • Automatic recovery retains the instance ID.
  • Automatic recovery retains public, private and Elastic IP addresses.
  • Automatic recovery retains instance metadata.
  • Automatic recovery retains attached EBS volumes.
  • Automatic recovery retains the instance's Availability Zone.
  • An Availability Zone is an isolated location within an AWS Region, a separate geographic area.
  • Automatic recovery loses volatile memory (RAM) contents.
  • Automatic recovery resets operating system uptime to zero.
  • Simplified automatic recovery is enabled by default at launch on supported EC2 instances.
  • Simplified automatic recovery does not support instances with instance store volumes.
  • CloudWatch action based recovery requires configuring an alarm recovery action and works with StatusCheckFailed_System.
  • An alarm on StatusCheckFailed_Instance can reboot an instance but cannot use the recover action.
  • With instance store volumes attached at launch, CloudWatch action based recovery supports only M3, C3, R3, X1, X1e, X2idn and X2iedn instance types.
  • CloudWatch action based recovery loses instance store data.
  • An Elastic Fabric Adapter (EFA) is an EC2 network device for workloads such as machine learning and high performance computing.
  • Simplified automatic recovery and CloudWatch action based recovery do not support instances in Auto Scaling groups.
  • EC2 Auto Scaling replaces instances it determines are unhealthy.
  • Automatic recovery requires a running instance, available instance-type capacity and no service events listed in the AWS Health Dashboard.
  • If recovery fails and an instance remains unreachable or keeps failing system checks, AWS recommends manually stopping and starting it.
  • Unlike automatic recovery, a manual stop and start assigns a new public IPv4 address unless the instance has an Elastic IP address.
  • A CloudWatch metric records measurements over time.
  • A CloudWatch alarm evaluates a metric against a threshold over a period.
  • Instance metadata is information about an instance used to configure or manage it.
  • An Elastic IP address is a static public IPv4 address allocated to an AWS account.
  • An EC2 instance's primary network interface cannot be detached from the instance.
  • A secondary network interface retains its attributes, including private IP addresses, when moved between EC2 instances in the same Availability Zone.
  • Starting a stopped EBS-backed instance typically migrates it to a new underlying host and assigns a new public IPv4 address.

AMI controls and recovery exceptions

EC2 operations can require control over how Amazon Machine Images (AMIs) are distributed and used, as well as attention to recovery limits. Sharing, copying and distribution have different permission requirements, while recovery depends on the instance configuration and alarmA monitor that evaluates a metric against a threshold over a period and can trigger an action. settings.

How it works

  1. Launching from a shared AMIA software image used to set up and boot an EC2 instance. does not require separately sharing its backing EBS snapshotsA backup of an EBS volume's data at a particular point in time.. Copying a shared EBS-backed AMIA launch image whose disk data comes from EBS snapshots. requires read permission for those snapshots.
  2. A copy has a new AMI ID and is independent of its source. Its launch permissionsPermission to launch EC2 instances from an AMI without owning that image. are not copied, so grant them on the new AMI.
  3. Image Builder cross-account distribution delivers images that destination accounts can launch or modify. For encrypted images, provide access to the source and destination KMS keys; Image Builder re-encrypts with the designated destination RegionA separate geographic area containing AWS infrastructure. key.
  4. Restrict which AMIs a user can launch with resource-level permissions for ec2:RunInstances. To identify running instances outside an approved list, configure the AWS Config rule approved-amis-by-id.
  5. Check recovery eligibility: neither simplified nor CloudWatch action based recovery supports instances using an Elastic Fabric AdapterAn EC2 network device for workloads such as machine learning and high performance computing. (EFA). For EC2 action alarms, AWS recommends treating missing data as missing and triggering actions only in ALARM state.

Exam cues

  • If the question says a shared AMI launches but cannot be copied, think backing snapshot read permission, because copying needs access that launching does not.
  • If the question says encrypted images must reach other accounts through Image Builder, think source and destination KMS key access, because distribution re-encrypts with the destination Region key.
  • If the question says restrict launch images, think ec2:RunInstances resource permissions, because they can limit the AMIs a user may use.
  • If the question says find running instances using unapproved images, think approved-amis-by-id, because it compares their AMI IDs with the configured list.
  • If the question says an instance uses EFA, think recovery exclusion, because neither recovery mechanism supports it.

Remember

  • Shared AMI launch does not require separate snapshot sharing; copying requires snapshot read permission.
  • AMI copies have new IDs and need their own launch permissions.
  • For EC2 action alarms, treat missing data as missing and trigger actions only in ALARM state.

Trap: Permission to launch a shared AMI does not supply the snapshot read permission needed to copy it. A copy also does not inherit the source AMI’s launch permissions.

Da documentação da AWS (11)
  • Launching from a shared AMI does not require separately sharing its backing EBS snapshots.
  • Copying a shared EBS-backed AMI requires read permission for its backing snapshots.
  • AMI copying does not copy the source AMI launch permissions to the target AMI.
  • An AMI copy has a new AMI ID and remains independent of changes to the source AMI.
  • Image Builder cross-account distribution delivers an AMI into destination accounts that can launch or modify it.
  • Encrypted Image Builder cross-account distribution requires access to source and destination KMS keys.
  • Image Builder re-encrypts distributed encrypted images using the designated destination Region key.
  • Resource-level permissions on ec2:RunInstances can restrict the AMI resources a user may use to launch instances.
  • The AWS Config rule approved-amis-by-id marks running EC2 instances NON_COMPLIANT when their AMI is outside the configured list of approved AMI IDs.
  • Neither simplified automatic recovery nor CloudWatch action based recovery supports instances using an Elastic Fabric Adapter.
  • AWS recommends treating missing data as missing and triggering EC2 action alarms only in ALARM state.

Flashcards

toque para virar
Resposta

·

Todos os 45 flashcards em lista

A company runs a web server that uses CPU, memory and network in roughly equal amounts. Which EC2 instance category fits?

General purpose.

A media company transcodes video and needs fast processors. Which EC2 instance category fits?

Compute optimized.

An in-memory database processes very large data sets in RAM. Which EC2 instance category fits?

Memory optimized.

A data warehouse needs very high sequential read and write throughput on local disks. Which EC2 instance category fits?

Storage optimized.

A team trains machine learning models and renders graphics on GPUs. Which EC2 instance category fits?

Accelerated computing, which uses hardware accelerators such as GPUs.

Does choosing a bigger general purpose EC2 instance give the same result as choosing a memory optimized one for a large in-memory data set?

No. Memory optimized instances are built for large in-memory data sets; the category, not only the size, should match the workload.

A company needs virtual servers in AWS where it controls the operating system and installed software. Which service fits?

Amazon EC2, which provides virtual servers (instances) that you configure and manage.

A team needs cloud machines to build and sign its iOS app. Which EC2 option fits?

EC2 Mac instances, which run macOS on Apple hardware. They run on Dedicated Hosts, billed per host with a 24-hour minimum.

A user data script on an EC2 instance uses sudo, and an admin expects it to run on every reboot. What is wrong with both assumptions?

On Linux, user data runs as root and only on first boot by default. Configure repeated execution if it must run on later restarts.

What happens to EC2 instance store data when its instance stops, hibernates or terminates?

It is erased. Use instance store for temporary data, and copy anything that must survive to persistent storage.

An application needs very fast temporary block storage for scratch data, at no extra storage cost. Which EC2 storage option fits?

Instance store.

Its disks are attached to the host and are included in the instance price, but data is lost when the instance stops or terminates.

What does an EC2 AMI provide, and what compatibility must a launch satisfy?

The software to set up and boot an instance. The AMI must support the chosen instance type.

Does sharing an EC2 AMI create a copy owned by the recipient account?

No. It grants launch permission; the source account retains ownership and storage charges. Copying the AMI creates a recipient-owned image.

An EC2 AMI is shared with an account that needs instances in another Region. What must happen before launch?

Copy the AMI to the destination Region and grant launch permission there. Sharing the source image does not make it available in another Region.

An EC2 AMI uses EBS snapshots encrypted with aws/ebs. How can its owner make an image available to another account?

Copy the AMI using a customer managed KMS key, then share the copy and grant the recipient key access. The default AWS managed key cannot support this sharing.

A team must relocate an EC2 instance to another Availability Zone in its current Region. What image-based procedure fits?

Create an AMI and launch a replacement in a subnet in the destination zone. AWSSupport-CopyEC2Instance can automate this. Update references to changed IP addresses.

Can EC2 CopyImage turn an encrypted EBS-backed AMI into an unencrypted AMI?

No. Copying can encrypt or re-encrypt the backing snapshots, but cannot remove their encryption.

An AMI made from a snapshot in Region A is copied to Region B, and one instance is launched from it in Region B. What exists in Region B?

One instance, one AMI and one snapshot. Copying an EBS-backed AMI also copies its backing snapshot into the destination Region.

A disaster recovery plan needs to launch EC2 instances from an AMI in a different AWS Region. What must the team do?

Copy the AMI to the recovery Region. AMIs can launch instances only in their own Region.

An EC2 instance needs a replacement in another Availability Zone for recovery. How can an AMI help?

Create an AMI from the instance and launch a replacement in a subnet in the target Availability Zone.

A team launches EC2 instances from an AWS Marketplace AMI that includes commercial software. What does it pay?

The software rate set by the AMI owner plus the standard EC2 usage fees.

An EC2 application keeps disposable cache files on instance store. Does a normal instance reboot erase the files?

No. Instance store data survives a reboot. Stopping, hibernating or terminating the instance erases it.

A team creates an EBS-backed AMI from an EC2 instance with instance store data. Will a replacement launched from the AMI contain that data?

No. The AMI excludes instance store data. Copy required data to persistent storage before replacing the instance.

Can an operator detach an EC2 instance store volume and attach it to a replacement instance?

No. Instance store volumes are attached only at launch and cannot move between instances.

An EC2 instance changes to another instance type that also has instance store. Does the previous local disk data transfer?

No. Changing the instance type does not transfer instance store data. Copy required data to persistent storage first.

A supported EC2 instance with instance store undergoes CloudWatch action based recovery. Is its local disk data retained?

No. Recovery loses the instance store data, even though an ordinary instance reboot would preserve it.

A load-balanced web fleet keeps a cache that every instance can rebuild from its peers. Is EC2 instance store a reasonable place for it?

Yes. Instance store suits temporary data replicated across a fleet; losing one instance's copy does not lose the data.

Which CloudWatch alarm action attempts to move an impaired EC2 instance to another host while preserving its ID and IP addresses?

The recover action on StatusCheckFailed_System. Successful recovery keeps the instance ID, IP addresses, metadata, EBS volumes and zone, but loses RAM contents.

A standalone EC2 instance fails StatusCheckFailed_Instance while its system status check passes. Which CloudWatch action can restart it automatically?

Reboot, using an alarm on StatusCheckFailed_Instance. The recover action cannot be used on that metric; investigate the instance's software and network configuration.

Must an operator create a CloudWatch alarm to enable simplified automatic recovery for a supported EC2 instance?

No. Simplified automatic recovery is enabled by default at launch. CloudWatch action based recovery requires an explicitly configured alarm action.

How do simplified and CloudWatch action based EC2 recovery differ for instances with instance store volumes?

Simplified recovery excludes them. CloudWatch recovery supports selected instance types with instance store attached at launch, but loses that data during recovery.

An operator compares automatic EC2 recovery with manually stopping and starting an impaired instance. Which preserves an automatically assigned public IPv4 address?

Automatic recovery. Manual stop and start changes the public IPv4 address unless the instance has an Elastic IP address.

An unhealthy EC2 instance belongs to an Auto Scaling group. Which mechanism should replace it?

EC2 Auto Scaling health-based replacement. Instances in Auto Scaling groups are excluded from simplified and CloudWatch action based recovery.

A running EC2 instance has automatic recovery configured, but there is no capacity for its instance type. Is recovery guaranteed?

No. Recovery requires available capacity. If recovery fails and the instance stays unreachable or keeps failing system checks, AWS recommends a manual stop and start.

A team needs an EC2 instance to resume in another Availability Zone after a zone outage. Does automatic instance recovery provide this?

No. Automatic recovery retains the instance's Availability Zone.

A team wants to detach the primary network interface from an impaired EC2 instance and attach it to a replacement. Is that possible?

No. An EC2 instance's primary network interface cannot be detached.

An EC2 secondary network interface moves between instances in the same Availability Zone. What happens to its private IP addresses?

They stay with the network interface when it is moved.

An EBS-backed EC2 instance has a scheduled retirement event for its degraded host. What simple action moves it to healthy hardware, and what changes?

Stop and start it. It typically starts on a new host and receives a new public IPv4 address.

A team can launch from a shared EBS-backed EC2 AMI but cannot copy it. Which additional resource permission should it check?

Read permission on the backing EBS snapshots. Launch permission alone does not grant that access for copying.

A team copies an EC2 AMI that was shared with several accounts. Does the new AMI retain those launch permissions?

No. Reapply launch permissions to the copy. It has its own AMI ID and is independent of the source image.

A team needs encrypted EC2 images delivered into other accounts through Image Builder. What key access is required?

Access to source and destination KMS keys. Image Builder re-encrypts the distributed image with the designated destination Region key; destination accounts can launch or modify their images.

A team must restrict which AMIs a user can use to launch EC2 instances. Which permission should it scope to approved image resources?

ec2:RunInstances in the user's IAM policy. Resource-level permissions can restrict which AMIs the user may launch.

A team needs to identify running EC2 instances whose AMI IDs are outside its approved list. Which AWS Config rule fits?

approved-amis-by-id. Configure the approved AMI IDs; the rule marks running instances using other images NON_COMPLIANT.

An EC2 workload uses an Elastic Fabric Adapter. Can either simplified automatic recovery or CloudWatch action based recovery restore the instance after a host failure?

No. Both mechanisms exclude instances using EFA.

How should missing data be handled for a CloudWatch alarm configured to recover an EC2 instance?

Treat missing data as missing and trigger the action only in ALARM state. AWS recommends this configuration for EC2 action alarms.

Você concluiu todos os tópicos da DOP-C02!

Seu badge ficou dourado. Próximo passo: agendar a prova na AWS. Depois de passar, adicione-se ao Quem passou.

Compartilhar

Conte que você concluiu esta certificação

Concluí todos os tópicos da AWS Certified DevOps Engineer - Professional (DOP-C02) no Easy Review. Venha estudar também!