{"id":10202,"date":"2023-11-25T12:35:48","date_gmt":"2023-11-25T12:35:48","guid":{"rendered":"https:\/\/putridparrot.com\/blog\/?p=10202"},"modified":"2023-11-25T12:35:48","modified_gmt":"2023-11-25T12:35:48","slug":"deploying-your-static-web-site-to-aws","status":"publish","type":"post","link":"https:\/\/putridparrot.com\/blog\/deploying-your-static-web-site-to-aws\/","title":{"rendered":"Deploying your static web site to AWS"},"content":{"rendered":"<p>Nowadays, if you&#8217;re developing a static web site, the old hosting packages you&#8217;d get via the web hosting companies now need to compete with offerings from the cloud. Azure, AWS and GCP all offer the ability to host your static pages and ofcourse, why wouldn&#8217;t they, it&#8217;s just storage and ingress to a web server and depending upon your site requirements, these can be hosted for free.<\/p>\n<p>In this post I&#8217;m going to deploy a simply little React app using Material UI that I have, I deployed the same to Azure a long while back (it&#8217;s available via <a href=\"https:\/\/www.mycountdown.co.uk\/\" rel=\"noopener\" target=\"_blank\">https:\/\/www.mycountdown.co.uk\/<\/a>). It&#8217;s a bit of fun which displays a single countdown to a selected date\/time and tells you the number of days, minutes etc. and work days. <\/p>\n<ul>\n<li>Go to your AWS console and I&#8217;m clicking the <em>Host a static web app<\/em> option in the <em>Build a solution<\/em> section of the AWS console<\/li>\n<li>I then select GitHub from the <em>From your existing code<\/em> screen as GitHib is where I host the code for the app.<\/li>\n<li>AWS wants permissions to my repo. so I&#8217;ll authorize that<\/li>\n<li>Next I&#8217;m going to only <em>Install &#038; Authorize<\/em> the one repo. with the countdown code, so I select <em>Only select repositories<\/em> but select <em>All repositories<\/em> if you prefer<\/li>\n<li>As mentioned, I clicked <em>Only select repositories<\/em> then I selected my countdown app repo. and finally I click <em>Install &#038; Authorise<\/em><\/li>\n<li>You may be prompted for further authentication from GitHub, oddly AWS said authentication failed when I was doing this and then AWS changed it&#8217;s mind and said it was successful<\/li>\n<\/ul>\n<p>If all works you&#8217;ll be back at AWS in the <em>Add repository branch<\/em> section. We authorized use of a repo. but may have authorised all repos., so now we choose the the repo. and branch to deploy. <\/p>\n<ul>\n<li>When ready click <em>Next<\/em><\/li>\n<li>Fill in anything required on the next page and then click <em>Next<\/em> again<\/li>\n<li>On the review page, reviews your details and then click <em>Save and deploy<\/em> when ready<\/li>\n<\/ul>\n<p>If all goes well you&#8217;ll see a message regarding AWS downloading the app. and the site will be provisioned. We now need to wait on AWS to <em>Build<\/em> and move the progress on to the <em>Deploy<\/em> step. Once completed you&#8217;re site will have been provisioned, built and deployed. A <em>Domain<\/em> URL is assigned and clicking on this, you should see your site.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Nowadays, if you&#8217;re developing a static web site, the old hosting packages you&#8217;d get via the web hosting companies now need to compete with offerings from the cloud. Azure, AWS and GCP all offer the ability to host your static pages and ofcourse, why wouldn&#8217;t they, it&#8217;s just storage and ingress to a web server [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[700,224],"tags":[],"class_list":["post-10202","post","type-post","status-publish","format-standard","hentry","category-aws","category-web"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/posts\/10202","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/comments?post=10202"}],"version-history":[{"count":5,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/posts\/10202\/revisions"}],"predecessor-version":[{"id":10209,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/posts\/10202\/revisions\/10209"}],"wp:attachment":[{"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/media?parent=10202"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/categories?post=10202"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/tags?post=10202"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}