Documentation
Setting up AWS

Setting up AWS

Of course, the whole reason why you are interested in Blitzship is to save time on setting up your AWS infrastructure for your SaaS application. Naturally, however, you will still have to create an AWS account. The good thing is, that this will be the first and only time you will have to interact in-depth with the AWS console.

Later, we will use SST to manage, deploy and update all your AWS infrastructure. SST makes it easy to build modern full-stack applications on AWS. Watch the SST in 100 seconds (opens in a new tab) video to learn more about it.

But first, let's get started by creating an AWS account.

๐Ÿ“ง Register at AWS

The first step is to create an AWS account. Of course you can skip this if you already have one. Head over to the AWS homepage (opens in a new tab) and create your account.

๐Ÿ’ก

If you are a team and want to work together as efficiently as possible, you should use AWS SSO with separate stages for each team member. If that sounds interesting to you, follow this guide (opens in a new tab) instead.

๐Ÿค– Create IAM user for programmatic access

After having successfully registered at AWS you only have a so called "root user". This root user has full access to all AWS services and resources.

Now, we don't want to use the root user for developing our SaaS applications. Instead we'll create a new IAM user. This will allow programmatic access to AWS services over the CLI.

๐Ÿ’ก

IAM stands for Identity and Access Management. It's helpful when you, for example, want to give access to your AWS console to someone else, or when you have a new application that needs to make API calls to AWS.

๐Ÿ‘ถ๐Ÿผ Create user

First, log into the AWS console (opens in a new tab) with your root user you just registered as. In the console, in the top right corner, select the region closest to you and your customers.

Select AWS Region

Next, search for "IAM" in the search bar and select "Users".

Search for IAM

Now, click on "Create user".

Create user

On the following screen, enter a user name and select Next.

User name

๐Ÿ’ก

This account will be used by our AWS CLI and SST for developing and deploying our infrastructure. This means, our project will be connecting to the AWS API directly and we will not have to use the AWS Console.

Now AWS will allow you to attach permission policies to this newly-created IAM user. Select Attach policies directly, search for AdministratorAccess, select it and press next.

Permissions

On the next screen you simply have to re-confirm the settings and press on Create user. Once, created, click on View user.

View user

๐Ÿ”‘ Create an access key

To use this newly created IAM user programatically, you need to create an access key. First click on the Security credentials tab.

Security credentials

Then scroll down to the Access keys section and click on Create access key.

Create access key

Select the other use-case click on Next and optionally add a description.

Use case other

Now store the access and secret keys in a secure place. You will need them in the next steps.

Access keys

๐Ÿ’ก

Note that you will only be able to see the secret key once on this screen. If you lose it, you will have to create a new one.

๐Ÿ‘จ๐Ÿฝโ€๐Ÿ’ป Install AWS CLI

Now we finished setting up our IAM user. Next, we'll install the AWS CLI that will be used in the background by SST to interact with AWS.

๐Ÿ’ก

AWS CLI needs Python 2 version 2.6.5+ or Python 3 version 3.3+ and Pip. Use the following links if you need help installing Python or Pip: Installing Python (opens in a new tab), Installing Pip (opens in a new tab)

If you are using macOS, you can install the AWS CLI using Homebrew by running:

$ brew install awscli

If you are having some problems installing the AWS CLI or need Windows install instructions, refer to the complete install instructions (opens in a new tab).

๐Ÿ” Add access keys to AWS CLI

We now need to tell the AWS CLI to use the Access Keys for the IAM user we created. Simply run the following command in your terminal:

$ aws configure

It will ask you for those values. You can leave the default region name and default output format the way they are.

And that's finally it! I'm sorry you had to go through all this, but it's necessary for AWS and SST to work. Obviously, you only have to do this once.

Next up, we will set up all our environment variables.