Task List
- Register yourdomain.com
- Set up an AWS Linux Server (server)
- Tell a/the Domain Name Server to associate yourdomain.com with the IP of the server
- Get a Git server running on the server
'Exploratory Testing' for the benefit of the tasks:
- We will need to gather basic AWS knowledge before we can start to make real progress on the task list.
- We start with AWS Getting Started:
- http://docs.aws.amazon.com/gettingstarted/latest/swh/website-hosting-intro.html
- Setting up to host a static website:
- We need to sign up for AWS... check
- Now we need to create an IAM (Identity and Access Management) user
- AWS Management Console > IAM Management
- Angry orange exclamation marks tell us that we need to increase the security of our AWS accounts. Let's look into that.
- We are strongly advised to activate MFA (multi-factor authentication) on our AWS root account. We agree.
- One angry orange exclamation mark has turned into a happy green box with a tick in it. One down one to go.
- We set up a password policy for our IAM users and the last orange exclamation mark bites the dust. We are once more complaint. Happy days.
- Next step: set up an IAM admin account so that we limit using the root account to a minimum... check
- Now we can log on to the AWS Management Console via the link:
https://your_aws_account_id.signin.aws.amazon.com/console/- We customise the link so that it doesn't show the account ID and we can log on via the link
https://your_account_alias.signin.aws.amazon.com/console/- We add this link as a note in our password manager
- We can also login directly via the password manager(!)
- RESULT:
- We can now use the IAM admin account instead of the AWS root account for work on AWS.
- God damned, not my password manager is having problems distinguishing between regular amazon login and AWS root account login. Gotta fix this.
- Ok, fixed. We continue on.
- Next we create the AWS buckets and set their settings per the tutorial's instruction:
- yourdomain.com
- www.yourdomain.com
- logs.yourdomain.com
- LEARNING MOMENT:
- The tutorial is very clear on the fact that this type of S3-bucket-based hosting is for static websites only. For dynamic content (or something as a Git server) we will need to set up a virtual server.
- Painful: we just wasted 30m trying to find the 'upload' action for one of the buttons. Turns out that the general S3 module starting page will show general actions only (who would've thought?), and that to get the bucket-specific actions you will first need to click one. Ouch.
- Interesting: we can create a folder structure (with ditto content) inside the buckets to match file references inside the html document.
- Continuing on with the 'Getting Started with AWS - Hosting a static website' guide we:
- Configure the buckets
- Deploy the website
- Register the domain name via the AWS Route 53 module
- Associate the domain name with the website
- We create a 'hosted zone' (sounds fancy) for the domain
- IMPORTANT:
- By creating a hosted zone a number (4) of Name Servers were generated. We will need this list of name servers in the 'registered domain' section to link the registered domain to the hosted zone.
- We create 'record sets' for the root domain and the subdomain)
- We setup a DNS provider
- This actually took me quite a while to understand
- We need to "log into the domain name registrar used to register your domain"
- This IS the Route 53 module of AWS
- Then we need to
- Use the web interface provided by the registrar to set the name servers for your domain to the name server values displayed under Name Servers in the details for the hosted zone.
- This is done by:
- going to the 'Registered Domains' section and clicking on yourdomain.com
- click Add/Edit Name Servers
- enter the name servers that were created for the hosted zone in the window which pops up
- It might take a while for these changes to propagate through the internet but essentially this is when you're done.
- RECAP MOMENT:
- We create buckets (in AWS S3) which correspond with a root domain and its subdomains respectively and contain the actual content of the website
- We register domains (in AWS Route 53)
- We create a hosted zone (in AWS Route 53) which acts as a in-between between the buckets and the registered domains
- Also: Task 1... COMPLETED! :-)