npm i create-aws-tf-lambda -g
or
yarn global add create-aws-tf-lambda
- Create a new user in the IAM Section on AWS here.
- Select Programmatic access below and enter your user details.
- Click next and select the admin group.
- Continue with the steps until you reach the Create User section and confirm the user has been created. Once the user is created you will get an Access key ID and Secret access key.
- Open terminal and run
$ aws configure
. Paste access key id and secret access key from step 4
or create a file called instance.tf with the following code.
provider "aws" {
access_key = "ACCESS_KEY_HERE"
secret_key = "SECRET_KEY_HERE"
}
Download Terraform here and follow the guide here on how to install Terraform on your specific system.
To create a new lambda run the following command
create-aws-tf-lambda
Argument | Description | |
---|---|---|
-n, --new | Creates a new project | |
-a, --add | Adds a new lambda. Use -a sfn to add a step function | |
-h, --help | Prints the usage guide | |
-o, --org | Moves all your lambdas to one project [mono project] |
MIT