In this chapter we'll Amazon Web Services so that we have everything in place to work on our first Serverless applications.
At first you need to create an AWS account (if you haven't already). You can do this on their signup page.
The next thing we need to do is to create an AWS user which has administrative access to your account:
- Login to your AWS account
- Go to the Identity & Access Management (IAM) page
- Click on Users
- Click on Create New Users
- Enter serverless-admin and click Create
- Click on Download Credentials to download the .csv file with the AWS credentials
- Click Users on the left
- Click on the serverless-admin user
- Go to the Permissions tab
- Click Attach Policy and select the Administrator Access
- Click on Attach Policy
Done. We've now created an serverless-admin user which can do stuff in our AWS account on our behalf (thanks to the Administrator Access policy).
Note: This setup is not that safe for production environments as it gives the serverless-admin user full access to the AWS account. If you deploy your app in a production environment you should definitely reduce the rights for this user.
Serverless needs access to the AWS Access Key ID
and AWS Secret Access Key
so that it can work with the previously created AWS user.
At first you should download and isntall the AWS CLI. You can read how to do this here.
After you've done this you need to run
aws configure
To start the AWS CLI configuartion wizard. Follow this wizard and enter the corresponding AWS Access Key ID
and AWS Secret Access Key
.
Once done Serverless is able to use those keys and work with the help of the serverless-admin user.