Use Starter Kit

We will use the starter kit to configure our environment. This has an install.sh script which installs various packages and copies several configuration files automatically.

Clone Starter Kit

Switch to a folder where you want to clone the starter kit to. Below we clone to a folder named src under home folder.

$ cd ~/src
$ git clone https://github.com/AWSMagic/lambda-typescript-vscode-starter-kit.git
$ cd lambda-typescript-vscode-starter-kit

About Installer Script

Installer install.sh accepts three attributes.

-r: root folder
-a: application name
-f: function name
-b: s3 bucket name, you must create this bucket in advance
-p: AWS CLI profile name

Sample Usage:

$ ./intsall.sh -r ~/src -a appOne -f functionOne -b ozlambdabucket -p lambdadev

The command above is going to create appOne folder under ~/src folder. Then it will create functionOne folder under ~/src/appOne folder. Root folder has to exist in order to run the install.sh script. Other two folders are going to be created by the install.sh script.

Run Installer

If this is the first time you are running this script it will download the docker image required to run lambda function locally. This may take a while to complete.

You will see the output below.

As seen above install.sh ran the functionOne lambda function locally to test the installation. If you don't see the "{\n \"key1\": \"value1\",\n \"key2\": \"value2\",\n \"key3\": \"value3\"\n}" at the end of the logs, you might have a problem with the installer.

Last updated