AWS Account Setup
Lesson 3
You will need to create an AWS account and do a few basic account setup steps in the AWS console before moving forward. If you already have an AWS profile configured in your terminal, you can skip this section entirely and move on to the next section: Terraform.
Table of contents
- AWS Account Setup
- Create an Account
- Create an admin group
- Create an admin user
- Install the AWS CLI
- Add your AWS profile
- Next Steps
Create an Account
- Navigate to this page and click
Create a new AWS account
. - Follow the instructions to complete your account set up.
For more detailed instructions, you can follow AWS’ Account Creation Guide.
Create an admin group
Before you can create a user with the correct access, you will need to create an admin user group.
- Sign in to your AWS account here.
- Click
Services
in the top left corner of the home screen. Type inIAM
in the search and click the first result in the dropdown. - On the left-hand side navigation bar, click
Groups
. - Click the blue
Create New Group
button at the top of the table. - Specify a group name: AdminUsers, then click the blue
Next Step
button on the bottom right. - Check the
AdministratorAccess
policy, then click the blueNext Step
button. - Click
Create Group
on the bottom right.
Create an admin user
Now you need to add an admin user to the group you just created.
- On the left-hand side navigation bar, click
Users
. - Click the blue
Add User
button at the top of the table. - Create a unique username that you will remember (yourNameAdmin, or something similar).
- Check the
Progromatic access
box, then clickNext: permissions
on the bottom right. - Check the
AdminUsers
group you created in the previous step, then click the blueNext: tags
button on the bottom right. - You do not need to enter any tags, you can click
Next: Review
. - Click
Create User
. - Your
Access key ID
andSecret access key
are both available here. You need to keep these secure. Copy and paste them somewhere for now so you can access them easily. You will not be able to see yourSecret access key
again.
Do not share these keys with anyone. Do not permanently store these keys anywhere. We are going to configure a profile in our terminal, then delete them.
- Now that you have your keys, you need to navigate to one more section before we add them as a profile in your terminal.In your user summary, click the
Security credentials
tab. - Where is says
Console password
, clickManage
, thenEnable
. You can create your own password or have AWS generate a secure one for you. Either way, save your password so you can easily sign in later on. - Open a new tab and paste in the
Console sign-in link
shown to you. Bookmark this page for alter use. When we tell you to sign-in to your AWS account, this is the link you need to use.
Install the AWS CLI
Now you need to install the awscli. Choose your operating system from the list and follow the instructions to install the AWS CLI. You can see the commands for installing the CLI in the terminal
below.
For Linux operating systems
Open your terminal. Then, cd
so that you are in your home directory. Then, paste the following into your terminal:
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install
This should install the AWS CLI v2.
For Mac operating systems
Open your terminal. Then, cd
so that you are in your home directory. If you have sudo permissions, paste the following into your terminal:
curl "https://awscli.amazonaws.com/AWSCLIV2.pkg" -o "AWSCLIV2.pkg"
sudo installer -pkg AWSCLIV2.pkg -target /
This should install the AWS CLI v2. If you do not have sudo permissions, follow the instructions found here.
For Windows operating systems
Follow the instructions found in the first link above by clicking Windows
.
Add your AWS profile
Now that you have a set of access keys and an admin user as well as the AWS CLI installed, you need to store an AWS profile in the terminal, so that all commands you run to interact with AWS will know which account (yours!) to use and deploy resources to. Now you need to add a default profile with your admin user’s access keys. You can follow the instructions here, or follow along below.
- In the terminal, type
aws configure --profile adminuser
- Enter all of the below info into your terminal as it asks.
This command will create a profile called adminuser
, and prompt you to enter your:
AWS Access Key ID
- this is the first access key you got when you set up your userAWS Secret Access Key
- this is the second access key you got, that was hidden at first, when you set up your userDefault region name
- this is the region you plan to deploy your resources to with this profile (us-east-1 is a good one)Default output format
- this is the output format you want. Enterjson
or just clickenter
to skip.- Note: I deleted the above access and secret keys so I am not sharing sensitive information in the above gif.
Next Steps
Now you’re done setting up your AWS account! Next, you’ll get started with Terraform–the Infrastructure as Code tool that will make deploying resources to AWS reusable, scalable, and sustainable!