A touch to serverless framework part 1
- 2021年6月21日
- Web Service
A few weeks ago, I wrote an article about serverless and today I will make a touch to serverless framework using node.js and AWS (Amazon web service). This is just a simple and getting started article how to use serverless framework. I will be using mac OS for the operating system.
I will divided the parts because this article might be long as the article includes screenshots. So lets get started.
First, we need to check the node version in your computer. Check with node – v in your computer. Then we will install the serverless framework using npm.
sudo npm install -g serverless
We will get a result like this at the end of installation.

You can test whether serverless is installed on your computer or not using serverless
or sls
.

Ok , now we need to create IAM at Amazon console panel. Lets see the steps in below.
Here is the IAM dashboard.

Then we will create a new IAM user to integrate with our serverless project.

Add a username and mark the checkbox on programmatic access. Then go to next step for permission.

We will grant the user for administrator access for now as we want to build services from serverless configuration later on.

As a final step, we will get a new IAM user with access key and secret access key. We will use these keys to setup credentials in our serverless project. Lets create credentials as below
serverless config credentials --provider aws --key YOUR-ACCESS-KEY --secret YOUR-SECRET-ACCESS-KEY

This will be the correct response after hitting the above command and now we have successfully created credentials with IAM user.
In the next week, I will be talking about creating a project and start deploying from our serverless project.
Yuuma
yuuma at 2021年06月21日 11:32:52