Chapter 5: Amazon EC2 (Elastic Compute Cloud)
5.1 Why EC2? Cloud vs on-premises
Friends, let's first understand why we need EC2 at all. Imagine your college wants to host a result portal. With an on-premises setup, the college provides the equipment and operating environment itself or through a hosting partner. If the existing system cannot handle result-day demand, the team needs more capacity or a different design.
मित्रांनो, आधी EC2 का लागतो ते समजून घेऊया. समजा तुमच्या कॉलेजला रिझल्ट पोर्टल होस्ट करायचं आहे. On-premises पद्धतीत कॉलेज स्वतःची यंत्रणा वापरू शकतं किंवा होस्टिंगची सेवा घेऊ शकतं. रिझल्टच्या दिवशी सध्याची क्षमता कमी पडत असेल, तर वाढीव क्षमता किंवा वेगळी रचना लागेल.
दोस्तों, पहले समझते हैं कि EC2 की ज़रूरत क्यों पड़ती है. मान लो आपके कॉलेज को रिज़ल्ट पोर्टल होस्ट करना है. On-premises तरीके में कॉलेज अपने उपकरण और संचालन का इंतज़ाम करता है या किसी होस्टिंग सेवा की मदद लेता है। अगर मौजूदा क्षमता रिज़ल्ट के दिन की माँग पूरी नहीं करती, तो अधिक क्षमता या अलग डिज़ाइन चाहिए।
With cloud computing, you can provision compute and related resources on demand. Check how running instances and resources you keep allocated are billed.
| Point | On-premises | AWS EC2 (cloud) |
|---|---|---|
| Upfront cost | Hardware, facilities and support costs depend on existing capacity and refresh plans. | On-Demand compute has no upfront commitment. Other purchasing options and resources have their own terms. |
| Time to get a server | A spare machine may be available quickly. New hardware depends on local procurement. | Provisioning is on demand where supported and available. Application readiness follows boot and setup. |
| Scaling | Use spare capacity or procure more when needed. | Choose compatible instance sizes or add ready workers through a tested Auto Scaling policy. |
| Maintenance | You handle hardware, power, cooling | AWS handles physical infrastructure |
| Availability | Depends on sites, networking and the recovery design. | Availability Zones and Regions can support an explicitly configured redundancy or recovery plan. |
| Global reach | Depends on the available facilities, networks and hosting contracts. | Select supported Regions that meet the workload and account requirements. |
| Security | Depends on what you operate and what the service contract covers. | Shared responsibility: AWS secures the cloud, you secure what is in the cloud |
Now think about our Mauli Dairy. Before Diwali, online orders for pedhe and shrikhand go up a lot, and afterwards they come down again. If they need to buy a large machine just for the rush, they will carry that cost beyond the busy days. With EC2 they can plan extra short-term compute and scale it back after the rush, while checking storage and network costs separately.
आता आपल्या Mauli Dairy चा विचार करा. दिवाळीच्या आधी पेढे आणि श्रीखंडच्या ऑनलाइन ऑर्डर्स खूप वाढतात, आणि नंतर परत कमी होतात. गर्दीसाठी वेगळा मोठा सर्व्हर घ्यावा लागला तर त्याचा खर्च गर्दी संपली तरी राहतो. EC2 वर तात्पुरती compute क्षमता वाढवून नंतर कमी करता येते. Storage आणि network चा खर्च वेगळा तपासा.
अब अपनी Mauli Dairy के बारे में सोचो. दिवाली से पहले पेढ़े और श्रीखंड के ऑनलाइन ऑर्डर बहुत बढ़ जाते हैं, और बाद में फिर कम हो जाते हैं. अगर भीड़ के लिए अलग बड़ा सर्वर खरीदना पड़े, तो उसका खर्च भीड़ के बाद भी रहता है। EC2 पर कुछ समय के लिए compute क्षमता बढ़ाकर फिर कम कर सकते हैं। Storage और network का खर्च अलग से जाँचो।
Cloud service models: IaaS (you manage OS and above — EC2), PaaS (the platform manages parts of deployment and infrastructure, while you configure the application and environment — Elastic Beanstalk), SaaS (you just use the software — Gmail). EC2 is IaaS.
Shared responsibility model
AWS is responsible for the data centres, hardware, hypervisor and global network. You are responsible for the guest OS (updates, patches), security group rules, users and keys, applications and data. The customer configures and verifies the approved instance administration path and authentication settings.
Ravindra Bagale's Tip
Many students think that once they take a server on the cloud, security is entirely AWS's job. Don't make this mistake! Remember shared responsibility: AWS looks after the data centre and hardware, but OS updates, security group rules, keys and data are all your responsibility. Choose an approved management path and limit its sources and authentication to authorized administrators.
Ravindra Bagale's Tip – मराठी
बरेच students ना वाटतं की cloud वर server घेतला म्हणजे security पूर्ण AWS ची जबाबदारी. इथे चूक करू नका! Shared responsibility लक्षात ठेवा: data centre आणि hardware AWS सांभाळतो, पण OS updates, security group rules, keys आणि data हे सगळं तुमची जबाबदारी आहे. प्रशासनासाठी मंजूर मार्ग वापरा आणि फक्त अधिकृत व्यक्तींनाच योग्य प्रमाणीकरणाने प्रवेश द्या.
Ravindra Bagale's Tip – हिंदी
बहुत से students सोचते हैं कि cloud पर server ले लिया तो security पूरी तरह AWS की ज़िम्मेदारी है. यह गलती मत करना! Shared responsibility याद रखो: data centre और hardware AWS संभालता है, लेकिन OS updates, security group rules, keys और data सब आपकी ज़िम्मेदारी है. प्रशासन के लिए स्वीकृत रास्ता अपनाओ और सही प्रमाणीकरण के साथ केवल अधिकृत लोगों को प्रवेश दो।
Practice task
Mauli Dairy, Pune sathi ek chhota table banva: on-premises server vs EC2 – upfront cost, server milayla lagnara vel, scaling aani maintenance. Pratyek row samor ek line liha ki Mauli Dairy sathi kay better aahe aani ka.
Got it? Many EC2 plans let you add and remove compute on demand. Check which related resources stay allocated and billable. Now let’s move on to the key concepts of EC2.
समजलं का? EC2 मध्ये गरजेनुसार compute क्षमता वाढवता किंवा कमी करता येते. कोणती संसाधने अजून allocated आहेत आणि त्यांचा खर्च चालू आहे का ते तपासा. आता पुढे जाऊया EC2 च्या संकल्पनांकडे.
समझ आया? EC2 में ज़रूरत के अनुसार compute क्षमता बढ़ा या घटा सकते हो। देखो कि कौन से संसाधन अभी भी allocated हैं और उन पर शुल्क जारी है या नहीं। अब आगे EC2 की अवधारणाएँ देखते हैं।
Start with the job the college needs the computers to do
A college runs a results portal. On most days students do not use it much. On release day many students request their class results in a short window, followed by families checking again throughout the evening. The registrar wants the site to answer accurately and quickly. The IT team needs enough processing power at the busiest time without buying equipment before it knows what the next year will require. There are several ways to meet that goal. EC2 is one way to obtain compute capacity when the portal needs an operating system and a server application the college will run.
Compute means the CPU time and memory that run an application. CPU time performs the work, such as processing an HTTP request. Memory holds data and code used while the process runs. Storage preserves files or data according to its own lifetime. Network interfaces and service endpoints carry the requests. A portal usually needs all four, and buying more of one cannot always make up for a shortage in another. For example, adding web servers does little if every web request waits on a slow query to the same database.
An on-premises deployment runs on equipment the organization operates at its facility or under its own hosting arrangement. It might buy new hardware, use an existing virtualized cluster, or contract with a data center for space and network service. Its staff chooses how to provide power, spare parts, network connectivity and recovery. On-premises systems can be designed for redundancy and scale. The key planning question is how much usable capacity and staff time are already available when the demand changes.
Amazon Elastic Compute Cloud, abbreviated EC2, supplies compute capacity in AWS. In a typical first lab you launch a virtual server called an instance by selecting an image, a type and a network. Some EC2 types provide bare-metal instances for workloads that need them. AWS operates the underlying cloud infrastructure. The college keeps responsibility for how it configures its instances, application, access and data. It can create or remove instances using authorized controls instead of arranging physical delivery for each one.
Choosing EC2 is an infrastructure decision inside a wider plan. The registrar still decides who may see which records. The application owner still decides what result page shows and how to handle a missing record. People need to test the portal from the network and identity they actually use. Treat “we moved to cloud” as a change in how computing capacity is obtained and run. Describe the separate pieces needed for the service to work.
Compare fixed capacity with a short demand peak
Imagine that a measured app worker handles 25 complete lookup requests per second while meeting the college's response-time goal. On a normal day the portal needs to serve 28 such requests per second. Two workers can theoretically supply 50 under this simplified model. On result day the planning estimate rises to 140. Six workers could supply 150 in the arithmetic alone. The plan needs enough headroom for variation and the failure conditions the college accepts. Five healthy workers could supply only 125, so six workers still leave a shortfall if one of them becomes unavailable.
These are illustrative throughput values, not an EC2 benchmark or guarantee. In real load testing, define the transaction, use representative usage patterns and protect production data. Measure time and errors as well as average requests per second. A worker that handles cached reads rapidly may handle a more expensive or uncached lookup much more slowly. Server size, software, request mix, database and network behavior matter to the number.
On the owned-hardware side, the college might already have enough server capacity spread across several hosts. It can allocate more virtual machines to the portal and return the unused capacity to other applications afterward. Or it might need to order gear, add networking and arrange support in advance. The cost and delivery time depend on that institution's situation. Reusing suitable equipment changes the starting question and might be the better option for a continuously loaded service or one that must remain close to local systems.
On the cloud side, the organization can model two baseline instances, start additional instances before the expected rush, and return toward baseline after demand is over and no work will be interrupted. Readiness takes time. A new instance needs to boot, start its application, load its settings, register as an eligible target and respond to relevant checks. A launch command returning successfully is earlier than the application being ready for customers. Plan when the scale-out needs to start rather than assuming it occurs instantly when overload begins.
Capacity also depends on Region, Availability Zone, instance type, service quotas and current availability. A new request for a particular instance type is not a promise that unlimited resources are available at that exact instant. An organization can test its intended scaling plan, choose suitable alternatives and decide whether it needs a capacity reservation or other preparation. In your beginner worksheet, list one risk in the hardware model and one risk in the cloud model and identify the owner of each.
Decide whether to add instances or change the size of one
Vertical scaling means moving a workload to a larger instance size or machine. It can help when a process needs more memory or CPU on one host. The application may need a planned restart or maintenance window. Resource options must be compatible with its software and launch settings. A single larger host can still be a single dependency, so ask what happens to customer requests while the change or a failure is in progress.
Horizontal scaling means adding more workers that can serve the same workload. A load balancer gives customers an entry point and sends eligible requests to registered targets. An EC2 Auto Scaling group can maintain desired capacity and add or remove instances based on configured policies or schedules. Choose minimum and maximum limits and metrics appropriate to the workload. Test when it should add workers and when it is safe to remove them. Too little capacity produces slow responses. Too rapid a scale-in can remove workers while customers still need them.
The application must fit the horizontal pattern. If student sign-in or uploaded data remains only in one server's local memory or filesystem, a second worker may not be able to continue the session or find its file. The team can use an appropriate shared data store, session approach and storage service, with permissions and availability considered separately. Shared dependencies can also become bottlenecks. Doubling web workers can double connection pressure on a database that was already near its limit.
For the scheduled results announcement, consider capacity before the known time rather than waiting only for CPU to rise. For an unexpected increase, use a tested policy that represents demand and confirm startup time. A metric such as CPU can be useful if CPU limits the transaction, while request rate, queue length or useful app timing may reveal another problem. Choose the signal based on measurements. A target group health check alone does not measure request capacity under peak load.
When the rush declines, make sure the app can finish existing work before scaling in. A named service can continue on the remaining healthy targets even though individual instance IDs and addresses change. Keep the data the application needs in appropriate durable storage. The benefit of removing temporary compute capacity depends on knowing which workload state has to survive each instance replacement.
Assign the infrastructure, operating system and application work
With a self-operated server, the organization may be responsible for the room, power, cooling, network, hardware maintenance, operating system and business application. A colocation or managed-hosting contract might assign some parts to another organization. Write down the real arrangement before comparing responsibilities. Listing every physical task on the college's staff is inaccurate if the institution already uses a managed provider.
On EC2, AWS operates the infrastructure that runs AWS services, including its facilities, hardware and foundational virtualization and networking. The customer manages the guest operating system, installed application, instance access, security group configuration and data handling for its EC2 workloads. For other AWS services the exact boundary can move. AWS documents the shared responsibility model for both security and compliance. Map it to the selected service and actual controls rather than trying to account for security with a single sentence.
| Work on the results portal | Typical EC2 responsibility for the college | Evidence of completion |
|---|---|---|
| Set up an approved access path | Choose account permissions, network scope and instance authentication appropriate to the role. | A permitted administrator can connect using the intended mechanism, and unrelated sources lack permission. |
| Maintain the guest and installed software | Patch or rebuild the instance using approved operating system and deployment procedures. | A maintained image or version inventory and completion of the required service checks. |
| Protect students' records | Choose the approved storage, access control, encryption and retention practices and configure the application accordingly. | Normal training identities can access the permitted record and receive the intended denial for unrelated records. |
| Recover the application | Keep an appropriate backup or rebuild plan and know how to restore the required data. | A scoped training restoration recovers an agreed operation and data set within the planned objectives. |
A strong example is an administrator login. AWS operates EC2 and the infrastructure it uses. The college decides who is authorized to start an administrative session and which conditions apply. The instance still needs a working access mechanism under the chosen configuration. In training, use the approved private or limited path and keep key material in the required storage. Do not rely on an internet-facing management port or assume a cloud move fixes a previously unmanaged password or software update policy.
An application running on a managed platform may move some routine operating tasks to the provider, but the customer still configures permission, deployment and data controls. A fully managed SaaS product can move still more infrastructure work while retaining obligations such as managing business users and records. For the lesson, compare the real tasks the college can support. The more control it needs over a guest environment, the more relevant EC2 becomes.
Count the resources that are billed and the time they remain allocated
On-premises spending may include an initial purchase, depreciation or lease, staffed operations, support contracts, electricity, racks, backup copies and network links. Existing capacity can be shared across workloads, which changes the part of the cost you attribute to one application. When comparing a new portal, count how much incremental equipment and effort the institution needs and where it still has commitments for resources it already owns.
EC2 On-Demand lets you use instances without an upfront reservation or long-term commitment for the compute rate. The compute charge follows the selected type, platform, Region and billing rules. Other resources can be charged separately. Examples include retained EBS storage and snapshots, public IPv4 addresses, load balancing, NAT, data transfer and paid software or support. A training learner can stop an EBS-backed instance and still see charges for attached or retained resources. Check the current official rate and account usage before repeating the words “pay only for what you use.” Allocated resources may be counted as usage even when no user is visiting the portal.
Keep steady costs separate from the cost of a short peak. Suppose a demonstration worksheet assigns each running worker a rate of one imaginary cost unit per hour. In a 30-day month, two workers running all 720 hours use 1,440 worker-hours. Four extra workers running during an eight-hour peak add 32 worker-hours. This cloud worksheet might total 1,472 units of compute before everything else. Six workers running all month would use 4,320 worker-hours at the same assumed rate. These are hours and imaginary rates. An owned fleet does not use an hourly rental price, so calculate a comparable monthly ownership cost separately.
Start the real estimate with hours by component, then apply sourced prices. In the above calculation an hour for one worker is a unit of worker-hours, not an hour for all workers combined. Include planned maintenance, warm-up time and a second burst if relevant. After estimating instance compute, add storage, network, service charges, deployment work and operational support. Peak capacity may need a reserve when a worker or zone fails. A fair comparison evaluates similar availability and recovery requirements in both models.
Predictable steady usage can make a commitment model worth evaluating. AWS offers several purchasing options with different flexibility and requirements. Work out the baseline and confidence in its duration before committing. Interruptible capacity such as Spot can fit workloads that can safely resume or handle interruption, but an exam results service needs an operating plan for its user-facing capacity during stress. Consult current docs and account policy before using a purchase model in a live plan.
Set recovery and location requirements before selecting a hosting model
A virtual server running in AWS is not automatically resilient against every failure. The college would still choose where the database and application run, what route users take, and how it recovers both configuration and data. A single instance in one Availability Zone can be sufficient for a short lab. A customer service with continuity requirements needs explicit choices about failure boundaries, capacity and recovery. Using multiple zones alone does not show that all dependencies will survive the failure you care about.
Agree on two separate objectives. Recovery time is how long the business can tolerate the service being unavailable between failure and restoration. Recovery point is how much recent data loss it can tolerate under its recovery plan. A booking app might tolerate a brief maintenance period but cannot easily re-create missing confirmed bookings. A results portal might rebuild the public page from an approved authoritative data source while keeping access logs for a separate operational reason. Identify which data is authoritative and test the actual restoration process. Restoring a server image will not necessarily restore both data and business service.
An on-premises cluster can spread work across physical hosts and use another facility for recovery if designed and funded that way. An AWS design can spread application targets across Availability Zones in a Region, and a separate policy may call for resources in another Region. Cross-region placement affects identity, data flows, recovery tests and costs. Choose where it is permitted to store and process the workload. Evaluate current service availability and measure latency from the user networks and dependencies involved. Distance and provider brand alone cannot settle a placement decision.
Include operations evidence in the design review. Start with the permitted student request and expected response. Test ordinary days, a peak release and a known failure using an approved nonproduction environment. Confirm that new web workers can register, and that an intended recovery step keeps the authorized application working. Label the services and operating responsibilities that remain on the college's team. A complete proposal gives the registrar an outcome and an owner for it rather than only a bill of materials.
Choose between managing servers, deploying to a platform and using a finished service
Infrastructure as a service gives the team infrastructure building blocks such as compute, volumes and networks. On EC2 the customer can choose the operating system image and manage the guest software. That can help when the college needs a legacy runtime, a specialized system package or network controls tied to a particular deployment design. The flexibility brings decision points about updates, access, recovery and operations that still need owners.
A platform service manages parts of deployment and operations. AWS Elastic Beanstalk, for instance, can deploy application code and handle infrastructure tasks such as capacity provisioning, load balancing and application health monitoring for supported environments. The team provides a compatible application, configures its environment and retains responsibility for how users, data and permissions are handled. Beanstalk can deploy AWS resources such as EC2 instances on the application's behalf. Reading the platform documentation helps you see which choices remain visible and which resources contribute charges.
A software-as-a-service model provides a completed application. If the college chooses an approved managed academic records product, its users configure their workflow under that product's capabilities. The provider runs its application stack. The college still chooses accounts, permissions, data import and retention under the applicable agreement. Consider whether the product's workflow meets the registrar's requirements before delivering a new cloud application that the college has to operate itself.
Decide one requirement at a time. The college wants to preserve a locally connected lab instrument. One team needs a specific package and custom background process for the old portal. A separate team only needs an approved records export. Those needs can produce different answers in the same organization. “Move everything” is too wide to evaluate. Write which runtime, data path and control must be supported, then compare the cost of managing it in each model.
There is also a hybrid decision. The authoritative student system can stay where it is approved while another component runs in AWS. That creates a private or otherwise secured connection with latency, bandwidth, dependency and data policy requirements. A remote web application that reads a slow on-premises database for every click may become sensitive to that connection. Prototype the actual transactions and failure path before claiming the clouds or networks will accelerate them.
Test a capacity plan for baseline, peak and worker failure
This model uses Python 3 or a spreadsheet. There is no load test against a website and no cloud resource to create. Suppose a worker handles 25 completed requests per second at the agreed response goal in a representative training measurement. The portal expects 28 requests per second on a normal day and 140 in the release period. The initial shared data-system limit is 160 modeled requests per second. Treat these numbers as worksheet assumptions, and write down the maximum we expect to serve before running the script.
python3 - <<'PY'
worker_rate = 25
data_limit = 160
examples = [
("normal", 2, 28),
("release, all six", 6, 140),
("release, one of six unavailable", 5, 140),
("release, one of seven unavailable", 6, 140),
("ten workers and more demand", 10, 200),
]
for label, ready_workers, demand in examples:
web_limit = ready_workers * worker_rate
service_limit = min(web_limit, data_limit)
margin = service_limit - demand
print(f"{label}: capability {service_limit}, margin {margin:+}")
PY
Expected margins are +22, +10, −15, +10 and −40 in that order. A positive modeled margin is capacity remaining under the assumptions. A negative value identifies a shortfall. The fifth row demonstrates a shared bottleneck: ten workers could handle 250 in isolation, but a 160 limit on their shared dependency leaves the overall capability at 160 in this model. Capacity can be improved by examining both tiers and the operation each request performs.
Now write a timeline. Extra workers take five minutes to boot and become eligible under the training plan. The results release is scheduled for 10:00. Choose a time to begin provisioning that leaves room for this known delay and verification. An application takes longer to get ready if it has to retrieve a large dependency set or process a bootstrap failure. Verify actual readiness in a safe environment. Do not substitute an assumed five-minute time for measured service startup.
Change data_limit to 130 and predict what happens in the second and fourth rows before rerunning. The margin becomes −10 for each, even when six workers are ready, because the data tier is the tighter limit. A successful answer identifies the limiting tier and writes which benchmark would validate it. Test performance using synthetic or authorized data in an environment designed for the exercise. Never create production traffic for a worksheet. There are no cloud resources or local files to clean up in this calculator.
Estimate worker-hours and write down the charges the model omits
Use a worksheet rather than opening a billable resource. Assume two baseline workers run 720 hours each in a 30-day month, four additional workers run for eight hours each, and a separate testing team uses one worker for 20 hours. Treat the example rate as one imaginary cost unit per worker-hour under the same type and platform assumption. Start your estimate with hours so you can apply real Region and instance prices later without confusing units.
python3 - <<'PY'
baseline = 2 * 720
peak = 4 * 8
testing = 1 * 20
total = baseline + peak + testing
print("baseline worker-hours:", baseline)
print("peak worker-hours:", peak)
print("testing worker-hours:", testing)
print("total worker-hours:", total)
print("six steady plus testing:", 6 * 720 + testing)
PY
Expect 1,440 baseline worker-hours, 32 extra peak worker-hours and 20 test worker-hours, totaling 1,492. Keeping six workers all month and adding the same test usage would give 4,340 worker-hours. This model doesn't compare hardware purchase directly. To do that, agree on the same performance and recovery target and work out comparable facility or hosting, equipment, maintenance and staff expenses over a sensible period. Include any existing capacity both designs would legitimately reuse.
Next make two noncompute rows. One row lists durable storage for ordinary use and retained snapshots. A second row lists the actual network components and data paths, such as a frontend load balancer and a NAT gateway where appropriate. For each row decide what is billed for an allocation and what depends on transfer or requests. In a real plan, use the current service pricing and AWS Pricing Calculator under the organization's account process, and check account billing afterward. Use estimates as estimates and record which assumptions came from measurements.
Do not count on a uniform “free for one year” promise. AWS documents different Free Tier terms depending on account creation date and plan. Existing eligibility, offered credits, resource types and billing settings can all matter. Use the account's current billing view and program terms. Budget alerts can inform the owner about spending, but discuss billing and resource cleanup as their own steps. A learning exercise can use paper before putting any budget at risk.
Try a second case. Add a one-hour warm-up and one-hour drain period around the eight-hour peak for each extra worker. That changes the peak row to 40 worker-hours and the new total to 1,500. If your number changes by two instead of eight, you counted the period once for the whole group. This is a unit check, not a financial forecast. No instance or other resource exists after this offline exercise.
Diagnose the limiting resource before scaling the whole service
Return to Mauli Dairy's Diwali rush. The team notices that order confirmations are delayed. Someone proposes doubling the instance size. First ask where time is going. If CPU usage is consistently high in the part of the app that calculates prices, a larger instance or more eligible workers may help. If CPU remains low while requests wait on an external provider or lock in the database, a different component needs attention. The quickest route to a good choice is a measurement tied to the exact operation that got slower.
Inspect resource metrics, application timings and errors under an authorized test. CPU utilization gives a view of CPU use. Memory, disk and app timings may need platform instrumentation beyond an obvious default metric. Watch the database, network and downstream services as well as the instances. Compare a correct but slow operation with a failure. The difference helps determine whether the remedy is more capacity, a code change, a dependency limit or a change in how long the app waits.
One common readiness gap appears when a new instance runs but the app has not finished fetching configuration. An Auto Scaling group might show that the desired number of instances exists while fewer targets can serve requests at the expected rate. Compare launched, registered, healthy and actually serving. A useful check exercises a representative request. Build the results into the scale plan and add enough time to verify the new capacity before the busiest period.
If an approved scale action fails, note Region and zone, instance type, launch configuration, account quotas, permission errors and the service's reported reason. A capacity failure for a particular placement is a different response from an access denial. Adjust the authorized launch plan according to the observed cause. Follow the environment's rollback and cleanup process for any resources created in a separate test. For this lesson you can rehearse the decision without creating or modifying anything.
Compare the two hosting models using the same small pilot
Take one controlled student result lookup. Set up representative synthetic records with the same types and approximate sizes as the planned service. The test user signs in through the approved access method and views a result record assigned to that identity. Define a second check in which that same identity asks for a record it should not see. An infrastructure migration needs to preserve both outcomes. A faster response that exposes the wrong record would fail the basic service requirement.
Ask the institution to agree on a measurement window and what counts as usable. A team can compare response time at a specified percentile, request success rate, time for another worker to become ready and cost during the pilot window. A percentile summarizes a position in a measured distribution. For example, a 95th percentile response time of 400 milliseconds means about 95 percent of the measured responses completed at or below 400 milliseconds, under the measurement method used. It can reveal slower responses hidden by a modest average. Keep the workload shape and the dataset the same when comparing platforms.
Record deployment work as well as running performance. In the on-premises version, note existing cluster allocation, operating staff, firewall approval and availability of storage. In the EC2 version, note the selected image, instance family, subnet, approved identity and persistent storage. Record how each team obtains additional approved capacity. Say which conditions were not part of the pilot, such as a zone outage, a cold database or the full school population. Reserve the claim of actual peak support for measured, authorized evidence.
Plan a migration only after the trial demonstrates the required operation. Keep the authoritative records under the approved ownership and define how reads or writes shift to the new environment. If the pilot portal accepts writes, the team must know which system owns them and how to preserve changes if the old service becomes active again. A DNS change can send new users to another entry point. It cannot synchronize updated records. For an early trial use test data and a small intended audience.
At the end, give the registrar a short comparison: whether the two operations behaved as expected, what was measured, which environment can meet the release plan, and exactly who owns each open question. Review how to remove test resources subject to their separate lifecycle. Inspect paid components that may remain after closing the pilot. This keeps the architectural choice grounded in service evidence and lets the organization decide with realistic obligations.
Make a recommendation using stated criteria and working evidence
The college has a supported virtualized cluster with idle capacity and tightly coupled local hardware. Mauli has irregular batches and no comparable capacity already installed. Prepare two decisions using the same headings: workload, available headroom, time to supply capacity, critical dependencies and owner for updates. A successful answer can pick different models because the starting facts differ.
Redo the EC2 worker model with 175 peak requests and a planning condition that one worker can be unavailable. Keep 25 requests per worker and 160 for the shared dependency. Point out why the shared dependency must change or the target must change. Then calculate the ready and planned worker counts if that dependency can support the goal.
Draw the service location and recovery choices. Write one recovery-time requirement and one data-loss tolerance, then identify exactly what would be restored, what has to be rebuilt and which user operation verifies recovery. Label the staff responsible for each step in the owned-hardware and EC2 versions.
Create a monthly comparison with compute capacity, data storage, connectivity, operations and peak reserve on separate lines. Mark rows that use measured quantities and rows you are still estimating. Include what remains if the baseline instance stops. State how the owner would check the proposed scope and billing before deploying.
Interview questions and worked answers
Why might a variable demand profile favor elastic compute?
You can maintain a measured baseline and add temporary compute for a short demand increase. The work must be able to run on additional ready instances and shared dependencies must support the increase. Compare expected provisioning time and component costs at peak versus a fixed capacity plan.
Why might a college leave a workload on its existing hardware?
It may already have enough usable capacity and staffed operations. The workload may also depend closely on local equipment, connectivity or controls. Compare the incremental costs, service and recovery requirements, actual latency and the skills needed for both models.
Which responsibilities stay with an EC2 customer?
The customer configures account and workload access, maintains the EC2 guest and application, and handles its data responsibly. AWS operates its underlying cloud infrastructure. The exact division for other managed services depends on the service and chosen settings, so name the relevant task before assigning it.
Does a stopped training instance mean its cloud charges end?
Under typical On-Demand stop behavior the instance's running compute charge stops when the instance is stopped, while attached or retained resources can still generate charges. Inspect EBS volumes and snapshots, allocated public addresses, and any associated networking services. Each has its own lifecycle.
What is the difference between an available instance and a ready application?
Instance state tells you where the resource sits in its lifecycle. A usable application also needs to finish starting, receive its required settings, accept relevant connections and return useful responses. If a load balancer is involved, check target configuration and a representative permitted request.
Which resize should you do when traffic increases?
First identify the limiting resource and workload architecture. A larger instance can help a single process that needs more memory or CPU. Multiple targets can help a distributable request stream. Shared storage, databases and vendor calls can limit either pattern, so measure and test the intended transaction.
Check the capacity and ownership decisions
Two instances run for 720 hours each. What are their combined worker-hours? A. 720. B. 1,440. C. 2.
Show answer
B. One worker running for one hour is one worker-hour. Multiply the number of identical running workers by each worker's time. The calendar period is 720 hours. The worksheet measures aggregate compute time.
The app workers can serve 250 modeled requests per second, but their shared data system limits the operation to 160. What is the modeled service ceiling? A. 250. B. 410. C. 160.
Show answer
C. In this exercise the operation passes through both tiers, so the tighter capacity governs. Adding workers beyond that ceiling cannot raise the assumed data-system limit.
Who normally maintains installed software and patches the guest OS of the EC2 instance? A. The customer workload owner. B. AWS's hardware maintenance staff. C. The public internet provider.
Show answer
A. EC2 gives the customer a guest environment to manage. AWS operates the underlying cloud infrastructure. Different managed services can assign tasks differently. The configuration relevant to this question is EC2.
What should an estimated deployment include after EC2 compute hours? A. No other resources matter. B. EBS, snapshot, network, managed component and support costs as applicable. C. Only the customer's browser.
Show answer
B. Applied rates depend on each selected component and its usage or lifetime. A stopped server can leave relevant resources allocated. Scope the estimate to the whole deployment that provides the service.
What confirms that extra workers are ready for release traffic? A. The launch request returned an ID. B. The image appeared in a catalog. C. Targets are eligible and the intended operation succeeds under the approved test.
Show answer
C. The resource must boot, start the application, finish configuration and be eligible to serve. The tested operation then shows the result the user needs. An ID or image proves only an earlier step.
Revision cards
- Elastic demand
- Supply baseline and peak capacity on a schedule or tested policy. Include warm-up, state and shared dependencies.
- On-premises comparison
- Measure existing equipment, facility and support commitments alongside new capacity and business requirements.
- Shared responsibility
- AWS operates the cloud infrastructure. EC2 customers manage guest software, relevant access settings and their data.
- Compute plus dependencies
- Estimate worker-hours, then add storage, network, software and other billable resources as applicable.
- Readiness evidence
- A launched resource, healthy target and useful application response are different observations.
- Recovery plan
- Define restoration time and acceptable data loss. Verify the actual recovery of a permitted business operation.
References
- What Amazon EC2 provides
- AWS shared responsibility model
- Amazon EC2 On-Demand pricing
- EC2 purchasing options
- EC2 capacity reservations
- EC2 instance lifecycle and billing states
- Current AWS Free Tier account eligibility
- VPC networking and public IPv4 pricing
- Amazon EC2 Auto Scaling
- Application Load Balancer target checks
- EC2 status checks
- AWS Elastic Beanstalk service scope
- Well-Architected cost optimization guidance
- Well-Architected recovery planning
- CloudWatch metric concepts
Quick revision cards
Revise this lesson in two minutes. Save the cards on your phone or download them as PNG files. The QR code on each card opens its lesson.

More cards: Ravi Sir's Cards.