<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Sagar Soni]]></title><description><![CDATA[Hi, I’m Sagar Soni, an engineer from India.
This is my tiny corner of the internet where I write whatever I feel like.
No AI, no grammar checks. Just raw though]]></description><link>https://sagarsoni.dev</link><generator>RSS for Node</generator><lastBuildDate>Fri, 17 Apr 2026 09:35:43 GMT</lastBuildDate><atom:link href="https://sagarsoni.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Chapter in Life: CollegeAdviser]]></title><description><![CDATA[Why I started CollegeAdviser
For a long time, I believed something without questioning it. I believed that everyone knows what they want to become in life. Doctor. Engineer. Lawyer. CA. It felt obvious. People around me talked about these careers all...]]></description><link>https://sagarsoni.dev/collegeadviser</link><guid isPermaLink="true">https://sagarsoni.dev/collegeadviser</guid><dc:creator><![CDATA[Sagar Soni]]></dc:creator><pubDate>Mon, 26 Jan 2026 21:27:23 GMT</pubDate><content:encoded><![CDATA[<h2 id="heading-why-i-started-collegeadviser">Why I started CollegeAdviser</h2>
<p>For a long time, I believed something without questioning it. I believed that everyone knows what they want to become in life. Doctor. Engineer. Lawyer. CA. It felt obvious. People around me talked about these careers all the time. If I had some idea in my head, surely others did too. I never stopped to think where those ideas came from.</p>
<p>Until Class 10, life is fairly linear. Study well, score well, move to the next class. Board exams were the big event. Everyone prepares for the same finish line.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769454279040/9db6cd7a-ff74-4167-9069-78c35f85f4ac.jpeg" alt class="image--center mx-auto" /></p>
<p>But Class 11 changes you. For the first time, you’re asked to choose a stream, and that choice starts deciding the direction of your life. Science (or as tier 3 city people call “Medical”) narrows you toward becoming a doctor. Non-Medical Science nudges you toward engineering. Commerce to CA and Arts comes with its own stereotypes. Career transitions exist, of course, but in a country like India, they’re still exceptions, not the rule.</p>
<p><strong>Such a big decision of life - at the age of just 16!</strong></p>
<p>Was the education system designed this way? Not really.<br />This is the outcome of history, culture, and most importantly, privilege.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769454688892/7e459973-d264-4431-a457-b53f820f2daf.jpeg" alt class="image--center mx-auto" /></p>
<p>I grew up in Sirsa, a tier-3 city in Haryana and the state’s largest district, with over 300 villages. I lived in the city and went to a school that had a healthy mix of students from the main town and nearby villages.</p>
<p>Over time, a pattern became obvious.</p>
<p>Most of my friends from the city had already “decided” what they wanted to become. Engineer. Doctor. Something familiar. For many of my friends from villages, that clarity didn’t exist. Their primary goal wasn’t a specific profession, it was stability. A government job. Financial security. Moving their family out of BPL!</p>
<p>The difference wasn’t intelligence or ambition. <strong>It was exposure.</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769454824862/6b43d5a2-8fca-4819-a1e9-6d460225d1e1.jpeg" alt class="image--center mx-auto" /></p>
<p>I remember one particular incident clearly. A friend’s cousin from Mumbai used to visit occasionally. We’d all play together on the street, and he’d introduce us to new games that were popular in big cities. One day, he casually mentioned that he wanted to become a professional wildlife photographer.</p>
<p>It caught me completely off guard!</p>
<p>To me, photography was a hobby, not a career! That conversation planted a seed I didn’t fully understand at the time: <strong>what we aspire to become is often limited by what we’ve <em>seen</em> is possible. Exposure shapes ambition. Privilege determines risk appetite.</strong></p>
<p>That’s when it became clear to me that not everyone knows what they want to become. And even those who think they do might just be operating within a very narrow window.</p>
<p>I wasn’t immune to this either.</p>
<p>Until Class 10, I was certain I wanted to become a software engineer and study Physics and Chemistry. Later, when I was exposed to Commerce, things shifted. <strong>I wanted to be a software engineer <em>and</em> a Chartered Accountant.</strong> I planned to become an engineer first, then a CA.</p>
<p>In hindsight, that confusion was the most honest phase of my thinking.</p>
<p>The core problem was simple:<br /><strong><em>Less exposure leads to a higher chance of picking the wrong career.</em></strong></p>
<p>The solution, however, was anything but clear.</p>
<p>How do you give exposure to students in villages and small towns? Who tells them that careers don’t end at engineering and medicine? I didn’t have an answer.</p>
<p>Life moved on.</p>
<p>Year 2016 - when it came time to choose my own college for computer science, I found myself stuck between options like BTech and BCA, and an even harder question: <strong><em>which college actually matters?</em></strong></p>
<p>I did what felt natural to me at the time. I cold-messaged software engineers from Google, Microsoft, Netflix, anyone I could find on LinkedIn or Facebook who looked remotely approachable. Surprisingly, many replied.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769456415605/1d76c297-9c86-4a1b-8c9d-62699636a50a.png" alt class="image--center mx-auto" /></p>
<p>I got the advised I needed.</p>
<p>If you want to work as a software engineer in a good product company, focus on data structures, algorithms, and competitive programming. Tier-1 and Tier-1.5 colleges help because of placements, but beyond that, most colleges are more or less the same.</p>
<p>If you’re getting CSE at IITs, NITs, or places like BITS Pilani, take them.<br />Otherwise, choose a college that’s accessible, affordable, has decent faculty, good infrastructure, and gives you time and freedom to learn on your own.</p>
<p>I chose VIPS Delhi. It checked all my boxes: relevant curriculum, location in a tier-1 city, solid infrastructure, technical communities, good teachers, and enough breathing room to prepare on my own.</p>
<p>As I went deeper into research and conversations, another realization hit me.</p>
<p>For students genuinely interested in computer science but not getting IITs or NITs, there were several excellent colleges like Shiv Nadar University, Ashoka University, LNMIIT, Jaypee Institute <strong>that simply weren’t popular in small cities.</strong></p>
<p>Instead, many students with decent ranks ended up choosing heavily marketed private universities with high fees, poor faculty, strict rules, low exposure, and campuses far from cities.</p>
<p>The question that bothered me was simple:<br /><strong>Why did I have to spend nights researching and messaging strangers on LinkedIn to learn this? Who was doing this work for everyone else?</strong></p>
<p><strong><em>That question became the beginning of CollegeAdviser.</em></strong></p>
<p>Around that time, Quora was popular. Students asked endless questions about careers and colleges. I started answering them, <strong>sometimes obsessively</strong>. At first, it was just something I did during breaks. Slowly, more people started responding. Some thanked me and a few messaged me privately.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769456892225/544f2425-87cc-4679-9b64-068c2153e789.png" alt class="image--center mx-auto" /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769456973068/bdaf744d-b0e8-45d9-be68-31eca67583ac.png" alt class="image--center mx-auto" /></p>
<p>It felt good. In a quiet way. Like maybe I was useful. But it was also tiring. Same questions. Same confusion. Repeated.</p>
<p>I wanted something more structured. I wanted something that could stay.</p>
<p><strong>That’s how CollegeAdviser was born:</strong> a platform to genuinely help students discover good colleges they might otherwise ignore.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769457119275/11babc5e-ad46-4988-a4a5-8905c3d74907.jpeg" alt class="image--center mx-auto" /></p>
<p>I started with computer science aspirants, the problem I knew best. The idea was to replicate the same model for other streams later. We never planned to expand into Master’s degrees or Study Abroad, but that’s how things unfolded.</p>
<h2 id="heading-scaling-it">Scaling it</h2>
<p>In the early days, I did everything myself. I answered messages. I researched colleges. I wrote content. I fixed website issues. I put my phone number on the homepage without thinking too much about it.</p>
<p>Things were little slow in 2017 but in 2018, we were getting like at least 2 student queries per minute, mostly from after noon to late evening. At peak, we were getting more than 2000 per day!</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769459422106/f3f3989b-8a50-4fdc-8ac9-ea27c1e766f4.png" alt class="image--center mx-auto" /></p>
<p>This did not stop here. People started calling directly on my personal phone number. Students. Parents. Sometimes parents who sounded more anxious than their children. I tried to help everyone. I moved to WhatsApp to control it, but that did not really help.</p>
<p>Every night before sleeping, I went through messages. I told myself I would reply to just a few. I almost always replied to all. Sleep slowly became shorter. I remember waking up tired and still doing the same thing again at night.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769457185570/a9b52342-c72c-4a13-9376-2a7d587a7ce0.jpeg" alt class="image--center mx-auto" /></p>
<p>When I finally removed my number from the website, I felt guilty. It felt like I was abandoning people. But I also felt relief. I did not admit that part to anyone.</p>
<h2 id="heading-co-founder-issues">Co-founder issues</h2>
<p>A few of my close friends joined and started helping me. It felt lighter to not be alone. It felt good to share responsibility.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769458233317/28f07eb3-20b2-4e4f-b253-0559ec0f504c.jpeg" alt class="image--center mx-auto" /></p>
<p>But over time, conversations started feeling heavy. They talked about features, growth, rankings. I kept talking about intent and responsibility. We were using the same words but meaning different things. I remember sitting in meetings where I nodded, even though something inside me was uncomfortable. I did not want conflict. I wanted alignment.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769459497605/d71ca31f-4d5e-47b9-b759-46db026b84e1.png" alt class="image--center mx-auto" /></p>
<p>Eventually, I realised that wanting different things does not make anyone wrong. But it does make working together painful.</p>
<p>I started alone and, in many ways, ended alone.</p>
<p>I learned, the hard way, the truth behind Sam Altman’s quote:<br /><em>“It’s better to have no co-founder than a bad co-founder - but it’s still bad to be a solo founder.”</em></p>
<h2 id="heading-execution-limitations">Execution limitations</h2>
<p>CollegeAdviser was very content heavy. I took learnings from my past experience at DU Express and decided to work with students. I printed posters, visited DU North Campus colleges, shared hiring forms everywhere.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769460059615/57f240ae-1bcd-46eb-8b18-3e305df14d0b.png" alt class="image--center mx-auto" /></p>
<p>^ Original print. Later we started paid internships as well.</p>
<p>Soon, we had a team of 18 content writers and 2 editors. Articles carried the writers’ names. They shared their work proudly. Slack wasn’t popular at that time and we did everything over WhatsApp and GMail. That WhatsApp group was the most active group on my phone at that time. Ringing all day.</p>
<p>We printed CollegeAdviser T-shirts. Went to college fests together. Hosted meetups - first at Panditji’s Canteen, later at Kamla Nagar Starbucks when revenue jumped. Many of those students are still in touch today, doing well in their own lives. ❤️</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769497839604/aca675de-7677-40a3-bf67-c19fa2430fd2.jpeg" alt class="image--center mx-auto" /></p>
<p>^ year 2018</p>
<h2 id="heading-our-limitations">Our limitations</h2>
<p>As traffic grew, colleges approached us to manipulate rankings. We refused. Eventually, we agreed to sponsored listings, with strict rules and my personal oversight. <strong>I rejected more deals than I accepted.</strong></p>
<p>I only approved colleges which I thought were genuinely good for the students.</p>
<p>We also sold ad slots to brands like YourSpace, StanzaLiving, CoHo, etc. and signed them for deals year around.</p>
<p>Revenue was all time high.</p>
<p>But there was a structural flaw.</p>
<p><strong>We were relevant only during admission season (March to August).</strong></p>
<p><strong>Once students got into college, we lost relevance.</strong> We tried expanding into Study Abroad, but the market was dominated by offline consultants with conflicted incentives and Shikha dot com left no online TAM for us. We couldn’t find a clean, honest entry point.</p>
<p>September came, and I still did not know. I noticed the change slowly. I stopped feeling kick in the morning. I started delaying opening my laptop. This did not feel good.</p>
<h2 id="heading-killing-the-dream">Killing the dream</h2>
<p>I was friend with one of the senior leaders of our competitors and requested a 1:1. I admitted our business was only seasonal and I had no motivation left to explore more avenues. I did not expect what came next. They offered to buy the business xD</p>
<p>More than the tech IP, they were interested in the database we built over the years. Using our data, they could target students about to enter college, students seeking own accommodations (across India), students seeking internships and students about to graduate.</p>
<p>We discussed it. Thought about it. And finally went ahead. It wasn’t life-changing deal, but it <strong>gave me freedom</strong>. And more importantly, <strong>it gave closure.</strong></p>
<p>CollegeAdviser ended, but it taught me more than any degree ever could - about exposure, ambition, systems, people, and myself.</p>
<p>Some chapters are meant to end. This was one of them.</p>
]]></content:encoded></item><item><title><![CDATA[Why I chose BCA over BTech]]></title><description><![CDATA[Since my childhood, I have been interested in tech — not just computers, but also solving the problems of everyone around me. I always dreamt of becoming a software engineer at Microsoft, designing and building the next version of Windows.
I wasn’t a...]]></description><link>https://sagarsoni.dev/why-i-chose-bca-over-btech</link><guid isPermaLink="true">https://sagarsoni.dev/why-i-chose-bca-over-btech</guid><dc:creator><![CDATA[Sagar Soni]]></dc:creator><pubDate>Fri, 09 Jan 2026 23:50:15 GMT</pubDate><content:encoded><![CDATA[<p>Since my childhood, I have been interested in tech — not just computers, but also solving the problems of everyone around me. I always dreamt of becoming a software engineer at Microsoft, designing and building the next version of Windows.</p>
<p>I wasn’t a topper at school, but I was always in the top 10. Becoming an engineer slowly became the default career path for me.<br />Up until Class 4, my dad was very strict with my studies. Every day from 6pm to 9pm was a focus session for all five of us in the family. We used to sit in the porch area of our home. My parents did their office work, and me and my two sisters did our homework. It became our daily routine.</p>
<p>My dad used to check all our homework, teach us whatever we needed (Maths and Science were his favourites), and even take oral and written tests. Only after finishing my homework was I allowed to go out and play.</p>
<p>Things changed after Class 4. My sisters went to college and no longer needed dad’s help. Somehow, this gave me some relaxation too. My dad stopped pushing me and just used to say:</p>
<blockquote>
<p>“If you want to be a computer science engineer, study.<br />If you want to become a garbage collector, that’s also your choice.<br />We’ll still be fine.”</p>
</blockquote>
<p>This line was enough to keep me working for at least a month 😄</p>
<p>During exams, my dad would say,<br />“I trust you. I know you must have studied hard.”<br />And my mom always said,<br />“Don’t take tension. It’s just an exam. Do your best.”</p>
<p>Even when I didn’t perform well, they said,<br />“It’s okay. Do better next time.”</p>
<p>Zero pressure in life.</p>
<hr />
<h3 id="heading-choosing-the-stream">Choosing the stream</h3>
<p>After Class 10, even before the results came out, we had to choose a stream for Class 11.</p>
<ul>
<li><p>Medical Science – Physics, Chemistry, Biology</p>
</li>
<li><p>Non-Medical Science – Physics, Chemistry, Maths</p>
</li>
<li><p>Commerce – I didn’t even know what was in it</p>
</li>
<li><p>Arts – Never explored</p>
</li>
</ul>
<p>The choices were simple:</p>
<p>Doctors → Medical<br />Engineers → Non-Medical<br />CA → Commerce<br />Arts → “No one takes this”</p>
<p>Since everyone had always seen me as a future software engineer, Non-Medical was my default choice. I didn’t even look at the other streams.</p>
<p>CBSE offered Computer Science as an elective, so I went to my class in-charge and requested it. She rudely replied:</p>
<blockquote>
<p>“We only have Music and Physical Education.”</p>
</blockquote>
<p>That broke my heart.</p>
<p>I went straight to the Principal (Mr. Rajiv Utreja). He said there weren’t enough students for Computer Science.</p>
<p>I told him,<br />“Students don’t even know CBSE offers Computer Science because the school blocks it.”</p>
<p>He said,<br />“Get me 30 students and I’ll allow it.”</p>
<p>He handed me an A4 sheet and asked me to collect signatures.<br />I felt he was just trying to scare me off.</p>
<p>Little did he know, it was damn easy for me.</p>
<p>A lot of students wanted to become software engineers. Everyone signed.</p>
<p>Next day, I went back to him. He looked surprised and said:</p>
<blockquote>
<p>“We don’t have teachers for Class 11 and 12 Computer Science.”</p>
</blockquote>
<p>I felt cheated.<br /><em>WTF, you broke your promise.</em></p>
<p>I even went to my Computer Teacher (Mr. Mukesh Babbar) and requested him to teach us. But due to school rules and qualifications, it wasn’t possible.</p>
<p>So Non-Medical came with three costs:</p>
<ol>
<li><p>Some of my good friends went to Commerce</p>
</li>
<li><p>I had to give up Biology</p>
</li>
<li><p>No Computer Science — had to take Music</p>
</li>
</ol>
<hr />
<h3 id="heading-jee-dream-phase">JEE dream phase</h3>
<p>Life moved on. The new target became:</p>
<p><strong>Crack JEE Advanced → Get CSE at IIT Bombay</strong></p>
<p>I joined a local coaching institute.<br />The first 3 months were amazing.</p>
<p>Atoms, Bonds, Kinematics, Sets, Complex Numbers — I loved everything.<br />I solved all DPPs, sat on the first bench, and raised my hand for every question.</p>
<p>One day, my Chemistry teacher called me after class and suggested I move to Kota.<br />He even offered to convince my dad.</p>
<p>Soon, Class 10 results came.<br />9.2+ CGPA. A few 10s.</p>
<p>Confidence went sky-high.</p>
<p>Me and my friend cleared multiple Kota institute entrance tests.</p>
<hr />
<h3 id="heading-discovery-of-commerce">Discovery of Commerce</h3>
<p>After results, some friends organized a small party.<br />Friends from all streams were there.</p>
<p>I asked a Commerce friend what they were studying:</p>
<p>Accounting<br />Journals<br />Ledgers<br />Reconciliations<br />Economics</p>
<p>They even started explaining debit/credit on a notebook.</p>
<p>I was like:<br /><strong>WTF. This is so interesting.</strong></p>
<p>I went home, Googled everything about Commerce and loved it.</p>
<p>Now the cost of Non-Medical felt bigger:</p>
<ul>
<li><p>Friends in different classes</p>
</li>
<li><p>No Biology</p>
</li>
<li><p>No Commerce</p>
</li>
</ul>
<p>I wished I could study <strong>Physics, Chem, Maths, Accounts, Business, Economics</strong><br />and skip useless subjects like Music and Hindi.</p>
<p>I tried switching to Commerce, but CBSE registration was already done.</p>
<p>So I stayed in Science.</p>
<hr />
<h3 id="heading-kota-phase">Kota phase</h3>
<p>We went to Kota for trial classes (told our parents we were going to Chandigarh 😅).<br />After 2 days, I felt completely distracted by Commerce thoughts.</p>
<p>I came back.</p>
<p>My performance in coaching dropped.<br />Instead of studying, I started building websites.</p>
<p>I redesigned websites of Kota coaching institutes for fun and even sent them links.</p>
<p>One institute offered me <strong>₹20,000</strong> for a website.<br />I accepted.</p>
<p>My Chemistry teacher warned me again.<br />So I stopped and focused on studies.</p>
<p>Still, PCM felt boring.</p>
<hr />
<h3 id="heading-plancess-disaster">Plancess disaster</h3>
<p>I bought a <strong>₹15k–₹20k</strong> JEE video course by AIR 1–100 rankers.</p>
<p>Big mistake.</p>
<p>They were great at solving questions but terrible at teaching.</p>
<p>That’s when I learnt:</p>
<p><strong>Being good at something doesn’t mean you can teach it.</strong></p>
<p>No refund.<br />Dad said: “Forget it and move on.”</p>
<p>More about this incident: <a target="_blank" href="https://qr.ae/p2Htmb">https://qr.ae/p2Htmb</a></p>
<p>At this point, IIT hype was gone for me.</p>
<hr />
<h3 id="heading-discovering-bca">Discovering BCA</h3>
<p>Then I looked at <strong>BCA</strong>.</p>
<p>BCA had:</p>
<ul>
<li><p>Computer Science</p>
</li>
<li><p>Accounting</p>
</li>
<li><p>Business</p>
</li>
<li><p>Economics</p>
</li>
<li><p>3 years instead of 4</p>
</li>
</ul>
<p>It felt like the perfect mix.</p>
<p>I researched on LinkedIn and found successful BCA people.</p>
<p>But reality:</p>
<ul>
<li><p>BCA is less respected</p>
</li>
<li><p>Not called “engineers”</p>
</li>
<li><p>Fewer good colleges</p>
</li>
<li><p>Lower starting salary</p>
</li>
<li><p>Harder to reach product companies</p>
</li>
</ul>
<p>Still…<br />My heart wanted BCA.</p>
<p>I chose <strong>learning over perception</strong>.</p>
<p>My family wasn’t happy, but my dad supported me.</p>
<p>I stopped JEE prep in Class 11.</p>
<hr />
<h3 id="heading-final-thoughts">Final thoughts</h3>
<p>Choosing BCA was the best decision of my life.</p>
<p>I studied what I actually loved.</p>
<p>If you ever have to choose between courses, pick the one you’ll <strong>enjoy studying</strong>.</p>
<p>Your success depends on <strong>your actions</strong>, not your degree.</p>
<p>No matter what you choose —<br />You’ll do great.<br />Just believe in yourself. ❤️</p>
]]></content:encoded></item><item><title><![CDATA[Creating your first AWS EC2 Instance]]></title><description><![CDATA[EC2 is an Infrastructure as a Service (IaaS) offering from AWS that provides compute capacity in the AWS cloud. Think of it like renting a virtual computer on the Internet to run our apps.
Login or Sign up here to get started.
Setting up an EC2 insta...]]></description><link>https://sagarsoni.dev/creating-your-first-aws-ec2-instance</link><guid isPermaLink="true">https://sagarsoni.dev/creating-your-first-aws-ec2-instance</guid><category><![CDATA[Devops]]></category><category><![CDATA[AWS]]></category><dc:creator><![CDATA[Sagar Soni]]></dc:creator><pubDate>Fri, 20 Nov 2020 19:06:03 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/BrunIOLQMfQ/upload/1d29d2f94b4701e16060815ef518a393.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>EC2 is an Infrastructure as a Service (IaaS) offering from AWS that provides compute capacity in the AWS cloud. Think of it like renting a virtual computer on the Internet to run our apps.</p>
<p>Login or Sign up <a target="_blank" href="https://console.aws.amazon.com/console/home"><strong>here</strong></a> to get started.</p>
<h2 id="heading-setting-up-an-ec2-instance"><strong>Setting up an EC2 instance</strong></h2>
<p>When you create a new AWS account and verify the payment method, you get a free limited trial of some of the AWS products for a year. EC2 is one such product.</p>
<p>From the top-right menu, choose the region where you want to create your Instance. Put simply, you'll be renting a computer that would be physically located in this region. If you're unsure about the region, choose the one closest to you or your target audience.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1677138178121/44e89406-934b-4d05-a32d-7972f601ffb0.png" alt class="image--center mx-auto" /></p>
<p>In the same header, click Services and choose "EC2" under "Compute".</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1677138231870/14af3cf3-da85-4a6e-8eb2-3c0ad3c96b83.png" alt class="image--center mx-auto" /></p>
<p>From the left sidebar, choose Instances.<br />This is the place where all of your future instances will be listed. To create your first instance, click the Launch button.</p>
<p>This would start a wizard. There are a total of seven steps.</p>
<p><strong>Choose an Amazon Machine Image (AMI)</strong> - Let's choose the operating system or a "template" we want to set up on our instance.<br />For this example, we'll be using Ubuntu 20.04.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1677138253665/744c60a5-890b-4763-abb6-1094a239e675.png" alt class="image--center mx-auto" /></p>
<p>Choose the AMI you wish to set up on your EC2 Instance</p>
<p>The next step is <strong>Choosing an Instance Type</strong>.</p>
<p>Think of it like choosing the specifications for your new virtual computer. Pick the one matching your requirements.<br />One of the configurations eligible for the free tier is T2.Micro.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1677138302032/25e19152-6e94-48dd-b10c-f4aaaf1c712c.png" alt class="image--center mx-auto" /></p>
<p>The next step is <strong>Configuring the Instance Details</strong>.</p>
<p>Here you can configure advanced options available for your instance like CPU Cores, Threads, Network, Shutdown behavior, Monitoring**,** etc.</p>
<p>You might want to leave these settings to the default values.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1677138329745/db252034-03f2-4560-a3be-c0394932ed32.png" alt class="image--center mx-auto" /></p>
<p>The next step is <strong>Adding Storage</strong> to our Instance.</p>
<p>AWS offers different types of Storage for different purposes like IOPS volumes, which are used for critical I/O operations like in transactional databases, and Magnetic Spinning Drives, which are required when we need a lot of storage space.</p>
<p>For our example, we'll choose a single general-purpose SSD volume.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1677138382128/3f80762d-9396-4f97-b86e-436ac22f64d8.png" alt class="image--center mx-auto" /></p>
<p>The next step is <strong>Adding Tags.</strong> A tag is a label that we or AWS assigns to an AWS resource. We can use tags to organize our resources and cost allocation tags to track our AWS costs on a detailed level. This step is optional.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1677138401222/1aa9284d-0a79-4caa-b950-969148113301.png" alt class="image--center mx-auto" /></p>
<p>The next step is <strong>Configuring the Security Group</strong>. A security group is a set of firewall rules that control the network traffic for our instance.</p>
<p>By default, a TCP on Port 22 is open to enable SSH access. We would need this to connect our PC to that remote instance we're about to launch.</p>
<p>If you're planning to host a website in this instance, you might want to add a rule for HTTP and HTTPS here. In the Source, select "Anywhere".</p>
<p>Similarly, if you're planning to create an email server in this instance, you might have to open ports for it. <a target="_blank" href="https://www.hostgator.com/help/article/commonly-used-port-numbers"><strong>Here</strong></a> is a list of the most commonly used port numbers.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1677138428193/8627927d-463e-4102-be7b-bf58607d98fb.png" alt class="image--center mx-auto" /></p>
<p>Next, click the Launch button. A prompt to set up key pair would appear.</p>
<p>Choose "Create a new key pair" and give it a name.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1677138447858/61c3d533-d32a-4905-8b7c-31f1a5e558fc.png" alt class="image--center mx-auto" /></p>
<p>Click "Download Key Pair". A prompt to save a private key file would appear. Save it to a safe location. This key will be later used to access this instance from your PC.</p>
<p>Next, click Launch Instance. A launch status screen would appear. It would take a minute or two to launch.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1677138462534/2bef78d8-2b6c-4980-8788-ebc94d67fa66.png" alt class="image--center mx-auto" /></p>
<p>Click on the generated instance id. It would take you back to the list of instances. You would see your new instance here.</p>
<p>You have now successfully created a new EC2 instance. 😄</p>
<p>It should have been allocated a dynamic IP address from the AWS pool. Since this IP address is regenerated after every few hours, if you're planning to regularly access this instance outside AWS, for example hosting databases, apps and websites, you might require a static IP address.</p>
<h2 id="heading-getting-a-static-ip-address-for-our-instance"><strong>Getting a static IP address for our instance</strong></h2>
<p>In your EC2 dashboard, click "<strong>Elastic IPs"</strong> on the main screen or choose from the sidebar.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1677138481137/e87a5599-ffc2-40ad-91f3-1d393a62ac8a.png" alt class="image--center mx-auto" /></p>
<p>Select "Elastic IPs"</p>
<p>Click the button "Allocate Elastic IP Address". From the settings, choose "Amazon's pool of IPv4 addresses".</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1677138507420/0c49d2f3-ede7-4520-b882-44c9d3400052.png" alt class="image--center mx-auto" /></p>
<p>Click "Allocate".</p>
<p>You'll see a new IP address added to the list.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1677139455908/5d6c4881-9c4a-41c7-b95d-3a3c99b1703f.png" alt class="image--center mx-auto" /></p>
<p>Click that IP address to open up its configuration. Then click Allocate Elastic IP Address button.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1677139483540/2fc8c62d-6039-44ae-a5ee-e85b47893e26.png" alt class="image--center mx-auto" /></p>
<p>Under Resource Type, choose Instance. Under Instance, select the name or id of the instance we recently created and then click Associate.</p>
<p>Now you have successfully attached a new static IP to your instance. You can verify this by viewing instance details.</p>
<h2 id="heading-connecting-your-local-pc-to-a-remote-ec2-instance-using-ssh"><strong>Connecting your local PC to a remote EC2 instance using SSH</strong></h2>
<p>Remember that we left port 22 open in our instance's security group? Well, this was the reason. We'll be using that port to connect via SSH.</p>
<p>If you're using a Windows machine, you'll have to use a third-party telnet client, <a target="_blank" href="https://www.putty.org/"><strong>PuTTY</strong></a>.</p>
<p>If you're using Linux or Mac, here are the steps:</p>
<p>Open up the terminal and navigate to the directory where we stored the downloaded private key.</p>
<p>Change its file permissions to 400</p>
<pre><code class="lang-bash">chmod 400 your-key.pem
</code></pre>
<p>Establish SSH Connection</p>
<pre><code class="lang-bash">ssh -i your-key.pem username@ip-address
</code></pre>
<p>Here, the username would be determined by the AMI we installed on our instance in the first step. For example, Ubuntu generally has the username "ubuntu".<br />Also, replace the "IP-address" with the one we generated and attached to our instance.</p>
<p>For example</p>
<pre><code class="lang-bash">ssh -i your-key.pem ubuntu@52.15.229.142
</code></pre>
<p>You might get a warning about saving the key fingerprint. Continue connecting by entering "yes".</p>
<p>You should have now successfully established an SSH connection.</p>
<p>To execute a command as a superuser (root) use the prefix "sudo".</p>
<p>For example, "sudo mv file.txt new-file.txt"</p>
<p>To switch the user to root, use the command</p>
<pre><code class="lang-bash">sudo -i
</code></pre>
<p>I hope everything went smoothly for you. If you have any queries, let me know in the comment section below.</p>
]]></content:encoded></item></channel></rss>