🐈
tsdx-sls-aws
tsdx-sls-aws-lambda
This is a repository template to deploy only lambda function by Serverless Framework.
Description
This template is pre-build template by using TSDX and Serverless Framework.
Do the first!
- rename service name from tsdx-sls-aws-lambda to YOUR_SERVICE_NAME in serverless.yml and package.json
- Create these S3 buckets for deployment (recommended use AWS-CLI)
aws s3api --bucket YOUR_SERVICE_NAME-layers --region us-west-2 --create-bucket-configuration LocationConstraint=us-west-2
- rename the author in package.json
- Set the AWS Credential to GitHub secrets (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY)
Language
Typescript
Commands
"start": "tsdx watch",
"build": "tsdx build",
"test": "tsdx test",
"watch": "tsdx test --watch",
"debug": "tsdx test --debug",
"lint": "tsdx lint",
"prepare": "tsdx build",
"size": "size-limit",
"analyze": "size-limit --why",
"deploy:dev": "tsdx build && sls deploy",
"deploy:prod": "tsdx build && sls deploy -s production"
Continuous Integration
This template includes a GitHub action for deployment.
Set these values as GitHub.secrets to your repository.
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
Discussion