Preparations before attending to AWS Serverless Workshop
Prerequisites
Prepare AWS account
- Log in to AWS
- Go to Services -> Identity and Access Management
- Create new user - take note of the access key and secret
- Click on the new user and select the Permissions tab
- Attach the Administrator access policy to the user
Note: In real life scenarios, you would not assign administrator privileges but more fine-grained permissions.
Setting AWS Access on laptop
If you have installed the AWS CLI, the aws configure command is the fastest way to set up your AWS credentials. (http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html)
$ aws configure
AWS Access Key ID [None]: ExampleAccessKeyId
AWS Secret Access Key [None]: ExampleSecretAccessKey
Default region name [None]: us-east-1
Default output format [None]: json
Alternatively, you can add the credentials to your system manually:
- Create directory .aws to your home folder
- Copy file config to your .aws folder
- Copy file credentials to your .aws folder
- Enter the access key and secret key for your AWS account to the credentials file
Testing the setup
- Create directory workshop and under that new directory awstest
- Change directory to awstest, run npm install aws-sdk
- Copy file awstest.js to your awstest directory
- Run node awstest.js
You should get your IAM account name as a response if set up correctly.
Install Serverless Framework
- Run npm install -g serverless@1.16.0
- Run sls --version to verify installation