Chapter 5: Amazon EC2 (Elastic Compute Cloud)
Practice Questions and Lab Exercises
Come on, practice time now! Use an approved sandbox or the paper exercises below. When the lab ends, follow the authorized cleanup for its exact resources and verify any intentional retention.
चला, आता प्रॅक्टिस! मंजूर sandbox किंवा खालील कागदावरचे सराव वापरा. Lab संपल्यावर फक्त तिच्या resources साठी मंजूर cleanup करा आणि ठेवायची resources पडताळा.
चलो, अब प्रैक्टिस! स्वीकृत sandbox या नीचे दिए कागज़ी अभ्यास इस्तेमाल करो। लैब पूरी होने पर सिर्फ़ उसकी resources के लिए स्वीकृत cleanup करो और जिनको रखना है उनकी पुष्टि करो।
- Compare EC2 with the available on-premises setup for Mauli's short peak. Discuss time to provision, cost, capacity, continuity and shared responsibilities for the actual workload.
- Define AMI, instance type, key pair, security group, EBS, Elastic IP, Region and AZ.
- Decode the instance type
m7g.2xlarge. - Compare On-Demand, Reserved, Savings Plans and Spot pricing with a use case for each.
- What accounts are commonly documented for the selected Amazon Linux and Ubuntu images? How do you confirm the correct username for the actual CentOS Stream image and publisher?
- What happens to the public IP, the EBS volume and billing when you stop vs terminate an instance?
- Lab: In the authorized sandbox, choose the permitted Region, compatible image and type, management path and safe startup configuration. Use the local guest response from Lesson 5.3, or the direct browser exercise only when the approved design specifically needs it.
- Lab: Connect once to the intended instance using an approved access method. Compare Windows OpenSSH and PuTTY only if both are supported by the lab, and verify the actual host key and guest identity in either client.
- Lab: Compare the current address and storage observations for a disposable instance before and after an owner-approved stop/start. Use paper values for the EIP case unless the lab already authorizes a fixed-address test. Verify cleanup only for specific owned resources.
Quick Revision
- EC2 provides compute instances with virtual and supported bare-metal options. Verify the purchase terms, compatible capacity and app readiness separately.
- A launch selects a compatible AMI and type, placement, network policy, management access, storage and any needed roles or user data.
- Instance types: family/generation/attribute.size, e.g.
t3.micro. - Pricing: On-Demand, Savings Plans, Reserved, Spot, Dedicated.
- SSH needs an approved route, verified host identification, the actual guest user and a protected key when key-based login applies. Use the supported Windows or Unix client and permissions for the environment.
- Ordinary stop retains EBS and releases ordinary auto-assigned public IPv4. Termination ends the instance and applies each EBS volume’s deletion setting. An Elastic IP can retain a fixed public IPv4 when that is the actual requirement.
Got it? Your first EC2 server is ready – well done! If not, do 5.3 and 5.4 once again. Now let's move on to web servers – Nginx and Apache.
समजलं का? तुमचा पहिला EC2 सर्व्हर तयार आहे – शाब्बास! नसेल तर 5.3 आणि 5.4 पुन्हा एकदा करा. आता पुढे जाऊया वेब सर्व्हर्सकडे – Nginx आणि Apache.
समझ आया? आपका पहला EC2 सर्वर तैयार है – शाबाश! नहीं तो 5.3 और 5.4 एक बार फिर करो. अब आगे चलते हैं वेब सर्वर्स की ओर – Nginx और Apache.
Prepare, verify and close one complete EC2 training run
Mauli Dairy needs a training worker that can display a synthetic order status. You will produce a launch record, check a staged application response and predict what happens to the worker and related resources after class. You can work entirely on paper or run the local exercises using Python 3. If you already use an instructor-approved AWS sandbox, there is an optional inspection and lifecycle rehearsal. The training outcome is a reproducible observation and a verified resource plan, not a screenshot of an instance list.
Imagine a reviewer joins after the first launch. They need to know which account and Region the resource belongs to, what image and type were selected, how the approved operator reaches the guest, what the app should return and where the data is kept. They should be able to follow your notes without access to a private key or sensitive file. Use exact safe aliases, recorded results and assumptions. Keep any real identifiers and access materials within the approved environment.
Draw the launch path as a sequence. Pick image and type, choose placement and storage, establish human and workload identities, add safe startup configuration, observe readiness, run a representative request and verify the ending state. Each milestone needs its own proof. If a step fails, look at that boundary and the last known success. A fresh launch is extra infrastructure, not a diagnosis.
Write a three-column worksheet: expected, observed and next check. Use it for the exercises that follow. A paper observation may come from a given scenario instead of a live system. Mark which results you measured and which you predicted. The person reviewing your exercise should know whether you actually made a network request, read an inventory record, or reasoned about an example.
Map a small service requirement to the launch form
Start with the requirements: compatible Linux runtime, acceptable memory for a small synthetic workload, a root volume to boot the OS and an approved way to inspect the guest. The test response should stay inside a local listener. No direct public IPv4 is needed for the main private-worker example. If using an instructor-provided Session Manager setup, the appropriate role, agent, endpoint path and operator permission are already expected. The application does not need broad AWS permission to serve a file it already has.
| Launch field | Practice decision | Evidence after launch |
|---|---|---|
| Account, Region and tags | Use the assigned training account and Region and an approved owner label. | Same scope and exact instance ID in the current EC2 inventory. |
| AMI and architecture | Choose a supported Linux image from an approved source and match its architecture to the selected type. | Expected AMI ID and architecture, plus correct distribution in the guest. |
| Instance type | Use a compatible and account-approved configuration for the small lab. | Expected type and testable readiness under the intended workload. |
| Placement and login path | Choose the assigned subnet and approved private or managed connection. | Expected subnet, relevant network or managed settings and verified guest access. |
| Storage and startup | Choose approved root volume, retention behavior and a synthetic setup marker. | Expected volume flags, marker and successful permitted request. |
Write an alternative for a direct-public class demonstration only if the instructor's setup permits it. It needs an appropriate public association and subnet path, a firewall rule scoped to the approved caller and the actual listening protocol. If you simply move the private test's loopback URL into a public browser, the result means something different. A public connection to the guest and a request inside it are separate paths. Keep both in your worksheet with distinct expected results.
Review one form result before specifying the next. If the image has the intended architecture but the selected subnet cannot provide an available compatible type, document the placement issue instead of choosing an unrelated operating system. If the instance needs an approved role but the account blocks its assignment, ask the account owner to verify the trained permission and role before proceeding. A successful alternative meets the requirements written before launch. It does not just remove the error that appeared on the most recent screen.
Ask which assets recur across instances. The trusted image, deployment version and intended account controls can be selected again. The actual instance ID and ordinary dynamically assigned addresses belong to one launch. If a reference points to yesterday's instance ID or address, identify whether it is supposed to change. A planned replacement can repeat architecture and version while getting a different instance identity. That is a correct new launch, not a copy error.
Decode one instance name and decide what it still does not tell you
The original chapter asks you to decode m7g.2xlarge. The M series is a general-purpose instance family. The number 7 is the generation. The g indicates an AWS Graviton variant, and the 2xlarge part is the size. The current AWS specifications list the M7g example with Graviton3 and show eight vCPUs and 32 GiB for this size. A GiB is a binary unit of memory size. An actual supported deployment also depends on the application architecture and other type details, so check capabilities and allowed Region or zone with the official specification rather than deriving every value from the type name.
Suppose the application build includes an x86-only binary. An Arm instance can have more than enough memory and still be unsuitable without an approved compatible version of the build and all dependencies it uses. Ask how to verify architecture at two stages: image compatibility at launch, and the actual guest and package after launch. The directory that holds the project files can look identical on different machines while the built executable differs.
Now compare a small bursty web listener with a workload that processes files continuously. The first could fit a supported small type after you check memory and expected CPU behavior. The second may need different sustained CPU, network and storage capabilities. A billing commitment is an independent choice. Changing how compute is priced cannot make the type support an incompatible architecture. Good reasoning keeps size, performance, deployment compatibility and purchase terms in different columns.
For your worksheet, write five checks before choosing a type: image and app architecture, memory and CPU requirements, needed storage and network properties, documented availability in the chosen environment, and applicable costs. Ask which measurement determines whether the chosen size can handle the operation. A single successful request can establish readiness without describing peak capability.
Serve a synthetic result locally and deliberately ask for a missing path
You need Python 3 and a shell. This experiment creates a temporary release directory for one training file, chooses a loopback port, sends two requests from the same machine and closes everything. The example uses the response handling part of Chapter 5 without cloud access. It does not contact external hosts, modify any existing app, or read data outside the created scratch directory. Predict the expected status for the file and missing path before running it.
python3 - <<'PY'
from functools import partial
from http.server import SimpleHTTPRequestHandler, ThreadingHTTPServer
from pathlib import Path
from tempfile import TemporaryDirectory
from threading import Thread
from urllib.error import HTTPError
from urllib.request import ProxyHandler, build_opener
with TemporaryDirectory(prefix="mauli-ec2-practice-") as workspace:
Path(workspace, "order.txt").write_text("Training order is ready.\n")
handler = partial(SimpleHTTPRequestHandler, directory=workspace)
with ThreadingHTTPServer(("127.0.0.1", 0), handler) as server:
worker = Thread(target=server.serve_forever, daemon=True)
worker.start()
opener = build_opener(ProxyHandler({}))
endpoint = f"http://127.0.0.1:{server.server_port}"
try:
with opener.open(endpoint + "/order.txt", timeout=5) as reply:
print("order:", reply.status, reply.read().decode().strip())
try:
opener.open(endpoint + "/missing.txt", timeout=5).close()
except HTTPError as error:
print("missing:", error.code)
error.close()
finally:
server.shutdown()
worker.join()
print("Temporary server and release directory are closed.")
PY
Expect order: 200 Training order is ready. and missing: 404 before the final cleanup line. Some terminals will also print the server's two request log entries. The 200 response proves the known file was reached and returned. The 404 proves the server answered a different request without finding the path. Neither result is a network timeout. You used the same listener and only changed the requested URL path.
Find the reason for three choices in the sample. The temporary directory protects an existing site from being overwritten. The loopback bind limits clients to the current host. Asking the OS for port zero in the bind allows it to choose a free port, and the program then reads the actual port used. The opener bypasses proxy settings for this localhost exercise. If the local environment blocks socket creation, keep that restriction intact and complete the expected-results table on paper.
Map this to an authorized cloud worker. A response in the guest would prove that guest's local process and file. It would not prove what public address, security group or frontend route a customer should use. If a public-facing deployment is part of another approved class, test its intended hostname and protocol from the appropriate network. Keep the direct local observation and chosen external request in different rows. The script removes its own scratch directory after closing the listener.
Walk through the approved EC2 path or review a provided launch record
Use the launch and connection lessons as references for an instructor-controlled AWS account. Confirm the exact lab scope, which resources may be created and removed, and any costs or credits before proceeding. If the account already has an intended instance for this task, inspect it instead of making another. If you cannot use a live sandbox, record the sample decisions and compare them to the expected observations below. Both modes teach the same launch relationships.
Choose the assigned Region, trusted and compatible AMI and the small instance type permitted for the lab. Document the chosen properties and intended app operating system. No particular type or Region guarantees eligibility for a current offer.
Choose the intended VPC and subnet, correct management path and approved role or user authentication. Keep the main private lab without an ordinary public IPv4. If the setup already uses a Session Manager role and endpoint, verify its prerequisites rather than opening a separate public rule.
Review EBS root size, encryption and retention; choose the approved startup script with no secrets. Verify that optional user data matches the image and expected sample behavior. As in the earlier private launch lesson, a small startup file can be enough to show the script ran.
If authorized to launch, submit the intended count once, record exact resource identification, then wait for the relevant instance state and applicable checks. Read the guest's startup status and expected file or app result separately. Do not use a hardcoded count of EC2 checks as proof of all readiness.
Connect with the approved method and verify the same guest's identity. Prove the sample status and body from the expected path. If it is local, state explicitly that the result demonstrates the loopback service. End the session and record what guest or AWS resources were created by the exercise.
A student who is practicing on paper can use these supplied results: correct private subnet and image, instance running, startup file present, approved connection opens, local request returns 200 with the correct synthetic order. Another student sees the same instance state but no startup marker. Identify which extra fact needs verification before assuming their app works. If the real lab returns a failure, inspect the exact supported check, guest and permission path. Keep any changes inside the authorized scope.
Check the actor that performed a request instead of only its machine
Write three short rows for the intended operator, the app's guest service user and the app's AWS identity. The operator can use the approved management path and read the environment under the expected guest permission. The local service account determines the relevant process permissions. If the app needs AWS access, an approved instance profile associates the workload role, and supported tools can request using temporary credentials. All three can be correct without sharing the same access rights.
Given observation A: the operator checks that the expected guest session runs under the temporary session identity. Given observation B: the application can read its own installed file. Given observation C: the app gets denied reading a particular training object from AWS. Explain what A and B confirm before addressing C. The first two tell you about local or account access and one file. They do not establish the allowed service API action. Check the required application role and relevant resource and endpoint policy from the actual worker.
Compare two short allowed paths. Direct SSH authenticates to an intended guest user after the path and host key checks. A Session Manager shell depends on the managed instance and operator permissions. If using Windows OpenSSH, apply the local key protections and exact supported client configuration. A second client is a useful comparison only if the environment already approves it and it uses the same intended target, username and host identity.
For your report, include the actor and operation that worked and which authorized evidence confirmed their identity. Do not record the private key, any credentials or full verbose output. That proof should make sense if another authorized trainer repeats it from the same scope. If a denial happens, specify whether it concerns console operations, the guest login or app access. Each needs a different review.
Compare four usage patterns without memorizing a discount percentage
Choose an initial purchase model for each workload and say which information could change your answer. A one-day lab needs a short commitment. A production baseline runs month after month and has been measured. A nightly group of report jobs can restart from saved work. A licensed workload has specific machine or tenancy rules. Consider what it costs to run, how long it is expected to keep using that model, what happens to capacity under stress and which operations can safely be interrupted.
| Sample workload | Candidate to evaluate | Condition to verify |
|---|---|---|
| One-day lab server | On-Demand under the approved account terms | Available compatible type, time used, credits if applicable and related resources. |
| Measured long-term compute baseline | Appropriate Savings Plans or Reserved Instances comparison | Expected eligible spend or usage, flexibility, product term, actual coverage and capacity requirements. |
| Report processing with approved resumable jobs | Spot for interruptible work where appropriate | What work can be recovered, interruption handling and a plan for required capacity. |
| Workload with a specific licensing or tenancy constraint | Supported Dedicated Host or Dedicated Instance option if it fits | The real licensing and placement requirements, supported type and expected usage cost. |
A purchaser wants a rate advantage and assumes it makes all requested capacity available in one specific zone. Explain the difference between discount eligibility and capacity reservation. The purchase plan can change the price of eligible use. Actual supply, location and supported reservation options determine the available placement. A good worksheet asks both questions and records the exact assumptions for the real model.
For the longer baseline example, consider a seasonal service that runs its stable workers all month and adds temporary capacity for a few hours. It may evaluate a commitment for well-understood eligible baseline and a different model for the uncertain peak. Other charging resources such as storage, network and allocated IPv4 do not automatically follow the same compute purchase benefit. Confirm exact current terms before spending anything. For this lesson the answer is a comparison of operational conditions, not a financial purchase recommendation.
Predict one ordinary reboot and one stop/start using a single resource record
This practice can use the given table or an instructor-authorized disposable EBS-backed instance. If using the real machine, confirm the current approved ID, account, Region, root and data storage, management path and absence of dependencies you are not permitted to interrupt. This exercise compares a known reboot and a controlled stop and start. It never asks you to submit a termination to test a protection setting.
| Current observation | Before | Typical outcome in the given EBS-backed case |
|---|---|---|
| Instance ID and EBS marker | Same training worker, known file on its boot volume | Remain under ordinary reboot and stop/start. Verify the actual file location. |
| Ordinary auto-assigned public IPv4 in a separate public test | One current value | Ordinarily remains over reboot. Released on stop and may be replaced with a new value at start. |
| Associated lab EIP under its own approved setup | The known allocation and association | Can remain across reboot and stop/start. It does not keep an app running while compute is stopped. |
| Application service and process state | One successful representative operation | Process restarts or needs to be started again according to configuration. Check the operation separately. |
Write expected outcomes first. If the main practice uses a private-only instance, show no direct public IPv4 both before and after. You do not need to allocate an EIP to answer the question. A separate fixed address practice can use the existing read-only inventory or paper values from Lesson 5.5. Check the exact association rather than a response returned from an independently routed egress path.
If the owner approves the reversible test, observe the affected application and its expected temporary outage, then compare current state and the actual guest and app after each operation. Verify the app's next useful response after reconnecting. If you have an approved local marker created by the launch exercise, check it on the expected filesystem. If you expected a marker stored only in memory, adjust the prediction. OS process state is not the same as durable EBS data.
Now rehearse termination on paper. Give the root volume its selected deletion flag and one data volume a different flag. Decide which would remain and collect the evidence needed before and after an authorized removal. An instance that no longer exists can't be restarted merely because a disk survives. Only the lab owner should remove a disposed test instance and its permitted allocations. A shared subnet, address or volume belonging to someone else remains outside the exercise.
Run a resource ledger that counts compute and allocated time separately
Use Python 3 or a calculator. The supplied example observes one class day. A worker runs for three hours and is stopped for five. Its EBS volume remains throughout the eight hours. Its test EIP was acquired an hour after the window opened and was not released until the window ended. A class NAT gateway is shared and remains outside this individual cleanup. Use these assumptions to calculate consumption units rather than prices.
python3 - <<'PY'
resources = [
("compute", "running worker-hour", 0, 3, "training worker"),
("root EBS", "provisioned volume-hour", 0, 8, "training worker"),
("public IPv4", "allocated address-hour", 1, 8, "training worker"),
("NAT gateway", "held gateway-hour", 0, 8, "shared class"),
]
for name, unit, begin, end, owner in resources:
amount = end - begin
print(f"{name}: {amount} {unit}(s), owner {owner}")
PY
Expect three running worker-hours, eight observed provisioned volume-hours, seven allocated address-hours and eight observed shared gateway-hours. These units describe the model, not the exact bill. An actual EBS bill uses its published capacity, time and any other performance units. A regional gateway can use documented zonal billing units. Real service rates, applicable pricing granularity, account credits and data transfer may all affect the charge.
Change the example so the address is allocated at the beginning and released after six hours. Its ledger should show six held hours. Its timing is independent of the three compute hours. Next estimate how the end of the observation window would change if the EBS volume were deliberately kept for recovery. Give retained data and charges a separate purpose and owner. No real environment was queried, so there is no cleanup.
Use the output to identify what result belongs in a report. "Compute ran three hours" does not describe the retained storage and other services. Conversely, the shared gateway was not created by this learner. Address costs and service use should be attributed according to the account owner's policies and actual inventory. A scoped cleanup explanation states which items remain and why rather than treating all nonzero meter lines as mistakes.
Write one useful success and failure check for each milestone
Suppose the first attempt finds the expected instance record but the guest file is missing. Write which checks are already true: correct cloud scope, actual instance ID and selected state. Then identify the missing startup step. Check approved cloud-init or application logs and its configuration. A missing file is a different observation from a blocked external connection. If the process only needs to serve on loopback, public inbound permissions are not part of this test.
Suppose the second learner sees the correct file but a 404 from the guest's chosen test server. A 404 means a responder could receive and answer that request. Compare which local port and path it served and which directory or application rule it uses. The local script uses a known path so this failure can be reproduced by requesting a different name. If the intended file appears in another directory, correct the expected test or authorized deployment rather than changing the cloud instance type.
Suppose the service works at the expected address before stop, then an old public bookmark fails after start. Check the current ordinary public association and the actual DNS result from the permitted path. Confirm application readiness after start as a separate observation. If the account intentionally uses a stable address, a failed request could still come from a listener or route. An EIP only answers the address requirement.
Make the worksheet useful to the next reviewer. For each observation include the approved environment, time, expected operation and result. Put a follow-up owner beside faults that need permission. Confirm that any approved repair only addressed the required scope, and repeat the expected operation to show it worked. If the exercise is finished, check its specific compute, storage and address records under the planned outcome. Write whether each was removed, retained or shared.
Compare two look-alike launch records before diagnosing a fault
Two learners report their EC2 instance as mauli-training. Record Blue is in the assigned Region, uses a compatible Arm image and the instructor's private subnet. It has the intended workload role, local startup file and no direct public IPv4. Record Green is in another Region, has the same friendly name, mounts a different root volume and was never the resource selected for this class. A lab partner presses Connect on Green and finds the wrong operating system. What does the actual evidence suggest?
The Name tag allows both resources to be labelled similarly. Check the expected ID and Region first. A successful guest login can still be to the wrong machine. Compare the instance record, image identity and current guest before trying a repair. If Blue is absent from the visible inventory, inspect active account role and filters and verify access through the class owner. Do not create another resource merely because the selected view displayed the wrong machine.
Now give Green the correct Region, project and type but an outdated app release. Its network and identity can be correct. What was different in launch input or startup evidence? Check the approved AMI and bootstrap record and observe the application version and expected response. If the difference is one manual action taken after class, capture that fact under the authorized rollout procedure. The type and OS do not identify the app uniquely.
For grading, name one observed field per changed condition. Record the instance ID for identity, image and architecture for boot compatibility, role and actual app behavior for permissions, and expected current response for version. A missing field reduces confidence rather than silently changing the operation you perform. Use the two supplied records to show how an error can be scoped without launching, stopping or deleting anything.
Plan how the next worker would recover the intended data
The teacher now wants a fresh worker that preserves a particular synthetic order. The old instance's boot image was prepared before students created the sample records. Its root disk can still mount after an ordinary stop, but the new worker launched from the older AMI will not automatically include the changes saved later. Identify which data is authoritative, which copies are available and what the recovered operation must return. The AMI supplies the starting software, and the appropriate storage or service supplies the current approved record.
Write a restore table with three requirements: recreate the compatible worker, gain access to the training data under the correct identity, and serve a request for the expected synthetic record. For each name the source, the action owner, and a successful observation. A root storage mapping and an independent data volume can have different retention settings. If the database or file is elsewhere, document its role. A state label such as running cannot tell you that the desired record is present and usable.
Add placement and recovery time. If the previous data was on a zonal EBS volume, a replacement in another zone cannot attach that volume directly. The approved design may use an appropriate backup copy and new volume in the intended destination or use a separately available data service. Confirm encryption and access under the destination's allowed configuration. The new frontend or private test path should also reach the replacement. Expected recovery includes restoring access, not only restoring bytes.
Decide what to do with the old test resources only after the recovered operation is verified. Some retained copies are intentionally kept for the agreed training cycle. Others contain no required data and can be removed under specific permission. Mark each decision and record ownership. If an approved test restore shows a wrong or missing record, resolve that mismatch before ending the original useful environment. A classroom worksheet can practice this sequence while leaving real instances and data untouched.
Trade worksheets and check that the procedure is reproducible
Ask a partner to use your launch plan as if they were the next operator. They should identify the instructor's approved Region and network without needing your local key or copied account data. They should tell how the chosen image and type fit together, which path can reach the guest, what permissions the app has and where the sample response is expected. If any step only says “use the same one,” replace it with the approved descriptive value and verification.
Give the partner one failure at a time. First, the step they repeated reports an authorization error. Have them state which actor took which action. Next, a local test path returns 404. Have them find the process and expected path without opening a public port. Finally, the worker is stopped but an address allocation remains. Have them locate the identified resource and ownership and describe what might still incur a charge. Compare their proposed check with the recorded result.
Score the procedure using four observable items. It starts in the correct scope, selects a compatible configuration, obtains or predicts a useful permitted response and determines the outcome of independent resources. Give a separate note for unknowns and conditions that depend on current AWS terms. A reproducible procedure can tell another learner how to collect qualifying evidence when any one assumption changes. It should not rely on one person remembering what they clicked yesterday.
Conclude with one signed-off exercise result under the training process. Record whether the work was paper-only or actually observed, the result of the expected request and the fate of any permitted owned resources. Do not state that a private test reached the public internet or that a mock price is a current rate. End the lab when the environment's expectations and your recorded observations agree or when the remaining issue has a clear authorized owner. None of the paper tasks requires extra resource creation.
Submit a set of results someone can verify independently
Give a brief comparison of EC2 and owned hardware for a workload with a low baseline and one predictable peak. Explain ownership, readiness delay, price drivers and one recovery need. Your answer can choose either model when the rest of the assumptions support it.
Decode the image and type choice, then write which extra information you need besides CPU count before provisioning. Match actual image architecture, application support, Region and zone, permissions and the intended service result. Point to a field that lets the reviewer check each decision later.
Submit the local 200 response and deliberate 404 observation, or their supplied example. Label the selected directory, port scope and path that gave each result. Explain what would also be needed for an approved outside client.
Write the approved before-and-after record for an ordinary reversible pause and an example permanent removal. Include process state, durable data, public assignment and separately retained resources. Identify what you would verify before an irreversible action rather than performing it to settle uncertainty.
Build a cleanup table with one owned test worker, its optional held address, an agreed retained volume and a shared gateway. Add one permitted verification step for each. Your answer should show which resources belong to the lab and which remain for a documented reason.
Explain the practice results in interview form
What difference did you demonstrate between the 200 and 404 results?
Both requests got an HTTP response from the same local listener. The 200 returned the expected body. The 404 showed the requested file was not present under the chosen directory and path. Neither gave evidence of a timeout or a public cloud route.
How do you know a type is suitable for the chosen image?
Check the supported instruction set, image status and relevant boot and device requirements for the actual type. Then verify the application can run with available memory, CPU, storage and network. A large type with incompatible architecture still fails the first test.
Why can a private training worker be inspected without assigning public IPv4?
Use an approved management path. A supported managed session can work using the agent, IAM and needed service connectivity. The app's local loopback check occurs inside that guest. It does not need an external directly routed IPv4 of its own.
What does the billing ledger show after a stop?
Compute use and held resources have different measured intervals. Ordinary running compute can stop while storage, snapshots, public IPv4 and a shared gateway remain. Review terms and ownership separately and verify the exact planned end state.
What would show that a replaced instance can serve correctly?
Verify actual approved image and configuration, guest access, startup and dependency permissions. Confirm the relevant listener and expected representative result from the intended client. Use the new instance identity and the intended service endpoint carefully. One running record alone cannot prove the old behavior was restored.
Check the decision points in a complete training run
What does the g in the M7g example identify? A. A Graviton variant. B. A gateway scope. C. The next available image Region.
Show answer
A. The name's optional attribute identifies the documented processor variant. Verify the compatible image and software. It does not identify which regional image ID you can use.
The app is held in a private subnet and can use Session Manager. What is needed before a guest test? A. The approved agent, permissions and service connectivity. B. An EIP on every private worker. C. A public database route.
Show answer
A. Verify the managed instance and operator conditions. A public IPv4 or unrelated public listener does not create this management path.
The local exercise prints a 404 for its missing path. What does that mean? A. The request got a response from the listener for an unavailable path. B. No connection could ever be made. C. All service costs ended.
Show answer
A. The HTTP code shows an actual responding process. It indicates a missing resource under that path. Examine the expected directory and URL separate from the network path.
In the supplied ledger the worker ran three hours and the address was held seven hours. Which number belongs to the allocated address interval? A. Three. B. Seven. C. Zero because compute stopped.
Show answer
B. The address was held from hour one through hour eight. Its time does not depend on running worker hours. Apply the account's relevant pricing separately if needed.
Which is the safest way to end a disposable cloud lab? A. Remove every untagged resource. B. Verify the specific owned resources and intended retention or removal with the approved plan. C. Assume ending the SSH session terminates EC2.
Show answer
B. Match the resource identity and ownership, and check independent allocations. Ending a session does not stop the instance. Do not change shared resources to make a list look empty.
Revision cards
- Launch record
- Record the expected image, type, placement, identity, network and storage. Verify the actual instance by ID.
- Choose an architecture
- Check the image, type and built application together. A memory increase cannot fix an incompatible instruction set.
- Useful response
- Test the intended path, status and result. A 404, timeout and correct response establish different facts.
- Private management
- Use the approved access and identity prerequisites. Local testing through the guest needs no public app rule.
- Lifecycle evidence
- Verify compute state, durable data, address association and application after the named action.
- Held resources
- Separate compute use, volume or snapshot retention, public IPv4 and other service allocations in the cleanup record.
References
- EC2 console launch wizard
- Amazon Machine Image guidance
- EC2 naming conventions
- EC2 general purpose instance specifications
- EC2 purchase options
- EC2 On-Demand pricing
- AWS Free Tier account conditions
- EC2 user data and startup
- EC2 applicable status checks
- EC2 SSH access and platform permissions
- Session Manager prerequisites
- EC2 instance roles
- EC2 state transitions and billing
- EBS delete-on-termination behavior
- EBS attachment scope
- Elastic IP allocation and association
- VPC, gateway and public IPv4 pricing
- Python HTTP servers
- Python temporary files and directories