Link Search Menu Expand Document

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

  1. AWS Account Setup
  2. Create an Account
  3. Create an admin group
  4. Create an admin user
  5. Install the AWS CLI
    1. For Linux operating systems
    2. For Mac operating systems
    3. For Windows operating systems
  6. Add your AWS profile
  7. Next Steps

Create an Account

  1. Navigate to this page and click Create a new AWS account.
  2. 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.

  1. Sign in to your AWS account here.
  2. Click Services in the top left corner of the home screen. Type in IAM in the search and click the first result in the dropdown.
  3. On the left-hand side navigation bar, click Groups.
  4. Click the blue Create New Group button at the top of the table.
  5. Specify a group name: AdminUsers, then click the blue Next Step button on the bottom right.
  6. Check the AdministratorAccess policy, then click the blue Next Step button.
  7. 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.

  1. On the left-hand side navigation bar, click Users.
  2. Click the blue Add User button at the top of the table.
  3. Create a unique username that you will remember (yourNameAdmin, or something similar).
  4. Check the Progromatic access box, then click Next: permissions on the bottom right.
  5. Check the AdminUsers group you created in the previous step, then click the blue Next: tags button on the bottom right.
  6. You do not need to enter any tags, you can click Next: Review.
  7. Click Create User.
  8. Your Access key ID and Secret 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 your Secret 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.

  1. 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.
  2. Where is says Console password, click Manage, then Enable. 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.
  3. 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.

  1. In the terminal, type aws configure --profile adminuser
  2. Enter all of the below info into your terminal as it asks.

aws-configure-2

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 user
  • AWS Secret Access Key - this is the second access key you got, that was hidden at first, when you set up your user
  • Default 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. Enter json or just click enter 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!