AWS Set up: Difference between revisions

From bibbleWiki
Jump to navigation Jump to search
Line 32: Line 32:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
serverless deploy --stage dev --verbose
serverless deploy --stage dev --verbose
</syntaxhighlight>
This will output with the following information
<syntaxhighlight lang="bash">
Service Information
service: <--- name of the service
stage: dev <--- the stage
region: ap-southeast-2
stack: <--- name of the thing created
resources: 29
api keys:
</syntaxhighlight>
</syntaxhighlight>

Revision as of 03:54, 18 February 2022

Introduction

This is the place where all of my setup I feel needs noting is done.

Serverless

There are some perquisites before starting

sudo npm install -g serverless  
sudo npm install -g serverless-bundle
sudo npm install -g aws-sdk
sudo npm install -g aws-cli

You will need to have a config file which defines your AWS Profiles to use

 [bibble-nz-prod]
 region=ap-southeast-2
 output=json

 [bibble-nz-nonprod]
 region=ap-southeast-2
 output=json

You will need to have a credentials file

 [bibble-nz-prod]
 aws_access_key_id=ABC1
 aws_secret_access_key=123

 [bibble-nz-nonprod]
 aws_access_key_id=ABC2
 aws_secret_access_key=456

We need to have a project to deploy. E.g. git clone myproject. From there we can deploy using

serverless deploy --stage dev --verbose

This will output with the following information

Service Information
service: <--- name of the service
stage: dev <--- the stage
region: ap-southeast-2
stack: <--- name of the thing created
resources: 29
api keys: