add a RemoteFlowSource for serverless handlers

This commit is contained in:
Erik Krogh Kristensen
2020-09-23 13:55:21 +02:00
parent 050ed97d9c
commit 1ed026fcce
14 changed files with 185 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
| tst1/backend/src/mylibrary.js:1:36:1:40 | event |
| tst2/nodejs/index.js:1:36:1:40 | event |
| tst3/function/index.js:1:36:1:40 | event |
| tst4/app.js:1:36:1:40 | event |
| tst5/app.js:1:36:1:40 | event |

View File

@@ -0,0 +1,3 @@
import javascript
query RemoteFlowSource remoteFlow() { any() }

View File

@@ -0,0 +1,3 @@
module.exports.handler = function (event) {
console.log(event);
}

View File

@@ -0,0 +1,19 @@
AWSTemplateFormatVersion: '2010-09-09'
Transform: 'AWS::Serverless-2016-10-31'
Description: 'Serverless thing'
Globals:
Api:
Cors:
AllowMethods: "'*'"
AllowHeaders: "'*'"
AllowOrigin: "'*'"
Resources:
OrderManagerJsFunction:
Type: 'AWS::Serverless::Function'
Properties:
FunctionName: MY-SERVERLESS-THING
Handler: mylibrary.handler
Runtime: nodejs12.x
CodeUri: backend/src/

View File

@@ -0,0 +1,3 @@
module.exports.handler = function (event) {
console.log(event);
}

View File

@@ -0,0 +1,18 @@
Transform: 'Aliyun::Serverless-2018-04-03'
Resources:
fc-mongo:
Type: 'Aliyun::Serverless::Service'
Properties:
Description: MyServiceThing
nodejs:
Type: 'Aliyun::Serverless::Function'
Properties:
Handler: index.handler
Runtime: nodejs10
CodeUri: nodejs/
python:
Type: 'Aliyun::Serverless::Function'
Properties:
Handler: 'index.handler'
Runtime: python3
CodeUri: python/

View File

@@ -0,0 +1,3 @@
module.exports.handler = function (event) {
console.log(event);
}

View File

@@ -0,0 +1,10 @@
AWSTemplateFormatVersion: '2010-09-09'
Transform: 'AWS::Serverless-2016-10-31'
Description: An AWS Lambda application.
Resources:
function:
Type: AWS::Serverless::Function
Properties:
Handler: index.handler
Runtime: nodejs12.x
CodeUri: function/.

View File

@@ -0,0 +1,3 @@
module.exports.handler = function (event) {
console.log(event);
}

View File

@@ -0,0 +1,12 @@
AWSTemplateFormatVersion: '2010-09-09'
Transform: 'AWS::Serverless-2016-10-31'
Description: A AWS Lambda function.
Resources:
helloworld:
Type: 'AWS::Serverless::Function'
Properties:
Handler: app.handler
Runtime: nodejs6.10
CodeUri: ./
Description: A AWS Lambda function.

View File

@@ -0,0 +1,3 @@
module.exports.handler = function (event) {
console.log(event);
}

View File

@@ -0,0 +1,11 @@
AWSTemplateFormatVersion: '2010-09-09'
Transform: 'AWS::Serverless-2016-10-31'
Description: A AWS Lambda function.
Resources:
helloworld:
Type: 'AWS::Serverless::Function'
Properties:
Handler: app.handler
Runtime: nodejs6.10
Description: A AWS Lambda function.