1.9.91 ā¢ Published 2 years ago
function-stencil v1.9.91
Welcome to function-stencil š
A quickstart AWS Lambda function code generator. Downloads a template function code file, test harness file, sample SAM definition and appropriate file structure.
Install
npm install function-stencil
Usage
function-stencil init
1. Choose the function runtime
? What runtime do you need? (Use arrow keys)
āÆ nodejs16.x
nodejs14.x
python3.9
java11
dotnet6
2. Provide a function name
Whats the function name? MyFunctionName
3. Choose a templating language snippet
? Choose one of the following templating languages for this runtime (Use arrow keys)
āÆ sam
terraform
4. Function code and file system is generated
MyFunctionName
ā function
ā ā£ events
ā ā ā event.json
ā ā£ app.js
ā ā£ env.json
ā ā£ harness.js
ā ā package.json
4. AWS SAM snippet is generated, drop this into the resource block of your SAM template.yaml
MyFunctionName:
Type: AWS::Serverless::Function
Properties:
CodeUri: MyFunctionName/function/
Handler: app.lambdaHandler
Runtime: nodejs14.x
Timeout: 3
Testing
Test your function locally by running harness.js
from the function directory:
> node harness.js
{ statusCode: 200, body: '{"message":"hello world"}' }
localTest: 7.998ms
Contributing
Author
š¤ Benjamin Smith
- Website: https://github.com/bls20AWS/function-stencil
- Twitter: @benjamin_l_S
- Github: @bls20AWS
Show your support
Give a āļø if this project helped you!
1.9.91
2 years ago
1.9.9
2 years ago
1.9.8
2 years ago
1.9.6
2 years ago
1.9.5
2 years ago
1.9.4
2 years ago
1.9.3
2 years ago
1.9.2
2 years ago
1.9.1
2 years ago
1.9.0
2 years ago
1.8.0
2 years ago
1.7.0
2 years ago
1.6.0
2 years ago
1.5.0
2 years ago
1.4.0
2 years ago
1.3.0
2 years ago
1.2.0
2 years ago
1.1.0
2 years ago
1.0.1
2 years ago
1.0.0
2 years ago