<?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" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Yuhao Cooper on Medium]]></title>
        <description><![CDATA[Stories by Yuhao Cooper on Medium]]></description>
        <link>https://medium.com/@yuhaocooper?source=rss-299d31f07e87------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*MQmCSysO-zyJVHjHP7TyUQ.jpeg</url>
            <title>Stories by Yuhao Cooper on Medium</title>
            <link>https://medium.com/@yuhaocooper?source=rss-299d31f07e87------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 00:07:18 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@yuhaocooper/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Pick a niche to succeed in]]></title>
            <link>https://medium.com/@yuhaocooper/pick-a-niche-to-succeed-in-bad3dfd902fa?source=rss-299d31f07e87------2</link>
            <guid isPermaLink="false">https://medium.com/p/bad3dfd902fa</guid>
            <category><![CDATA[self]]></category>
            <dc:creator><![CDATA[Yuhao Cooper]]></dc:creator>
            <pubDate>Sun, 23 Apr 2023 12:59:41 GMT</pubDate>
            <atom:updated>2023-04-23T12:59:41.181Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>“You Can Do Anything, But Not Everything.” — David Allen</blockquote><p>This is an article to myself.</p><p>Pick a niche to succeed in.</p><p>Don’t settle for mediocrity and acceptable results in a field and use that as an excuse to pursue other interests or fields. You’ll only end up in a constant cycle of unsatisfied pursuits.</p><p>Pick something you deem to be valuable, set lofty goals, and never settle till you achieve it.</p><p>When you’re invested in being the best, you’ll start paying attention to the details that helps to separate the best from mediocrity, and you will be interested instead of bored by these details.</p><p>And through these discovery and journey, you’ll have valuable stories and results that can be shared with the world, and the world will only want more from you.</p><p>Then you’ll own the market.</p><p>Let’s go.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bad3dfd902fa" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Be results-driven]]></title>
            <link>https://medium.com/@yuhaocooper/be-results-driven-3a49e1fe2bc1?source=rss-299d31f07e87------2</link>
            <guid isPermaLink="false">https://medium.com/p/3a49e1fe2bc1</guid>
            <category><![CDATA[self-improvement]]></category>
            <dc:creator><![CDATA[Yuhao Cooper]]></dc:creator>
            <pubDate>Sun, 02 Apr 2023 14:59:19 GMT</pubDate>
            <atom:updated>2023-04-02T14:59:49.173Z</atom:updated>
            <content:encoded><![CDATA[<h4>Thought of the week</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*pl8DceTSf6v2jsB9" /><figcaption>Photo by <a href="https://unsplash.com/@clarktibbs?utm_source=medium&amp;utm_medium=referral">Clark Tibbs</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>We should always have a result or goal in mind in everything that we do.</p><p>I believe that’s a core part of living an intentional life.</p><p>Doing so will motivate us to face our failures head-on, instead of brushing it off.</p><p>Doing so will force us to unlock our creativity and think of ideas and actions to achieve it.</p><p>Doing so will make us realise that achieving results are hard, but makes the process more enjoyable, because you <strong>own</strong> it.</p><p>Doing so will force us to commit to the things that really matter to us with our limited time.</p><p>I am starting on it, and I have faith it’s never too late for me, or for you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3a49e1fe2bc1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[3 key points for Project Management success]]></title>
            <link>https://medium.com/@yuhaocooper/3-key-points-for-project-management-success-373d4f26f631?source=rss-299d31f07e87------2</link>
            <guid isPermaLink="false">https://medium.com/p/373d4f26f631</guid>
            <category><![CDATA[waterfall]]></category>
            <category><![CDATA[agile]]></category>
            <category><![CDATA[project-management]]></category>
            <dc:creator><![CDATA[Yuhao Cooper]]></dc:creator>
            <pubDate>Sun, 26 Mar 2023 10:10:48 GMT</pubDate>
            <atom:updated>2023-03-26T10:10:48.750Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*2hsr4XAyAq5CKlKu" /><figcaption>Photo by <a href="https://unsplash.com/pt-br/@brandsandpeople?utm_source=medium&amp;utm_medium=referral">Brands&amp;People</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Here are 3 key points to increase the success of your projects which I’ve learnt in roles as a Project Manager, Scrum Master and Operations Manager, over a 7 year career.</p><h4>1. Frameworks and methodologies are just guidelines. Customisation and iterations are far more important.</h4><p>Agile frameworks such as Scrum, Kanban, XP, and SAFe, and Waterfall methodology are merely frameworks and techniques which one can apply to the types of projects they are managing.</p><p>Use them to be able to quickly determine the main framework that will work best for your projects.</p><p>However, more often than not, a single framework on its own will not work well for your unique team and projects.</p><p>You may have to pick techniques from other framework to customise the main framework to attain the best results for you.</p><h4>2. Focus on the problem</h4><p>Always understand the type of projects you’re going to manage first.</p><p>Don’t make a decision on first glance.</p><p>Spend time to understand the goal of the team. Is the focus on the value and risk for product development? Or is the focus on meeting deadlines?</p><p>Ideally, we want both, and we should achieve both reasonably well, as one wouldn’t work without the other in a business. However, tradeoffs are usually required between the 2, and when that happens, we need to know one’s excellence, if prioritised, will generate the greater return or benefit.</p><h4>3. The team is everything</h4><p>Everything is done by the team.</p><p>All of my projects’ successes are only possible due to the hard work of the team.</p><p>Treat them well.</p><p>Listen to their feedback on what works best for them, and make it happen.</p><p>Set up a culture of accountability, and hold everyone to it.</p><p>Be there with the team when the going gets tough, and shield them from as much attack as possible.</p><p>The team will then respond with greater ownership of the projects and that will drive the success of the project.</p><p>You can still fail with the team behind you, but you definitely won’t succeed if you don’t have your team behind you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=373d4f26f631" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[5 Things to consider before moving abroad]]></title>
            <link>https://medium.com/@yuhaocooper/5-things-to-consider-before-moving-abroad-577a0e777363?source=rss-299d31f07e87------2</link>
            <guid isPermaLink="false">https://medium.com/p/577a0e777363</guid>
            <category><![CDATA[relocation]]></category>
            <category><![CDATA[careers]]></category>
            <dc:creator><![CDATA[Yuhao Cooper]]></dc:creator>
            <pubDate>Sun, 19 Mar 2023 16:27:31 GMT</pubDate>
            <atom:updated>2023-03-19T16:27:31.059Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*9qtRLDQCagR-kHG4" /><figcaption>Photo by <a href="https://unsplash.com/@zqlee?utm_source=medium&amp;utm_medium=referral">ZQ Lee</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>I recently made the biggest life and career move of my life thus far by accepting an overseas job offer in Dubai, and making the move from Singapore.</p><p>It has been 2 weeks since I’ve made the move, and I finally got some time to reflect upon the decision, and here are some factors that were part of my considerations before making the decision and if you’re fortunate enough in such a situation and is unsure about your decision yet, I hope this helps you.</p><h3>1. Finances</h3><p>The finances considerations will be different for every move and every person, but it’s a key part of our lives, and we must make sure to do a thorough comparison before a decision.</p><p>Here are some key things to note in your finance calculation and comparison</p><ol><li>Compensation — Include everything in your local package as compared to the overseas package. I had to include an additional 17% employer contribution in Singapore that is not included in my Dubai package.</li><li>Tax — Compare the difference in taxes that you’ll have to pay and how that affects your compensation package.</li><li>Relocation package — This may be a significant cost depending on the size of your family and the place you’re moving to. Make sure that you’re adequately covered for this, or it increases the initial risk of the move.</li><li>Rent — The cost of rent has been skyrocketing everywhere these days. However, some places are still more expensive than others, and because rent is one of your biggest expense, it is prudent to consider the potential rent difference.</li><li>Other big expenses — Kid’s tuition, transportation (if you plan to have a car), an in-house helper, and other expenses in your life that will potential make a monthly dent in your expenses.</li><li>Cost of living — In my experience, quick check on the relative difference is sufficient. Reality does not differ much from online information, and it would give you a good gauge of the budget you need for your quality of life.</li></ol><p>This is important to gain an understanding of the financial implication of the move and make sure that you’re not only well compensated, but cost difference do not eat into the compensation differences.</p><p>Once you have a handle of the financial impact of the move, then consider the impact on your upcoming financial goals and plans.</p><h3>2. Job security</h3><p>Late 2022 and 2023 has been uncertain times, especially in the tech sector, where we’ve had massive layoffs from big tech companies such as Meta, Amazon and etc.</p><p>Make sure that the company and your role is as stable as possible. Ask as many questions as possible during your interviews or post verbal offer about the financial health of the company, the predecessor of your role (if there is one) and performance expectations.</p><p>Don’t be afraid to do so. The potential risk to your time, energy and money is incredible here, and it’s well worth any embarrassment that you may feel.</p><h3>3. Career</h3><p>Evaluate whether the overseas opportunity is beneficial to the direction of the career you’re on.</p><p>Try to make sure that you’re getting the opportunity to either learn or earn. I think this is an important advice for people who are considering the career impact of such a move too.</p><h3>4. Family &amp; friends</h3><p>Relocation is not an individual decision, even though you may have the final say.</p><p>If you’re married or have a partner, do consult with them and discuss how the relocation life will be like. <strong>NEVER</strong> decide without consulting your partner, unless you’re planning on ending the relationship.</p><p>And if you have kids, also make sure to consider the development of your kid and how the relocation may impact it.</p><p>Also check with yourself on whether you’re ready to leave your loved ones behind for an extended period of time. Modern technology has considerably minimised this impact, but you will likely still be unable to meet your loved ones face-to-face during the weekend or attend occasions such as a birthday party, and make sure you’re ready to accept that.</p><h3>5. Adventure and experience</h3><p>Moving to Dubai or any new place will be an adventure and an experience that money can’t buy.</p><p>However, it is an adventure that gets harder to embark on as life progresses. There’s a limited number of such opportunities for us in our lifetime, and we have to take that into account.</p><p>And it is usually easier when you’re younger and you have less commitment, and it gets harder as you start putting down roots in your home country such as owning a home or starting a family.</p><p>You should ask yourself how high you value such an experience in your life.</p><h3>Making the decision</h3><p>These will be some of the key factors that I would recommend you consider before making the decision.</p><p>And when considering all these factors, I would also recommend getting a feel of the move by walking through and imagining the type of daily life you’ll be leading at the new place, and checking if that’s the type of life you’re looking for.</p><p>If yes, great. If no, you may want to limit the risk of moving as much as possible so that you can at least get a taste of it without much cost, or reconsider the move altogether.</p><p>Lastly, everyone is going to have different priorities on the above points, and there’s single answer for everyone. It’s your decision, and I hope this helps you to make the best one for yourself and your family.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=577a0e777363" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Make your daily standup more effective by communicating at the team level]]></title>
            <link>https://medium.com/@yuhaocooper/make-your-daily-standup-more-effective-by-communicating-at-the-team-level-cd90ba821df3?source=rss-299d31f07e87------2</link>
            <guid isPermaLink="false">https://medium.com/p/cd90ba821df3</guid>
            <category><![CDATA[agile]]></category>
            <category><![CDATA[meetings]]></category>
            <category><![CDATA[communication]]></category>
            <category><![CDATA[productivity]]></category>
            <dc:creator><![CDATA[Yuhao Cooper]]></dc:creator>
            <pubDate>Thu, 02 Mar 2023 15:50:11 GMT</pubDate>
            <atom:updated>2023-03-02T15:50:11.014Z</atom:updated>
            <content:encoded><![CDATA[<h4>Communicate at the appropriate level of details</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*YuLGgC3cVDYPEOmW" /><figcaption>Photo by <a href="https://unsplash.com/@parabol?utm_source=medium&amp;utm_medium=referral">Parabol | The Agile Meeting Toolbox</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>A daily standup should not be a recount of what each person has done in the past working day.</p><p>That is how daily standups last for more than 30 minutes while still leaving everyone clueless of the progress of the project and WIP, and feeling like it’s a waste to time.</p><p>Doing so is detrimental because:</p><ul><li>Individual tasks do not make sense to others without context.</li><li>When people do not understand the context, they tune out because it feels like it doesn’t concern them.</li><li>People start feeling the daily standup is useless.</li><li>The cycle repeats itself daily.</li></ul><h4>Goal of the daily standup</h4><p>Firstly, the daily standup is meant to align the team on the progress of the team’s current tasks so that it may drive the collaborative progress.</p><p>The keyword here is <strong>TEAM.</strong></p><p>It isn’t about a team member’s individual work, but rather the progress of the team’s goal and work.</p><p>And it is important to communicate in the right level of details in the daily standup to extract its value.</p><h4>Individual vs Team</h4><p>Everyone has their own individual tasks, and they understand it perfectly.</p><p>However, it is impossible for everyone to understand others’ individual tasks.</p><p>We all have way too much on own plate to do that.</p><p>Thus, for a team’s communication to be effective, we need to make a conscious decision to all communicate at the team’s level so that the level of details is appropriate and useful for the rest of the team.</p><h4>Example of communicating at a team level</h4><p>Here’s an example using the standard ‘What I’ve done, What I’m doing and my blockers’ template to showcase the difference between an individual task level and team level communication:</p><p><strong>Indivdual example</strong></p><p>“I managed to solve x bug yesterday. Then I worked with John on refactoring z. I’m going to work on the DB issue we found today. I don’t have any blockers”</p><p><strong>Team example</strong></p><p>“I solved x bug yesterday for the <strong>login page user story</strong>. Everything is completed on the <strong>development for the login page</strong>, and is <strong>ready for QA to pick it up</strong>. I’m going to work on the DB issue that is blocking the <strong>Transaction user story</strong> today. I don’t have any blockers.”</p><p>In the individual example, other team members would not have cared about the bug as they have no understanding of the details and issue the bug posed to them in a team context.</p><p>In the team example, people are able to understand it easily as it led back to the team’s task, and it naturally leads a collaborative update on what else is required or the next step for the particular task.</p><h4>Making the change</h4><p>If you find that your daily standup is constantly filled with individual details and your team isn’t getting any value out of it, here’s a way to make the change:</p><ol><li>Start by raising your view in the team either during a retrospective or privately raising it to the person leading the standup in your team.</li><li>Gather your team and set a ground rule for everyone to start communicating at the team level. This ensures that you have buy-in from everyone in the team.</li><li>Enforce the rule and train the team’s muscle on a daily basis by making everyone accountable for it, and call out each other whenever one is not communicating at the team level.</li><li>Practice as a team till it’s second nature and the team is getting the expected value out of the daily standup.</li></ol><h4>Communicating the right level of details</h4><p>The point and idea of the solution is general and simple: communicate at the right level of details for the event/audience.</p><p>It is applicable to not only making our daily standup more effective, but it can always be applied to other settings such as 1–1 meetings with your manager/report, or a project update to your senior management.</p><p>We should be aware of the goal of the meeting/communication and continuously review if we’re communicating the right level of details for our message to be effective.</p><p>Let’s make our daily standup and meetings more effective!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cd90ba821df3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Don’t keep living for the future. Life is about the present.]]></title>
            <link>https://medium.com/@yuhaocooper/dont-keep-living-for-the-future-life-is-about-the-present-635a7d7878d0?source=rss-299d31f07e87------2</link>
            <guid isPermaLink="false">https://medium.com/p/635a7d7878d0</guid>
            <category><![CDATA[time-management]]></category>
            <category><![CDATA[life]]></category>
            <category><![CDATA[productivity]]></category>
            <dc:creator><![CDATA[Yuhao Cooper]]></dc:creator>
            <pubDate>Tue, 28 Feb 2023 10:56:03 GMT</pubDate>
            <atom:updated>2023-02-28T10:56:03.287Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*jP4DVGdkoTJzxFos" /><figcaption>Photo by <a href="https://unsplash.com/@aronvisuals?utm_source=medium&amp;utm_medium=referral">Aron Visuals</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>In today’s capitalistic society, it is common for us to ‘invest’ our time and work harder or spend our time more wisely now, so that we may reap greater benefits in the future.</p><p>We’re constantly working and thinking about the future, and thus living in the future.</p><p>However, this leads us down us the slippery slope of always chasing more as there’s always more we can do in our lives, and we end up consistently restless in this endless chase.</p><p>If you’ve been feeling this way too, it may be time to rethink our goals and motivations, and how it impacts the way we live our lives.</p><h4>Clarify our goals</h4><p>We all want a better life, and this is not a bad thing in itself. Context matters — if we’re struggling with our physiological and safety needs, then it makes sense for us to put all our effort to settle that and ensure our survival.</p><p>This is for people who are constantly chasing the next thing, instead of what they really want — which sometimes they may already have what they want.</p><p>We can all learn from being the fisherman in t<a href="https://thestorytellers.com/the-businessman-and-the-fisherman/">he story of the businessman and the fisherman</a>.</p><h4>Finitude of life and commitment</h4><p>We need to be conscious of the limitations of our time in this world.</p><p>An average human only has ~4000 weeks of life.</p><p>We can achieve big dreams, but we can’t achieve everything. We have to give up on something.</p><p>This means committing.</p><p>Committing sounds like a bad thing, but commitment actually gives more value to the things we do undertake and achieve.</p><blockquote>If you can achieve everything with unlimited time, does any of the achievements really matter?</blockquote><p>Once we surrender to that, and commit to a limited set of dreams, then we don’t have to worry about constantly doing more, but just focused on doing what’s necessary to achieve our goals and live our lives.</p><h4>Live for the present</h4><p>Enjoy the moments. Life is just a series of moments one after another.</p><p>The privilege to do something purely for the sake/joy/fun of doing it should be the ends that we strive for, while work is the means to that end. We should try to keep that in mind.</p><p>Life is not all about the economy and making more money.</p><p>If we’re able to accept that, then it becomes easier for us to live in the present and enjoy life when we’ve completed the work we’ve set for ourselves.</p><h4>Balance</h4><p>We’re all seeking to make the most of our limited lives.</p><p>This is not about techniques for finding the perfect balance, but to spark the idea that we should be conscious about the ends that we’re working for, and how the pursuit of too many dreams may cause us to miss out on life itself.</p><p>And yes, I still struggle with trying to do too much, and always thinking about the future, instead of living in the present.</p><p>It will be a lifelong lesson and struggle, but it has made me happier when I tried to do it, and I’ll continue to do my best with it.</p><p>I hope this helps you too, and it’s ok to take a break and go and do the silly thing that you have put-off because it didn’t have any material benefits and you felt like you don’t have the luxury of time to do it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=635a7d7878d0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[3 steps to be disciplined, do the work, and achieve the results]]></title>
            <link>https://medium.com/@yuhaocooper/3-steps-to-be-disciplined-do-the-work-and-achieve-the-results-9c4fa66e05db?source=rss-299d31f07e87------2</link>
            <guid isPermaLink="false">https://medium.com/p/9c4fa66e05db</guid>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[self-improvement]]></category>
            <category><![CDATA[self]]></category>
            <category><![CDATA[work]]></category>
            <dc:creator><![CDATA[Yuhao Cooper]]></dc:creator>
            <pubDate>Mon, 30 Jan 2023 04:31:59 GMT</pubDate>
            <atom:updated>2023-01-30T04:31:59.841Z</atom:updated>
            <content:encoded><![CDATA[<h3>3 steps to be disciplined, do the work, and achieve your goals</h3><h4>Keep it easy and consistent</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*oaLdEl76U0th216m" /><figcaption>Photo by <a href="https://unsplash.com/@brett_jordan?utm_source=medium&amp;utm_medium=referral">Brett Jordan</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>1. Don’t rely on motivation</h3><p>Motivation is fickle. It comes and it goes, and more often than not, it’s nowhere to be found when you’re trying to do the work.</p><p>The reason is because we’re all subjected to <strong>Present bias</strong>, and the motivation to do something else other than ‘work’ in the moment is always stronger than our motivation to work now with delayed gratification of achieving our goals in the future.</p><h3>2. Make things as easy as possible</h3><blockquote>You do not rise to the level of your goals. You fall to the level of your systems — James Clear, Author of ‘Atomic Habits’</blockquote><p>Motivations are the ‘goals’. One hardly ever rise to it. And when we do, we’re depleting our limited supply of ‘mental energy’ and motivation to get through it.</p><p>Fighting against Present bias with motivation is not sustainable.</p><p>Instead, we should leverage Present bias in the favor of work. Make your work so easy and enjoyable that you’ll want to work instead of doing other things.</p><p>Here are a few ways to do it:</p><ol><li>Create a distraction-free environment (increase the effort and cost of your distractions).</li><li><strong>Getting started/restart</strong>. Figure out what’s the easiest thing you can do in your work. This should be stress-free, and something you can do on auto-pilot. This is the activity that you can start or restart your work with, instead of succumbing to your distractions. E.g putting on your running shoes and stepping out of door on a quick walk before progressing to a run, or just a quick walk to think about the problem you’re working on with no expectation of results.</li><li><strong>Create your own quick feedback loop, and focus on progress instead of results.</strong> Don’t rely on results - celebrate the small progress. Learnt something new in the past 5 mins of your work? Celebrate it. Wrote 1 good line? Celebrate it. Wrote 10 bad lines? Celebrate it. The 10 bad lines will help you write the one line you’re looking for, and the quick feedback loop will increase your enjoyment of the work instead of waiting for the delayed result that may never come.</li><li><strong>Hack your distractions.</strong> Note the physical and emotional triggers when you’re distracted away from your work. Be as explicit as possible, and write them down. Then think about what you’ll do when you experience these triggers. It can be the stress-free work activity that you’ve thought about in step 2 above. And since it’s really easy and stress-free, you can do it sustainably without depleting your mental-capacity.</li></ol><h3>3. Don’t take things too hard, but keep yourself accountable</h3><p>It’s ok to get distracted for a couple of minutes while you’re working for hours.</p><p>It’s ok to take a break during the day, week and months.</p><p>You don’t have to be 100% focused all-the-time. That’s just impossible to sustain.</p><p>Accept that you’re human, and keep going. This way, you don’t fall into the vicious cycle of stressing about work and making it harder than it is. Keep it <strong>easy</strong>.</p><p>The goal is to keep consistent progress, and trust the process and journey. As long as you don’t quit, it’s just a matter of time before you achieve the result you’re looking for.</p><p>But keep yourself <strong>accountable</strong>. Track your time. Use a time tracker such as <a href="https://clockify.me/">Clockify</a> or <a href="https://toggl.com/">Toggl </a>and make sure you’re putting in the necessary work.</p><p>I hope these 3 steps help you to show up to work consistently even on your worst days and moments. Remember that consistent effort beats epic, because epic isn’t consistent.</p><p>I wish you all the best on your journey!</p><p><strong>Let’s stay connected</strong>. Follow me on Medium if you like this article. You may also view my <a href="https://yuhaocooper.com/">Website </a>or connect with me on <a href="https://www.linkedin.com/in/yuhaocooper/">LinkedIn</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9c4fa66e05db" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to deploy React app on AWS Lightsail, and build your own website]]></title>
            <link>https://medium.com/@yuhaocooper/how-to-deploy-react-app-on-aws-lightsail-and-build-your-own-website-d4937c5c8792?source=rss-299d31f07e87------2</link>
            <guid isPermaLink="false">https://medium.com/p/d4937c5c8792</guid>
            <category><![CDATA[website-development]]></category>
            <category><![CDATA[guides-and-tutorials]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Yuhao Cooper]]></dc:creator>
            <pubDate>Mon, 16 Jan 2023 11:04:59 GMT</pubDate>
            <atom:updated>2023-01-16T11:07:50.737Z</atom:updated>
            <content:encoded><![CDATA[<h4>Deploying and configuring your React app and Lightsail instance to showcase your website!</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I4Ng4B--fcLMA8TbDNuvFA.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@igormiske?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Igor Miske</a> on <a href="https://unsplash.com/backgrounds/apps/website?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><h4>Introduction</h4><p>This is the first article and step in a 4 steps walkthrough to help anyone who would like to learn to build a website from scratch without bundled tools and website templates such as Squarespace, Wix and etc. The 4 parts are broken down as the following:</p><ol><li>Registering a domain name with Google Domains.</li><li>Server hosting with AWS Lightsail.</li><li>Coding your website in ReactJs.</li><li>Installing your ReactJS app on the server and configuring Lightsail.</li></ol><p>This is broken down into 4 parts to keep each article short and separate, and so that anyone who may have issue with 1 part, may just read through that particular article.</p><p>With the introduction out of the way, let’s get started.</p><h4>What we’ll cover in this part</h4><p>We’ve reached the final part of the series. We’ve prepared all the tools and now we just got to deal with the tricky part of deploying our React app on our Lightsail Server and configuring the settings to make it accessible by the rest of the internet.</p><p>But don’t worry, I’m here to guide you through step-by-step and to make sure that we can get our app hosted on our Server and accessible by the internet.</p><p>By the end of it, you’ll have a React app and website successfully deployed on Lightsail, and accessible by the public through your domain name.</p><h4>Recap of previous parts</h4><p>At this stage, we have a React app on our local machine, an unconfigured Lightsail instance with an attached staticIP that is running on AWS, and a domain name that is set up to point to our Lightsail instance’s IP address. If you do not have these things in place, you may review the previous parts on how to get it.</p><h4>Configuring Lightsail</h4><p>Let’s start off with configuring our Lightsail instance. Let’s log into to our AWS console using our IAM user and go to our Lightsail page and access our instance through AWS’s web SSH terminal by clicking this button:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/545/1*pj4Cg4xKgcqbowyRaRwmEA.png" /><figcaption>Click this button to access our Lightsail instance through AWS’s web SSH terminal</figcaption></figure><p>You may also download a SSH client such as <a href="https://www.putty.org/">PuTTy</a>, and use the SSH key to access it, but that’s more complicated. To learn how to do so, here is <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/putty.html">aws’s guide</a> on it.</p><p><strong>NGINX</strong></p><p>Once we’re in Lightsail, the first thing we want to do is to install <strong>NGINX</strong>. NGINX is a power and popular web server that works very well with React.</p><p>Back on your terminal, update your package listings and install the latest version of NGINX with apt-get:</p><pre>sudo apt-get update<br>sudo apt-get install nginx</pre><p><strong>Node.js and NPM</strong></p><p>Then we want to install Node.js and NPM. We can do so with the following command. This will download and install node 18.x using apt and nodesource on your Lightsail instance. (For future upgrades, you may follow the documentation <a href="https://github.com/nodesource/distributions">here</a>)</p><pre>curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash - &amp;&amp;\<br>sudo apt-get install -y nodejs</pre><p><strong>Add project files to Lightsail Server</strong></p><p>Before we continue with the rest of the Lightsail configuration, we need to add our React app project files to Lightsail. To do so, we’ll rely on GIT to make sure all everything is copied over, and so that you may continue to use GIT for version control and working on your project with different machines.</p><p>We’ll start with creating a GitHub account so that we’ll have a remote repository that we can push and download updates from different machines.</p><p>Head over to <a href="https://github.com/">GitHub</a> and create an account.</p><p>Once that is done, create a new repository for your React app. You may name it as anything.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/762/1*RT-E-4kOPZ93pSQ9LyOuhw.png" /><figcaption>Do not add a README file and .gitignore when creating. We can add it locally.</figcaption></figure><p>Once you’ve created your GitHub repository, you will be able to see a HTTPS link that we’ll use to upload our local React app to.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*Fx57M7NWZaEARczZGhitMw.png" /></figure><p>When we use “create-react-app” it automatically initializes a Git file for us, so what we need to do now is to add the Github remote repository link and push our local files to it.</p><pre>$ git remote add origin &lt;REMOTE_URL&gt;<br># &quot;origin&quot; is the name of the Github repository or remote repository. You can change the name to something else.<br># Sets the new remote<br>$ git remote -v<br># Verifies the new remote URL<br>$ git push origin main<br># Pushes the changes in your local repository up to the remote repository you specified as the origin<br># if you&#39;ve changed your default branch to &quot;master&quot; on Github, then you should change &quot;main&quot; to &quot;master&quot; here</pre><p>Once that is done, your cmd/terminal should show that you’ve pushed your React app files to Github and when you refresh your Github repository, you should see the files there too.</p><p>Lastly, to complete this step, we need to pull the files from Github into our Lightsail instance. Now we need to go back to our Lightsail terminal, and type in the following lines</p><pre>cd ../..<br># change directory to the root<br>cd opt<br># change directory to /opt so we can install our React app here, as recommended by linux documentations.<br>sudo git clone https://github.com/your_username/your_repository_name.git<br># Clone our React app to our /opt folder from our Github repository<br># Need sudo as we need root user permission here<br>cd your_repository_name<br>sudo npm i<br># If the process hangs here, you may have selected the 512 Lightsail instance. Change it to a 1gb instance, and this step will work.<br># This installs all the node module dependencies that our React app requires<br>sudo npm run build<br># This creates a production build that our server will be serving to our visitor&#39;s browser.</pre><p><strong>Back to NGINX</strong></p><p>Now we have built our React app on our server, and we can configure our NGINX settings to display our React app when anyone visits our website. We do this with the following lines.</p><pre>cd /var/www/<br>sudo mkdir your_domain.com<br># Create a folder for your website<br>sudo rm -r html<br># Remove the default html file in /var/www/<br>sudo ln -s /home/your_username/your_repository_name/build/* /var/www/your_domain.com/<br># Make a symbolic link to your project&#39;s build folder with the ln -s command<br># This will mirror all the information from your build folder to the your_domain.com directory</pre><p>Then we modify the NGINX configuration files</p><pre>cd /etc/nginx/sites-available<br>sudo rm -r default<br># Delete the default file here<br>sudo vi your_domain.com<br># &quot;vi&quot; is the command for opening VIM, which is a text editor<br># Press &quot;I&quot; to go into insert mode, where you can edit the file. Then press &quot;ESC&quot; to exit insert mode. A<br># And when you&#39;re ready to save it, type &quot;:wq&quot; to write and quit VIM.</pre><p>Then copy the following code within the new file. Make sure to be in “Insert mode” by pressing “i”.</p><pre>server {<br> listen 80 default_server;<br> listen [::]:80 default_server;<br> root /var/www/your_domain.com;<br> index index.html;<br> server_name your_domain.com www.your_domain.com;<br> location / {<br>   try_files $uri $uri/ /index.html;<br> }<br>}<br></pre><p>Lastly, we need to copy this new server file to the sites-enabled folder, and we can do so with another symbolic link</p><pre>sudo ln -s /etc/nginx/sites-available/your_domain.com /etc/nginx/sites-enabled/your_domain.com</pre><p>Let’s check our work by running:</p><pre>sudo nginx -t</pre><p>And if it’s successful, restart our server:</p><pre>sudo systemctl restart nginx</pre><p>If everything is done, you should be able to view your site by entering your domain name in a browser, when you type in <a href="http://yourdomainname.com./">http://yourdomainname.com.</a></p><p>It wouldn’t work for https connection because we’re still lacking a SSL certificate and configuring our Lightsail firewall.</p><p><strong>SSL certificate</strong></p><p>We shall use a free service called Let’s Encrypt to get our SSL certificate. And these are the steps to get it:</p><pre># Add CertBot repository for the latest version<br>sudo add-apt-repository ppa:certbot/certbot<br># Update the package list afterwards to pick up the new information<br>sudo apt-get update<br># Install CertBot&#39;s python/NGINX package<br>sudo apt-get install python-certbot-nginx<br># Run the certbot plugin.<br>sudo certbot --nginx -d your_domain.com -d www.your_domain.com<br><br># Enter your email address and agree to the terms of service if required. Certbot will then present you<br># with some options, and select [2] in the case for &quot;Redirect&quot;.<br># If everything went smoothly, CertBot will update your configs, reload NGINX and confirm success with a message.</pre><p><strong>Last step!</strong></p><p>This is the last and final simple step to configure our Lightsail firewall to allow HTTPS port.</p><p>We do so by clicking into our instance page, and selecting the Networking tab.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q33Vs6xmR7kB7OcbTpxk4A.png" /></figure><p>Then under the IPv4 Firewall, we add a rule for HTTPS and click on “Create”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/769/1*rukXkHMWgYoLzppHR023og.png" /></figure><p>And we’re done! Now, if you type in yourdomainname.com into your browser, you should be able to see your react app there. Congrats!</p><h4>Review</h4><p>Congratulations on building your own website with all the base services instead of relying on bundled services! If you wish to review the previous steps, you may use the links below. And now, you can simply iterate on your app by working on your local React file before pulling it into your Lightsail instance using Git.</p><p>Here are the links to the rest of the parts:</p><p>Part 1: <a href="https://medium.com/@yuhaocooper/how-to-register-a-domain-name-with-google-domains-and-build-your-own-website-b1864dca3ff5">Register your Google domain</a></p><p>Part 2: <a href="https://medium.com/@yuhaocooper/how-to-setup-aws-lightsail-server-and-build-your-own-website-e274721ed1bc">Setup AWS Lightsail</a></p><p>Part 3: <a href="https://medium.com/@yuhaocooper/how-to-create-a-react-app-and-build-your-own-website-610091ea8d53">Create your React app</a></p><p>If you have any questions, please feel free to drop a comment in the story, and I’ll do my best to help you answer them. Thank you!</p><p><strong>Let’s stay connected</strong>. Follow me on Medium if you like this article. You may also view my website at <a href="https://yuhaocooper.com/">yuhaocooper.com</a> to view my result of building my own website using the above steps.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d4937c5c8792" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to create a React app, and build your own website]]></title>
            <link>https://medium.com/@yuhaocooper/how-to-create-a-react-app-and-build-your-own-website-610091ea8d53?source=rss-299d31f07e87------2</link>
            <guid isPermaLink="false">https://medium.com/p/610091ea8d53</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[guides-and-tutorials]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Yuhao Cooper]]></dc:creator>
            <pubDate>Mon, 16 Jan 2023 11:04:34 GMT</pubDate>
            <atom:updated>2023-01-16T11:08:55.576Z</atom:updated>
            <content:encoded><![CDATA[<h4>Create a template React app</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I4Ng4B--fcLMA8TbDNuvFA.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@igormiske?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Igor Miske</a> on <a href="https://unsplash.com/backgrounds/apps/website?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><h4>Introduction</h4><p>This is the first article and step in a 4 steps walkthrough to help anyone who would like to learn to build a website from scratch without bundled tools and website templates such as Squarespace, Wix and etc. The 4 parts are broken down as the following:</p><ol><li>Registering a domain name with Google Domains.</li><li>Server hosting with AWS Lightsail.</li><li>Coding your website in ReactJs.</li><li>Installing your ReactJS app on the server and configuring Lightsail.</li></ol><p>This is broken down into 4 parts to keep each article short and separate, and so that anyone who may have issue with 1 part, may just read through that particular article.</p><p>With the introduction out of the way, let’s get started.</p><h4>What we’ll cover in this part</h4><p>This article will be a short one as it is impossible to have a step-by-step guide to building your custom website with React. That is a journey that you would have to explore on your own and rely on either React, or other FE frameworks and languages that you are familiar with to build the website you want.</p><p>What this article will do is show you how to create the template react app. We’ll then cover the full integration or deployment step with our Lightsail instance in our 4th and final part.</p><p>By the end of it, you’ll have a local React app that can be run locally and displayed on your own browser through localhost:3000.</p><h4>Install node and npm</h4><p>First of all, check if you have node and npm install on your local machine by opening up your Command Line Interface. If you’re on window, the default will be <strong>cmd.exe</strong> or your Command Prompt, and on Mac, it will be <strong>terminal</strong>. You open open each of these apps by using windows search or spotlight search.</p><p>Once cmd/terminal has been opened, type in the following</p><pre>node -v</pre><p>If node is installed, the cmd/terminal should return a version number.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/283/1*_nDCjPnZ1uOijWeULGeuWQ.png" /><figcaption>You will see a version number if node is installed.</figcaption></figure><p>If you see a version number, that’s great, and you can move on to creating the React app below. Else, do follow the simple steps on the Nodejs website <a href="https://nodejs.org/en/download/">here</a> to download and install Node and NPM on your local machine.</p><p>Once installed, if you type “node -v” again in your cmd/terminal, you should see the version number and ready to create the template React app. NPM is included with the Node.js installation, but you can verify the installation by typing in “npm -v” too.</p><p>We require Node and NPM here as NPM is the tool that we’ll require to download and install the our template react app.</p><h4>Create a template React App</h4><p>First, within your cmd/terminal, you would want to change the directory that the command line is currently working in to a directory you’re familiar with. This can be done with the method “cd”. To change the directory to a folder within the current directory, use “cd {folder name}, and to move up the directory hierarchy , use “cd ..”</p><pre>cd<br>cd {folder name}<br>cd ..</pre><p>If you’re unsure of which folder the cmd/terminal is currently in, use “ls” to view the list of files and folders available in the current directory.</p><pre>ls</pre><p>I would recommend using the desktop as it is easy to see and find the app folder then.</p><p>It is usually in the format of “C:\Users\{your windows/mac user name}\desktop”, and you can type that directly into the cmd/terminal if you have trouble finding it.</p><pre>npx create-react-app my-app<br>cd my-app<br>npm start</pre><p>Type these 3 lines into your cmd/terminal.</p><p>Andddddd….you’re done. Your template app is up-and-running on your local machine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/651/1*qKtkIG-w9ObrvGDZW7MRuA.png" /></figure><p>Now, let’s explain the 3 lines of code.</p><pre>npx create-react-app my-app</pre><p>NPX is the package runner tool that comes with the NPM that we’ve installed to download and install react app on our local machine. “create-react-app” is the command for npx to create our react app, and “my-app” is the name of the app, and you may change this to something you’re more comfortable with.</p><pre>cd my-app</pre><p>This is telling your cmd/terminal to enter the directory or folder that npx has created all the react files with the name of the app. You can also view this directly through your normal windows or mac folder.</p><h4>Next steps</h4><p>We’re now ready to move on to the final step of deploying our react app to our Lightsail server and setting everything up so that it is accessible by the public internet.</p><p>You can continue to the final part.</p><p>Here are the links to the rest of the parts:</p><p>Part 1: <a href="https://medium.com/@yuhaocooper/how-to-register-a-domain-name-with-google-domains-and-build-your-own-website-b1864dca3ff5.">Register your Google Domain</a></p><p>Part 2: <a href="https://medium.com/@yuhaocooper/how-to-setup-aws-lightsail-server-and-build-your-own-website-e274721ed1bc">Setup AWS Lightsail</a></p><p>Part 4: <a href="https://medium.com/@yuhaocooper/how-to-deploy-react-app-on-aws-lightsail-and-build-your-own-website-d4937c5c8792">Deploy your React app and configure your Lightsail instance</a></p><p>If you have any questions, please feel free to drop a comment in the story, and I’ll do my best to help you answer them. Thank you!</p><p><strong>Let’s stay connected</strong>. Follow me on Medium if you like this article. You may also view my website at <a href="https://yuhaocooper.com/">yuhaocooper.com</a> to view my result of building my own website using the above steps.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=610091ea8d53" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to setup AWS Lightsail server, and build your own website]]></title>
            <link>https://medium.com/@yuhaocooper/how-to-setup-aws-lightsail-server-and-build-your-own-website-e274721ed1bc?source=rss-299d31f07e87------2</link>
            <guid isPermaLink="false">https://medium.com/p/e274721ed1bc</guid>
            <category><![CDATA[guides-and-tutorials]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[coding]]></category>
            <dc:creator><![CDATA[Yuhao Cooper]]></dc:creator>
            <pubDate>Mon, 16 Jan 2023 11:04:12 GMT</pubDate>
            <atom:updated>2023-01-16T11:09:23.569Z</atom:updated>
            <content:encoded><![CDATA[<h4>Setting up AWS and Lightsail instance</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I4Ng4B--fcLMA8TbDNuvFA.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@igormiske?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Igor Miske</a> on <a href="https://unsplash.com/backgrounds/apps/website?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><h4>Introduction</h4><p>This is the first article and step in a 4 steps walkthrough to help anyone who would like to learn to build a website from scratch without bundled tools and website templates such as Squarespace, Wix and etc. The 4 parts are broken down as the following:</p><ol><li>Registering a domain name with Google Domains.</li><li>Server hosting with AWS Lightsail.</li><li>Coding your website in ReactJs.</li><li>Installing your ReactJS app on the server and configuring Lightsail.</li></ol><p>This is broken down into 4 parts to keep each article short and separate, and so that anyone who may have issue with 1 part, may just read through that particular article.</p><p>With the introduction out of the way, let’s get started.</p><h4>What we’ll cover in this part</h4><p>We’ll be covering the AWS and Lightsail service setup in this part. We’ll go through the basics of setting up your AWS account to help those who have never done it before, and creating our Lightsail instance, but stop short of any configuration settings that are done directly on the server.</p><h4>Quick introduction on AWS</h4><p>Amazon Web Services or more commonly known as AWS is the industry leading cloud computing service. Its competitors include Google’s Google Cloud Platform, Mircrosoft Azure and others. Cloud computing allows people or organizations to do a variety of computing tasks very quickly without buying and setting up their own physical servers and hardware.</p><p>By the end of it, you will have an AWS account and a running Lightsail instance with a staticIP that your domain name is pointing to.</p><h4>AWS Lightsail</h4><p>I’ve chosen AWS Lightsail because firstly AWS is the most widely used cloud computing service in the industry, and thus most likely to be relevant to potential employers.</p><p>And I’ve chosen Lightsail instead of the common EC2 because we’re only building a simple personal website that is purely frontend, and Lightsail is easier to configure for this requirement than EC2. If you’re however building a more complex app or website, you may want to explore the other services within AWS.</p><h4>Steps to setting up your Lightsail server</h4><p><strong>Create AWS account</strong></p><p>Head to <a href="https://aws.amazon.com/">AWS</a> and click on “Create <strong>a</strong>n AWS Account”. You are creating a <strong>root</strong> user account here. Fill in your email address, and choose an AWS account name and click on “Verify email address”.</p><p>Once you’ve verified your email address, you can fill in your Contact Information. You may choose either <strong>Business </strong>or <strong>Personal </strong>account. There’s no functional difference and if you want to be safe, you can always choose <strong>Personal</strong> first and change it to <strong>Business </strong>in the future.</p><p>You’ll need to fill in your billing information as even though we’ll be using AWS free tiers for the first few months, AWS will need payment details so that they can charge for any other chargeable services.</p><p>Continue through the rest of the steps, and once completed, sign into aws as <strong>root</strong> user with the credentials that you’ve entered previously.</p><p>Here’s a youtube video that better walks you through the entire sign up flow: <a href="https://www.youtube.com/watch?v=P7hVdusJF7I">https://www.youtube.com/watch?v=P7hVdusJF7I</a></p><p><strong>Setup IAM</strong></p><p>Next, we want to setup your IAM to create a separate IAM user to access your AWS account. This is for security reasons as the Root User has special previliges and access such as Closing your AWS account, Changing your account settings and etc, and it is recommended to use an IAM account with admin access on a daily basis instead of potentially exposing the root user credentials.</p><p>To do this, once you’ve logged into AWS, click on the search bar at the top of the page and search for “IAM”, and click on IAM.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QRNAzv2ljMgwtGbSDcvuog.png" /><figcaption>You should see this.</figcaption></figure><p>Once you’re in the IAM service page, click on User groups on the left-hand panel, and create a new user group by clicking on the “Create group” button on the “User groups” page.</p><p>Enter a User group name such as “Admin”, and ignore adding users to the group for now. Then you want to attach a couple of admin permissions policies to this groups so that users within it will have access to these attached admin permissions. The 2 key permissions you would want here are <strong>Billing </strong>and <strong>Administrator.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DnJy0NZHPGxPScWtFZWpGQ.png" /></figure><p>Once you’ve selected these 2 policies, go ahead and create your user group.</p><p>Next, let’s create a user and add it to the user group so that we can log in as this user when we need to access AWS, and have access to the above permissions.</p><p>Click on the “Users” tab on the left-hand panel, then click on “Add users”. Enter a name for your admin user such as “xxx-admin”, then select the <strong>Password</strong> option for the credential type. Then click on “Next: Permissions” to go to the next page. The default option should be to “Add user to group”, and you may select your “Admin” group here, before proceeding to the next step. You do not need tags for now, and you may review and create your IAM admin user.</p><p><strong>Billing access for your IAM admin user</strong></p><p>Before we log out of the root user and start using our IAM admin user, we need to grant IAM Access to Billing and Cost Management console, else, we can’t set our budget in the next step with our Admin user. To do this, click on your root user name at the top right corner, and select “Account” from the drop down menu. This will bring you to the My Account page. Then scroll down till you find the “IAM User and Role Access to Billing Information” section, and activate it. It should look like this after you activate it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*an-ow46dEnjyDKz6XIfkfw.png" /></figure><p><strong>Start using our IAM admin user</strong></p><p>And lastly, before we log out, do copy the Account ID of the account. You can find this by clicking clicking on your root user name on the top right corner. It should be a 12 digit number.</p><p>I would advise you to copy and paste this ID in your local computer as you’ll need it to log into your IAM user, and it may not be saved in your browser.</p><p>Once you’ve copied the Account ID, logout of your root user and log back into AWS, but select Sign in as “IAM user”. Then enter the Account ID, the IAM user name and Password.</p><p><strong>Set up our budget</strong></p><p>In this exercise, we’ll be using AWS’s free tier resources, and Lightsail has a 3 month free tier. And if you only signed up for Lightsail, there shouldn’t be any cost. But to be safe, and as a best practice, let’s set up a budget so that we’re notified when we’re spending any amount in AWS, and we don’t unexpectedly end up with a huge bill because of a mistake.</p><p>To do this, use the AWS search bar and search for “AWS Budget”. Once you’re on the budget page, click on “Create budget” button, and select the “Zero spend budget” Template and click on the “Create budget” button at the bottom.</p><p>Done, now we don’t have to worry about unknowingly racking up a huge AWS bill.</p><h4>AWS Lightsail!</h4><p>Now we’re ready to setup our AWS Lightsail service.</p><p>As usual, use the AWS search to search for “Lightsail”. You should see an empty page, and on the “Instaces” header.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KZ1byr7iW1YEO3thCIF6qA.png" /></figure><p>Go ahead and click on “Create instance”</p><p>In the next page, you can change the instance location, and you would want to select the region that is closest to your target audience to improve page loading times.</p><p>Then select “Linux/Unix” platform, and also “OS Only” blueprint, as we want to setup everything from scratch and build our website with ReactJs instead of WordPress. To follow my example exactly, select <strong>Ubuntu 20.04 LTS</strong> from the OS option.</p><p>There’s no need to add a launch script, and we can use the default SSH key.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/647/1*dc-IYHa_294-U_a_C9KMRg.png" /></figure><p>Then you would want to select the $5USD option. The reason for this is because it has 1GB of ram, which allows NPM install to work smoothly instead of crashing, and this is critical for building and running our ReactJs website. It is possible to work around the ram limitation, but there are additional steps and complexity to do so, so we’ll just pay $1.5 more to avoid this problem.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/935/1*wdIg1hClUQ_kc2Sonig2hA.png" /><figcaption>Avoid NPM install problem by selecting the 1GB ram option</figcaption></figure><p>You may keep the default instance name given by AWS, then you may click on “Create instance”. Once you do that, you should see a new instance on your Lightsail dashboard.</p><h4>Create and attach a static IP to your Lightsail instance</h4><p>A static IP is a fixed, public IP address that you can assign and reassign to your instances.. This is critical as the Lightsail instance may restart on it’s own due to issues, or if AWS has an outage. In such cases, if you did not attach a static IP to the instance, AWS will assign a new IP address to your instance, then you would also have to re-configure your Domain DNS to point to the new IP address whenever this happens.</p><p>To do this, click on the “Networking” tab within the Lightsail dashboard, and click on “Create static IP”.</p><p>Make sure to select the region that is the same as your Lightsail instance so that you can attach your Static IP to it. A static IP is free if it’s attached to an instance, and AWS only charges if there are unused static IP. So do attach it immediately.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/962/1*MumH1p3HOib6g8y0shSwvw.png" /><figcaption>Make sure you can see your Lightsail instance to attach the static IP</figcaption></figure><h4>Pointing your domain name to your static IP</h4><p>This is the last step for this part. We want to point our domain name to our static IP so that when people enters “yourname.com”, google domain’s dns will direct them to your Lightsail IP address and your server can display the webpage that we’ll create in the next article.</p><p>To do this, we need to head back to <a href="https://domains.google/">Google Domains</a>. Select your domain name. And on the domain setting page, select “DNS” from the left-hand panel</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/309/1*l2O118XJTlS5JlMuCrOuJQ.png" /><figcaption>Select DNS here</figcaption></figure><p>Then under the Custom records section, you want to click on “Manage custom records”, and input the following</p><pre>Host name | Type | TTL | Data<br><br>&lt;blank&gt; | A | 60 | {static IP}<br><br>* | A | 60 | {static IP}</pre><p>The above is representative of 2 records. One with a &lt;blank&gt; value under the “Host name” field, and the other with a “*” value. While under “Data”, we need to input our static IP address there. These settings tells Google Domain to redirect any request to yourname.com and any prefix such as “www”, “http://” or “https://” to the Lightsail instance’s static IP.</p><p>Once this is done, you may have to wait a couple of hours for the changes to take effect, then when you type in yourdomainname.com, Google DNS will actually direct you to your Lightsail instance. It will still show an error now, but once we install certain programs on our Lightsail server, that will quickly change.</p><p>That’s it for setting up your AWS account and Lightsail instance. We’ll come back to the Lightsail instance in part 4 when we start deploying our react app on it, and making it work and accessible to the internet.</p><h4>Next steps</h4><p>We’re now ready to start building our react app in part 3!</p><p>Here are the links to the rest of the parts:</p><p>Part 1: <a href="https://medium.com/@yuhaocooper/how-to-register-a-domain-name-with-google-domains-and-build-your-own-website-b1864dca3ff5.">Register your Google Domain</a></p><p>Part 3: <a href="https://medium.com/@yuhaocooper/how-to-create-a-react-app-and-build-your-own-website-610091ea8d53">Create your React app</a></p><p>Part 4: <a href="https://medium.com/@yuhaocooper/how-to-deploy-react-app-on-aws-lightsail-and-build-your-own-website-d4937c5c8792">Deploy your React app and configure your Lightsail instance</a></p><p>If you have any questions, please feel free to drop a comment in the story, and I’ll do my best to help you answer them. Thank you!</p><p><strong>Let’s stay connected</strong>. Follow me on Medium if you like this article. You may also view my website at <a href="https://yuhaocooper.com/">yuhaocooper.com</a> to view my result of building my own website using the above steps.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e274721ed1bc" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>