Chapter 14: EC2 Operations — Elastic IP, AMI, Snapshots and Vertical Scaling
Hello friends! This chapter connects address management, reusable machine images, storage recovery and instance capacity changes. Learn to identify the existing service, prepare a candidate and verify useful application results. The expanded overview uses fictional workshop records and offline exercises; real AWS changes need a resource-specific maintenance and recovery plan.
नमस्कार मित्रांनो! सर्व्हर लॉन्च करणं म्हणजे फक्त पहिला दिवस. खऱ्या प्रोजेक्ट्समध्ये दुसऱ्या दिवसाचं काम जास्त महत्त्वाचं असतं: सर्व्हर बदलला तरी तोच IP ठेवणं, अपग्रेडआधी बॅकअप, कॉन्फिगर केलेल्या सर्व्हरचा मिनिटांत क्लोन, आणि स्लो सर्व्हरला जास्त CPU/RAM. उदाहरण: Mauli Dairy, Pune (काल्पनिक बिझनेस, फक्त शिकण्यासाठी) चा वेब सर्व्हर. प्रत्येक लॅब माझ्यासोबत करा आणि शेवटी नको असलेले रिसोर्सेस रिलीज करा.
नमस्ते दोस्तों! सर्वर लॉन्च करना बस पहला दिन है. असली प्रोजेक्ट्स में दूसरे दिन का काम ज़्यादा ज़रूरी होता है: सर्वर बदलने पर भी वही IP रखना, अपग्रेड से पहले बैकअप, कॉन्फ़िगर किए सर्वर का मिनटों में क्लोन, और स्लो सर्वर को ज़्यादा CPU/RAM. उदाहरण: Mauli Dairy, Pune (काल्पनिक बिज़नेस, सिर्फ़ सीखने के लिए) का वेब सर्वर. हर लैब मेरे साथ करो और आख़िर में जो रिसोर्सेस नहीं चाहिए उन्हें रिलीज़ करो.
In this chapter
- Elastic IP in depth
- Server swap with no DNS change
- Creating and launching AMIs
- Copying and sharing AMIs
- Restoring one file from a snapshot
- Automating snapshots with DLM
- Changing the instance type
- Scale up vs scale out
Friends, a successful launch is the beginning of operating a service. Maintenance needs a clear baseline, suitable recovery materials and checks that show students can still use the application. The overview develops those decisions before the individual operation lessons.
मित्रांनो, सर्व्हर लॉन्च करणं हा फक्त पहिला दिवस. खऱ्या प्रोजेक्ट्समध्ये दुसऱ्या दिवसाचं काम जास्त महत्त्वाचं: सर्व्हर बदलताना तोच IP ठेवणं, अपग्रेडआधी बॅकअप घेणं, उत्तम कॉन्फिगर केलेल्या सर्व्हरचा मिनिटांत क्लोन करणं, आणि स्लो सर्व्हरला जास्त CPU आणि RAM देणं. एकदम प्रॅक्टिकल चॅप्टर आहे – ही ऑपरेशन्स एकेक करून शिकूया, आणि प्रत्येक लॅब माझ्यासोबत करा. Mauli Dairy च्या सर्व्हरवर हे सगळं आपण करून बघू.
दोस्तों, सर्वर लॉन्च करना बस पहला दिन है. असली प्रोजेक्ट्स में दूसरे दिन का काम ज़्यादा ज़रूरी है: सर्वर बदलते समय वही IP रखना, अपग्रेड से पहले बैकअप लेना, अच्छे से कॉन्फ़िगर किए सर्वर का मिनटों में क्लोन बनाना, और स्लो सर्वर को ज़्यादा CPU और RAM देना. एकदम प्रैक्टिकल चैप्टर है – ये ऑपरेशन्स एक-एक करके सीखते हैं, और हर लैब मेरे साथ करो. Mauli Dairy के सर्वर पर ये सब हम करके देखेंगे.
Day-two operations on one EC2 web server
+------------------+ +-------------------+ +---------------------+
| Elastic IP | | AMI (golden | | Change instance |
| fixed address | | image / clone) | | type (scale up) |
+--------+---------+ +---------+---------+ +----------+----------+
| | |
v v v
+--------------------------------------------------------------------+
| EC2 instance ── EBS root volume ──► EBS snapshots (backups) |
+--------------------------------------------------------------------+
Concepts in this chapter
- 14.1Elastic IP in depth
- 14.2AMI (Amazon Machine Image)
- 14.3EBS snapshots in practice
- 14.4Vertical scaling: changing the instance type
Review and practice
Move traffic only after the candidate checks pass
Read all steps
- Observed service
Record the current release, entry point and authoritative data before the change. A working baseline supplies the expected results for comparing a candidate.
- Prepared candidate
Verify the candidate release and its access to the intended records. In the offline exercise, a stale supplied data revision keeps the address model on blue.
- Planned transition
Proceed only when the prerequisites pass. A destination change does not copy records or guarantee that existing connections continue without interruption.
- Verified operation
Confirm the expected marker and representative application operation. Account for new writes and data-format compatibility before deciding that a return to the old server is valid.
1. Keep a useful service working while its server changes
A college workshop website already runs on an EC2 instance. Students can read the timetable and register for a session. Now the administrator needs to install an operating-system update, replace an unhealthy machine and prepare for a larger registration day. These jobs begin after the first successful launch. They require understanding the existing service before changing the resources underneath it.
Consider the student's expectation: the same address should still show the correct workshop, accepted registrations should remain, and maintenance should finish within the announced period. None of these expectations is proved simply by seeing a green instance state. The service combines an entry address, networking, application software, configuration, persistent records and operational procedures. A change can succeed in one component while breaking another.
This chapter connects four operations: retaining a public address with an Elastic IP, preparing reusable machine images, recovering storage from snapshots, and changing compute capacity. Each solves a different problem. Moving an address does not move a database. Preparing an image does not preserve every external dependency. Restoring yesterday's records does not include today's accepted registrations. Increasing memory does not correct an application that requests the wrong database.
We use a fictional workshop system throughout the overview. Its two possible application servers are called blue and green, its persistent records form a separate concern, and its release marker identifies the code serving a request. These are teaching names, not real AWS identifiers. The exercises below run entirely offline with supplied values. They let you practise evidence, sequencing and decision-making without stopping an instance or creating chargeable resources.
By the end, aim to explain a change as a complete story: the observed problem, the selected operation, the preparation, the expected interruption, the verification and the recovery route. Knowing where an EC2 menu item appears is useful, but it is only a small part of administering a working service. The important skill is connecting that action to the outcome students actually need.
2. Draw the boundary of the proposed change
Start with a small inventory that identifies the service, the account and Region, the relevant resources and their relationships. Record the instance ID alongside its human-readable name. A name helps conversation, but names can repeat or become outdated. Record which network interface and private address receive traffic, where the entry address points, which volumes hold required data, and which external services the application uses.
Separate observed facts from assumptions. “The website uses this database” is an assumption until the active application configuration and a suitable request trace support it. “The backup completed yesterday” is a resource observation, while “we can recover the registrations accepted before the backup” is a recovery claim requiring further evidence. Writing these separately prevents a reassuring label from replacing a missing check.
For our workshop, imagine blue serves release one and the database contains registration numbers 101 through 120. A change record can state that only the application host is being replaced; the authoritative database remains the same. The candidate must therefore demonstrate that it can read those registrations through the intended configuration. If the plan instead restores a database copy, the change affects data as well as compute and needs a reconciliation decision.
List the connections that must continue working. The browser reaches the public service. The web server forwards application requests where required. The application authenticates to the database. Administrators use an approved management path. Monitoring observes specific checks. A candidate that serves a static welcome page has demonstrated only a fraction of this chain. Include an expected result for each connection relevant to the change.
Also identify who or what manages the instance. An individually managed training machine differs from an instance controlled by an Auto Scaling group or deployment system. A manual action can be undone by automation that interprets it as failure. The operation should fit the resource's ownership model, and the final desired configuration should be recorded where future replacements obtain it.
A useful boundary is narrow enough to inspect. If the goal is more memory, do not simultaneously redesign DNS, upgrade the database and replace the application's framework without separate reasons and verification. Multiple unrelated changes make a failure harder to explain. Where changes genuinely depend on one another, document the dependency and the point at which each result must be checked.
3. Treat the public address as one part of a replacement
An Elastic IP is an allocated public IPv4 address that can remain with your account while its association changes. It is scoped to a Region and network border group. Allocation reserves the address; association connects it to an eligible resource. Disassociation does not release the allocation. AWS charges for Elastic IP addresses, including idle allocations. These are distinct resource actions with different consequences. See the Elastic IP documentation.
In the workshop example, the public name can continue resolving to the same address while the address is associated with green instead of blue. This avoids making that particular DNS value change. Existing connections can still be interrupted, and the replacement must already have the correct application and data access. Address stability is not a guarantee of uninterrupted service.
Prepare green before the traffic decision. Check its intended hostname handling, certificate arrangement, configuration, data access and release marker through an appropriate test path. An IP-level association cannot create a missing route, allow a blocked connection or start an application process. Treat each of those as a separate prerequisite, with evidence appropriate to the actual network design.
After the association change, test through the normal student-facing name. Verify the expected release marker and a representative read operation. Correlate the request with green's logs. If testing is authorized to create a sample registration, give it a recognizable test identity and verify its saved result. A successful association response establishes an infrastructure change; these later checks establish useful service behavior.
Plan reversal before making the switch. Blue may be a viable return destination only while its code, configuration and data remain compatible with the current service. Once green accepts new writes into a separate database, moving the address back could hide those writes. The rollback plan must describe data ownership, not merely the old association. This distinction becomes important even in a small two-server project.
4. Separate a machine image, launch settings and saved records
An AMI supplies the software basis for launching an EC2 instance and includes block-device mapping information. Compatibility includes properties such as architecture and root-volume type. An EBS-backed AMI references the storage snapshots used for its volumes. A launch template stores launch parameters such as an AMI ID, instance type and network settings, with numbered versions. A snapshot preserves a particular storage state. These resources cooperate, but their responsibilities differ. See AMIs and launch templates.
For the workshop, the approved image might contain Linux, the application runtime and a particular code release. A launch-template version selects that image and the intended launch configuration. The current registrations belong to a separately managed data source. If a student changes the timetable after the image was built, that change does not magically appear inside the older image. Image version and data recovery time are separate labels.
Make the intended image contents explicit. List installed packages, application files and startup behavior. Then list what must be supplied at launch or obtained through an approved runtime mechanism: environment-specific settings, access to secrets and external endpoints. A secret copied into a disk can be copied into an image as well. Review image preparation and distribution according to the sensitivity of its contents.
The default creation flow for an EBS-backed AMI reboots the instance to obtain a consistent storage state. Choosing the no-reboot alternative changes that assurance; AWS does not guarantee filesystem integrity in that case. Instance-store contents are not copied into newly launched instance-store volumes. Review the actual selected volume mappings and application procedure. These details are explained in creating an EBS-backed AMI.
Test a new image by launching an appropriately isolated candidate, then checking its startup and intended operations. Confirm which release actually runs rather than trusting the image name. Inspect startup failures and configuration dependencies. An image can boot successfully while the application fails because a required setting or permission was never included in the launch plan.
Record the exact approved image and template version for a release. “Use the latest one” can become ambiguous as new versions appear. For an exercise, write a release manifest that names the image, template version, expected application marker and compatible data format. This makes a later replacement explainable and gives the reviewer concrete values to compare with observations.
5. Prepare a recovery point that represents valid work
A workshop registration may create several related pieces of information: the student's booking, the session's remaining capacity and an acknowledgement record. Recovery should produce a state the application understands. Merely finding files with familiar names does not establish that these related records agree. The required backup method depends on the database and on where the application stores its authoritative state.
EBS snapshots capture data written to the volume at the requested point; application and operating-system buffers are not included. Snapshot completion is asynchronous. AWS documents write coordination and recommends stopping an instance for a snapshot of its root volume. A database-native backup procedure or coordinated application pause may be needed to obtain the recovery guarantees your workload requires. See creating EBS snapshots.
Understand the distinction between crash recovery and an application-consistent backup. Some databases can recover a valid transaction boundary using their logs after an abrupt interruption. That capability depends on the database, its configuration and the completeness of the required storage set. It should be verified through the product's documented process rather than assumed because a snapshot reached the completed state.
Imagine that the registration database lives on one volume but uploaded attendance evidence lives elsewhere. A backup of only the database might contain references to files that were never captured. Conversely, copying the upload directory alone does not preserve its database relationships. Inventory the complete set needed for the intended recovery, including configuration and key access, before designing the schedule.
Record the meaning of the recovery point in plain language. For example: “This rehearsal contains the workshop registrations accepted through the documented maintenance boundary, and the application has verified their associated documents.” That statement is more useful than an unexplained timestamp. Keep the timezone explicit when comparing records from people, application logs and AWS resource metadata.
Use a recovery environment that cannot accidentally send real acknowledgements or accept competing production writes. A restored copy may retain scheduled jobs and outbound settings. The rehearsal should establish that records are usable while controlling these external effects. After the checks, record the result and resource disposition so a temporary exercise does not become an unexplained permanent service.
6. Measure recovery with data and time
Two questions make recovery planning concrete. How much recent work could be missing after the chosen recovery point? How long can the service remain unavailable while recovery happens? The first is related to the recovery point objective, usually shortened to RPO. The second is related to the recovery time objective, or RTO. Objectives are targets agreed for the service; measured rehearsal results show whether a proposed procedure can meet them.
Suppose our fictional workshop accepts registrations until a failure at 10:20. Its latest usable recovery point represents 10:00. There is a twenty-minute interval of possible missing work. This does not automatically mean twenty minutes of records are permanently lost: another journal or application-native recovery mechanism might cover some of that interval. It means the stated recovery point alone cannot prove those later registrations are present.
If the workshop's agreed maximum interval is fifteen minutes, that recovery point fails the target. Saying that a backup runs every fifteen minutes would not settle the question. Jobs can fail, a backup can be unusable, and the latest successful point can be older than the intended schedule. Compare the actual usable recovery point with the relevant event, not just the configured schedule.
Recovery time includes more than creating a volume. It can include recognizing the incident, selecting the right backup, obtaining access, restoring storage, preparing compute, starting the application and validating results. Identify which of these your measurement includes. If the stopwatch starts only after an engineer has already spent half an hour finding the correct key, the reported result understates the service interruption.
For an EBS volume recovery, a snapshot can be used to create a new volume, which is then handled through the appropriate attachment and filesystem procedure. It is possible to recover an entire storage state or retrieve selected files. Verify resource identity and the recovered contents before replacing useful live data. See restoring an EBS volume.
Define acceptance checks before the exercise. Our workshop might require registration 120, its associated session, the correct timetable version and a successful read through the application. Record counts can help, but two different datasets can have the same count. Compare representative identifiers and values, expected relationships and the application's interpretation. Keep the evidence small enough to review and specific enough to detect the failure that matters.
Finally record what the test did not cover. A rehearsal using a small dataset and warm dependencies may not represent recovery of a large production dataset during a regional disruption. This is a useful limit, not a reason to abandon testing. It tells you which assumptions remain and which next rehearsal would reduce the most uncertainty.
7. Check compatibility before changing instance type
Vertical scaling changes the capacity of one instance. For an eligible EBS-backed instance, an in-place instance-type change requires stopping it first. The current configuration must support the target type. Processor architecture, virtualization, required networking and storage drivers, attached-volume limits and features such as NitroTPM can matter. An incompatible change requires a compatible replacement and migration. Consult type-change compatibility.
Architecture is an easy place to make an expensive assumption. An x86 application binary does not become an Arm binary because a different instance family looks attractive. The operating system, runtime and native dependencies need support for the selected architecture. A migration plan may include rebuilding and testing those components. Treat this as a software compatibility project as well as a capacity decision.
For the supported in-place procedure, plan interruption, stop the selected instance, change the compatible type, start it and verify the result. Spot instances do not support this instance-type-change operation. An Auto Scaling group can replace a stopped member, so its management process needs separate coordination. Follow the appropriate instance-type change procedure.
Ordinary stop/start differs from a reboot. EBS-backed instances retain their EBS storage through a normal stop, while instance-store data is lost. Ordinary RAM contents are not retained by a normal stop. An automatically assigned public IPv4 address can be replaced on start; an Elastic IP has a different allocation lifecycle. Read the stop/start behavior before planning maintenance.
Check the application after the change using the same operation measured before it. Confirm required mounts, service startup, expected release and representative data access. Then compare performance under a comparable workload. A successful boot is a prerequisite for a functioning service; it is not evidence that the original capacity problem improved.
Keep the previous type and configuration in the change record, but avoid calling return to the old type an unconditional guarantee. Available capacity, compatibility and changes made during maintenance can affect recovery. Where reliable replacement is a requirement, prepare and rehearse the replacement path. A written fallback should identify its prerequisites and the evidence needed to use it.
8. Decide whether more compute addresses the actual delay
“The website is slow” is a starting observation, not a resource diagnosis. Ask which operation is slow, when it happens, how many requests are active and which part of the request consumes time. Loading a static timetable, generating an attendance report and committing a registration can stress different components. Measure the operation that users report before buying capacity.
Consider a fictional report request that spends 0.2 seconds preparing input, 3.4 seconds waiting for a database query and 0.4 seconds formatting the answer. Its total is four seconds. Even an unrealistically perfect removal of both application-side portions would leave 3.4 seconds in the database wait. This calculation does not identify the database problem, but it shows why additional application CPU has limited opportunity to help that measured request.
A different fictional request spends 3.5 seconds in CPU-intensive conversion and 0.5 seconds elsewhere. Additional suitable compute or a better algorithm might help, depending on whether the conversion can use those resources. A single-threaded process may not benefit from simply adding many cores. More available CPU and software able to use it are separate requirements.
Memory pressure also needs evidence. Repeated process termination, swapping and observed working-set needs can support investigation, while a large used-memory number alone can include useful filesystem cache. Collect the relevant operating-system and application observations. State the workload interval so that a quiet midnight measurement is not compared with a busy registration morning.
Use a small prediction before a change. For example: “The report generator spends most of its time in parallelizable conversion; the candidate should reduce conversion duration while returning the same report.” This prediction gives the verification a purpose. If the output changes or errors increase, a lower response-time number alone is not success. Correctness, capacity and cost must be evaluated together.
Horizontal scaling adds serving instances rather than enlarging one. It can improve capacity or availability when the application supports distributing requests and managing shared state correctly. It also introduces coordination questions: where sessions live, how writes are handled and how healthy targets are selected. For this chapter, use the distinction to recognize when a single-instance resize does not address the wider requirement.
Keep performance comparisons honest. Use the same dataset, operation and approximate concurrency, and note changes in caching or dependency load. Repeat enough to understand normal variation, without hammering an unapproved live service. The goal is a defensible explanation of improvement, not one unusually fast request selected from many attempts.
9. Turn the operation into a sequence with decision points
A runbook is a practical sequence someone can follow and review. It should state the intended outcome, resource scope and evidence required at each important boundary. It is more useful when it describes observations and decisions than when it contains a long uninterrupted list of commands. The following sequence applies to our fictional replacement exercise.
- Describe the baseline. Record blue's release marker, the intended hostname, the authoritative data source and representative records. Identify the exact resources involved. Establish that the starting service works, or document its existing failure so the change is not incorrectly blamed for a pre-existing problem.
- Prepare recovery. Identify the usable data recovery point, the earlier code release and the access required to restore them. Record which new writes could need reconciliation. A backup reference belongs here alongside evidence of a relevant recovery test, not merely a checkbox saying backup done.
- Prepare the candidate. Build or launch green using the approved configuration. Test startup and dependencies through a controlled route. Confirm that its code and data-format expectations agree. Keep unintended background jobs or outward actions disabled in the rehearsal environment.
- Make the traffic decision. Decide whether prerequisites passed. If they did not, preserve the working baseline and investigate the candidate. If they did, perform the authorized transition during the planned window, with the interruption and connection behavior already understood.
- Verify the user operation. Request the expected hostname and marker, read representative records and perform any authorized sample transaction. Check the relevant logs for errors. Compare the observed results with written expectations rather than making the definition of success looser after a problem appears.
- Close or recover. If acceptance passes, record the final resources and retained recovery materials. If it fails, follow the appropriate return or recovery route, including data reconciliation where necessary. Verify that route too; issuing a reversal command is not the same as proving restoration.
Give the decision points clear owners in a team exercise. One student can execute the plan, another can read the expected evidence and a third can record the observations. This arrangement exposes ambiguous instructions quickly. If the reviewer cannot tell whether a step passed, improve the step before assuming a future operator will infer the missing detail.
10. Practise three operational decisions offline
These exercises need Python 3 and a terminal that supports the shown shell here-document syntax, such as Bash or zsh. All inputs are fictional in-memory values. The blocks make no network requests, load no AWS credentials and write no files. Run each block separately. First predict the result, then compare your explanation with the printed evidence.
Lab 1: Refuse an unready replacement
The first model keeps an address association separate from application and data readiness. Green initially has the wrong dataset revision. The proposed switch must be refused, preserving blue. Only after the supplied model is corrected should a switch be accepted. This is a deliberately small reasoning exercise, not an implementation of AWS health checks or Elastic IP reassociation.
python3 - <<'PY'
servers = {
"blue": {"release": "one", "data_revision": 120, "ready": True},
"green": {"release": "two", "data_revision": 118, "ready": True},
}
association = "blue"
def select_candidate(current, candidate, expected_revision):
evidence = servers[candidate]
if not evidence["ready"] or evidence["data_revision"] != expected_revision:
return current, "REFUSED: candidate evidence is incomplete"
return candidate, "ACCEPTED: supplied checks pass"
association, reason = select_candidate(association, "green", 120)
print(reason, "association=" + association)
assert association == "blue"
servers["green"]["data_revision"] = 120
association, reason = select_candidate(association, "green", 120)
print(reason, "association=" + association)
assert association == "green"
print("selected release:", servers[association]["release"])
PY
Expect a refused transition with blue still selected, followed by an accepted transition to green and release two. The data revision represents one supplied check, not proof of a real database's completeness. In an actual rehearsal, replace that assumption with independent reads and appropriate application checks. Explain what would change if green became unready after the first check; the model does not simulate failures during a transition.
Lab 2: Compare the usable recovery point with the target
Use explicit timezone-aware timestamps to calculate an interval. The first recovery point misses the fictional fifteen-minute target. A later usable point passes it. The calculation concerns the age of the available point, not a promise about how many records can ultimately be recovered through additional mechanisms.
python3 - <<'PY'
from datetime import datetime
incident = datetime.fromisoformat("2026-11-20T10:20:00+00:00")
target_minutes = 15
for text in ("2026-11-20T10:00:00+00:00", "2026-11-20T10:10:00+00:00"):
recovery_point = datetime.fromisoformat(text)
minutes = (incident - recovery_point).total_seconds() / 60
assert minutes >= 0
result = "PASS" if minutes <= target_minutes else "MISS"
print(text, "gap_minutes=" + str(int(minutes)), result)
PY
The expected gaps are twenty and ten minutes. Change the first timestamp on paper to a future point after the incident and explain why it cannot be treated as an ordinary earlier recovery point. The assertion catches that inconsistent input. This illustrates a broader habit: validate the meaning of input data before trusting a tidy numerical result.
Lab 3: Calculate the best possible effect on one measured request
The final block uses the four-second report example. It calculates an optimistic bound: remove every measured application-side second while leaving the observed database wait unchanged. Real changes cannot generally remove all application time, so the result is a ceiling for this particular assumption, not a predicted production speedup.
python3 - <<'PY'
prepare_seconds = 0.2
database_seconds = 3.4
format_seconds = 0.4
total = prepare_seconds + database_seconds + format_seconds
best_remaining = database_seconds
saved_fraction = (total - best_remaining) / total
assert abs(total - 4.0) < 0.000001
assert abs(saved_fraction - 0.15) < 0.000001
print("measured total:", format(total, ".1f"), "seconds")
print("optimistic remaining:", format(best_remaining, ".1f"), "seconds")
print("maximum time removed:", format(saved_fraction * 100, ".0f") + "%")
PY
Expect four seconds total, 3.4 seconds remaining and fifteen percent of duration removed. A classmate claiming that extra application CPU will make this measured request twice as fast must explain which assumption changes. Perhaps the timing attribution was wrong or the application can reduce database work. Those are testable hypotheses; simply choosing a larger instance is not evidence for them.
11. Investigate a failed change from the nearest evidence
Suppose the address association points to green, but the browser still fails. First record the actual failure: name-resolution error, connection timeout, TLS validation failure, HTTP error or wrong content. These observations imply different next checks. Do not repeatedly move the address while ignoring a certificate failure that already shows the browser reached a responding endpoint.
If green returns a default web-server page, investigate site selection and deployed content. The process is reachable, but it may not be serving the intended hostname or directory. If the correct timetable loads while registration returns an error, follow the application and database path for that operation. A static response cannot establish whether a separate backend connection succeeds.
If a restored application starts with an empty registration list, preserve the evidence. Check the configured data path, required mount and selected database before initializing new data. An empty-looking directory can reflect a missing mount or the wrong configuration. An automatic first-run routine may create a new empty database at that location, making the service appear healthy while concealing the original problem.
If an instance-type change is followed by boot or mount errors, compare the actual configuration with the target's compatibility requirements. Device naming and required drivers can matter. A copied device path is weaker evidence than a verified mapping to the intended volume and filesystem. Follow a recovery procedure suitable for the observed fault rather than trying unrelated changes until one appears to work.
Keep a short incident timeline: intended action, observed time, resource state, application result and next decision. This prevents later assumptions from replacing what actually happened. It also makes the handover useful if another person continues the investigation. Avoid placing secrets or private student records in that timeline; representative identifiers and sanitized observations are usually enough to explain the result.
12. Explain the operational reasoning in an interview
1. How would you replace a server while keeping its public address?
I would first identify the current address arrangement and verify a prepared replacement. If the architecture uses an Elastic IP, reassociation can retain that allocated address while changing its destination. Before switching I would check the application, required network path and data access. Afterwards I would test through the normal hostname and confirm the replacement's marker and useful operations. I would describe possible interruption and keep a recovery route that accounts for any new data writes.
2. Which recovery problem does an AMI solve?
An AMI provides a reusable software basis for launching a compatible instance. It can help reproduce an approved server environment, but the complete service also depends on launch settings, network resources, permissions and current data. I would record the image and launch-template version, then test a new instance. I would not claim that a machine image automatically recreates an external database or preserves all running-process state.
3. A snapshot is completed. Is the recovery plan proven?
No. Completion is evidence about the snapshot operation. I still need to know that it covers the intended data, represents a suitable application state and can be used with the required permissions and keys. A recovery rehearsal should restore into an appropriate environment and verify expected records through the application. I would compare the recovered point and measured restoration time with the service's objectives and record any remaining limitations.
4. How would you justify a larger instance?
I would identify the slow operation and measure where it spends time under a representative workload. Evidence of the relevant CPU or memory limitation can justify a suitable capacity change. If most time is waiting for an inefficient database query, application CPU may offer little benefit. I would state the expected improvement before the change, check compatibility and cost, then compare correct results and performance under comparable conditions.
5. How do rollback and data recovery differ?
Rollback commonly means returning to an earlier code or configuration version. Data recovery restores or reconstructs stored information from an available recovery source. They can have different effects and may need different timing. Earlier code might not understand a changed database format, while an earlier database copy might omit accepted registrations. I would identify the compatibility and reconciliation requirements instead of assuming one reversal action handles both.
6. What makes a good maintenance completion check?
It compares observed behavior with expectations written before the change. For our workshop, that includes the intended release marker, a representative registration read, required dependency behavior and relevant errors. Infrastructure state and application results both matter. The record should identify when the checks ran and which resource answered. A general statement that the server is up is weaker than evidence that the intended student operation works.
7. How would you handle an incompatible target architecture?
I would treat it as a migration to a compatible environment. I would select supported operating-system and application components, rebuild native dependencies where necessary, test the replacement and plan data access or transfer. I would not assume a family-name change translates existing machine code. The migration needs its own measured acceptance and return path, including any application-data changes made during the transition.
8. How would you prevent forgotten resources after a rehearsal?
I would create a resource record at the start, including ownership, purpose and intended retention. After verification I would reconcile it with what actually exists. Some recovery materials should remain for an agreed period, while temporary compute or unused addresses may no longer be needed. Cleanup should follow dependencies and authorization. A stopped instance is not evidence that every associated storage or address charge has disappeared.
13. Check your decisions with short scenarios
Choose an answer and explain the reasoning before opening it. The aim is to distinguish what the evidence proves from what remains unknown.
Quiz 1: Green serves release two but has older registrations. Is it ready to replace blue?
Not on the supplied evidence. The release marker proves the code selection, while the old registrations show a data concern. Determine whether green uses the authoritative source, a stale restore or an incorrect configuration. Resolve that difference and verify representative data before treating the candidate as ready. Changing the public destination would otherwise expose the incomplete view to students.
Quiz 2: The configured backup interval is ten minutes, but the latest usable point is thirty minutes old. Which matters?
The usable recovery point matters for the present recovery decision. The intended schedule describes policy; it does not prove that recent jobs succeeded or that their results can be restored. Investigate the missing or unusable points and compare the actual gap with the service's target. Additional recovery mechanisms may change the outcome, but they need their own evidence.
Quiz 3: A resize makes one test request faster. Can the change be declared successful?
One faster request is limited evidence. Verify correct output and compare a representative workload, including normal variation and dependency behavior. Check whether the original bottleneck improved and whether errors or resource costs changed. A warmed cache or quieter database can explain a single fast result without proving that the selected instance type caused a meaningful improvement.
Quiz 4: Can you restore old code after a database-format change without further checks?
Only if compatibility and recovery have been established. Old code may misinterpret the new format or fail to start. Reverting the database itself can discard new writes unless they are preserved or reconciled. A deployment plan should identify this boundary before the change and include a tested forward-fix or recovery procedure appropriate to the application.
Quiz 5: A retired image is deregistered. Have all related resources disappeared?
No. Existing instances are unaffected by deregistration. Associated snapshots can remain, and deletion behavior depends on the chosen option and dependencies, including references from other AMIs. Review the actual resources and retention needs. AWS documents optional associated-snapshot deletion in its AMI deregistration procedure; an image action is not a complete cleanup inventory.
14. Revision cards for the maintenance desk
Address card — association is a routing decision
Write down the old and proposed destination, then name the evidence that the candidate can serve the intended operation. Keeping an address stable does not copy application state. Include a normal-hostname check after the change so an infrastructure success cannot hide incorrect site selection or content.
Image card — label both software and launch settings
Record the image, the launch-template version and the expected release marker. Add the required external dependencies. These labels make a replacement reproducible and help identify which component is missing when a newly launched instance boots but the application does not work.
Recovery card — name the usable point and expected records
State the recovery point's meaning, the data it covers and the representative records that should return. Measure the recovery exercise from a clearly defined start to verified service. A completion badge and a successful restore test answer different questions.
Capacity card — connect the resource to measured work
Identify the operation, its slow portion and the proposed resource improvement. Keep workload and correctness checks comparable. If the observed delay occurs in another dependency, explain how the chosen change would affect that dependency before predicting a large benefit.
Return card — include new writes and format compatibility
Describe what happens to registrations accepted after the transition. An older server can become unsuitable for return if its data or code is no longer compatible. A useful recovery plan states these conditions before anyone needs to make the decision under pressure.
Closure card — reconcile actual resources
Compare the original inventory with the final state and the retained recovery set. Document ownership and intended retention. Review temporary servers, volumes, snapshots and address allocations separately so the completion of one action does not imply the whole exercise has been cleaned up.
15. Build a change record another student can review
- Prepare a replacement plan. Draw blue, green, the public entry and the authoritative registration data. Mark which relationship changes and which data source remains authoritative. Write three candidate checks and three post-transition checks. Ask a classmate to identify an assumption that your diagram does not yet support with evidence.
- Write a recovery acceptance sheet. Use fictional registration numbers and a documented recovery time. Specify expected records, related documents and one application operation. Include the time interval that could contain missing work and a method for investigating it. Keep the sheet short enough that another student can actually execute the checks.
- Challenge a capacity proposal. Invent two request-time breakdowns: one dominated by application computation and one dominated by a dependency. Calculate the optimistic improvement from removing application time in each. Explain which additional measurements would support a real change and why identical instance upgrades can produce different outcomes.
- Rehearse the handover verbally. Have one student propose a change and another ask for the exact resource, expected result and recovery decision at every stage. Whenever the answer is only “it should work,” replace it with a concrete observation. Finish by explaining the whole operation in plain language to a student from a different engineering branch.
Official references
- Elastic IP allocation, association and pricing behavior
- Amazon Machine Images
- Creating EBS-backed AMIs
- Versioned launch settings
- Snapshot creation and consistency
- Volume recovery from snapshots
- Instance-type compatibility
- Supported in-place type changes
- Replacement-instance migration
- Stop/start behavior
- AMI deregistration and retained resources
Practice Tasks
Practice checks run in your browser. They check the answer for this exercise; they do not create resources or connect to your AWS account.
About this scenarioHyderabad Biryani Hub is a cloud kitchen business in Hyderabad. Syed Imran looks after its IT and cloud work. They count money in INR and run their AWS resources in the ap-south-2 Region. In the tasks below you do real jobs for them using what this lesson teaches. All names, account IDs, IP addresses and numbers are made up for practice.
0 / 12
Easy Snapshot an EBS volume
An EBS snapshot preserves a volume storage state through EBS interfaces. Coordinate application writes and verify recovery for the required consistency.
Create a snapshot of volume vol-00300c2e3d3cfdeed with description "nightly hydbiryani".
- Read the task and decide which AWS service it is about.
- Write aws, then the service name, then the operation (the action word).
- Add each needed flag (--name) followed by its value from the task.
- Flags can be in any order. Click Check answer.
Easy Detach a volume
Before detaching a data volume, identify it, stop its users appropriately and unmount the filesystem. Root-volume recovery needs its own documented procedure.
Detach volume vol-00300c2e3d3cfdeed.
- Read the task and decide which AWS service it is about.
- Write aws, then the service name, then the operation (the action word).
- Add each needed flag (--name) followed by its value from the task.
- Flags can be in any order. Click Check answer.
Medium Delete an old AMI
An AMI can reference chargeable snapshot storage. Deregistration and associated-snapshot cleanup are distinct choices; review dependencies and retention first.
Deregister the image ami-01b0b002afb1babcd.
- Read the task and decide which AWS service it is about.
- Write aws, then the service name, then the operation (the action word).
- Add each needed flag (--name) followed by its value from the task.
- Flags can be in any order. Click Check answer.
Medium List your own AMIs
This exercise lists owned images. Cleanup must also consider dependencies, launched instances, snapshots and references from deployment configuration.
List only the AMIs owned by your own account.
- Read the task and decide which AWS service it is about.
- Write aws, then the service name, then the operation (the action word).
- Add each needed flag (--name) followed by its value from the task.
- Flags can be in any order. Click Check answer.
Medium Allocate an Elastic IP
An allocated Elastic IP can retain its address across stop/start. DNS configuration, reachability and the application still need checks; public IPv4 allocation can incur charges.
Allocate a new Elastic IP address for use in a VPC.
- Read the task and decide which AWS service it is about.
- Write aws, then the service name, then the operation (the action word).
- Add each needed flag (--name) followed by its value from the task.
- Flags can be in any order. Click Check answer.
Medium Attach the Elastic IP to the server
Association selects the destination for the allocated address. The intended domain record, network path and application must be configured and verified separately.
Associate allocation eipalloc-00300d2b3c3dd44 with instance i-03c3b2d0030311a2b.
- Read the task and decide which AWS service it is about.
- Write aws, then the service name, then the operation (the action word).
- Add each needed flag (--name) followed by its value from the task.
- Flags can be in any order. Click Check answer.
Medium Create an AMI from a server
An AMI supplies a compatible instance software basis and volume mappings. Launch settings, external dependencies, current data and permissions need separate preparation.
Create an AMI named hydbiryani-web-v1 from instance i-03c3b2d0030311a2b.
- Read the task and decide which AWS service it is about.
- Write aws, then the service name, then the operation (the action word).
- Add each needed flag (--name) followed by its value from the task.
- Flags can be in any order. Click Check answer.
Medium Attach a volume to an instance
A volume must be attached (same AZ) before the server can see it.
Attach volume vol-00300c2e3d3cfdeed to instance i-03c3b2d0030311a2b as device /dev/sdf.
- Read the task and decide which AWS service it is about.
- Write aws, then the service name, then the operation (the action word).
- Add each needed flag (--name) followed by its value from the task.
- Flags can be in any order. Click Check answer.
Medium Make a compressed backup
A gzip-compressed tar archive groups selected files; its size depends on their contents. Protect it appropriately and verify recovery before relying on it.
Create a gzip-compressed archive named hydbiryani-site.tar.gz from the folder /var/www/hydbiryani.
- Find the Linux command that does this job.
- Add the options (like -r or -h) the task needs.
- Add the file names, folders or users in the right order.
- Use sudo if the job changes system files or users. Click Check answer.
Medium Extract a backup
Inspect the archive and restore into a suitable separate destination, then compare expected files and application behavior before replacing useful data.
Extract hydbiryani-site.tar.gz into the folder /tmp/restore.
- Find the Linux command that does this job.
- Add the options (like -r or -h) the task needs.
- Add the file names, folders or users in the right order.
- Use sudo if the job changes system files or users. Click Check answer.
Medium Zip a folder
Zip files open easily on Windows, so they are good for sharing with office staff.
Create invoices.zip containing the folder invoices and everything in it.
- Find the Linux command that does this job.
- Add the options (like -r or -h) the task needs.
- Add the file names, folders or users in the right order.
- Use sudo if the job changes system files or users. Click Check answer.
Hard Copy a snapshot to another Region
A usable cross-Region copy can support recovery, but destination access, key permissions, compute, networking and application checks still need preparation.
Copy snapshot snap-000f2e3e3beef5 from ap-south-2 into us-west-2 (run the command in us-west-2).
- Read the task and decide which AWS service it is about.
- Write aws, then the service name, then the operation (the action word).
- Add each needed flag (--name) followed by its value from the task.
- Flags can be in any order. Click Check answer.