serverless-framework

How pass output values between aws nested stacks in serverless?

心不动则不痛 提交于 2019-12-08 02:04:16
问题 Here is readme about serverless-plugin-nested-stacks plugin. It makes possible to include nested stacks into main one. But how to pass values between stacks? For example I create a resouce in one nested stack - how to path it arn to another stack (nested or main one)? 回答1: First you will need to export the resources from the corresponding nested stack like this: AWSTemplateFormatVersion: '2010-09-09' Parameters: ... Resources: ... Outputs: o1: Description: ... Value: <your_resource_arn>

Breakpoints not being hit when debugging Serverless in vscode

≡放荡痞女 提交于 2019-12-07 15:05:15
问题 None of my breakpoints are active when debugging my serverless based application in VSCode. launch.json { "configurations": [ { "console": "integratedTerminal", "cwd": "${workspaceRoot}", "name": "Debug", "port": 5858, "request": "launch", "runtimeArgs": [ "run-script", "vscode:debug" ], "runtimeExecutable": "npm", "type": "node" } ], "version": "0.2.0" } My package.json ... "scripts": { ... "vscode:debug": "export SLS_DEBUG=* && node --inspect=5858 --debug-brk --nolazy ./node_modules/.bin

Serverless - Numpy - Unable to find good bind path format

雨燕双飞 提交于 2019-12-07 12:42:29
问题 I've been beating on this for over a week and been through all sorts of forum issues and posts and cannot resolve. I'm trying to package numpy in a function, individually building requirements (I have multiple functions with multiple requirements that I'd like to keep separate). Environment : Windows 10 Home Docker Toolbox for Windows : Client: Version: 18.03.0-ce API version: 1.37 Go version: go1.9.4 Git commit: 0520e24302 Built: Fri Mar 23 08:31:36 2018 OS/Arch: windows/amd64 Experimental:

Access AWS Resource Outside of VPC from Within VPC - Serverless Framework

和自甴很熟 提交于 2019-12-07 11:38:47
问题 I am trying to access a kinesis stream outside a VPC from a lambda function inside a VPC. Currently when the code to write to the kinesis stream is executed it will hang and then timeout. When I take the lambda out of the VPC the code to write to the stream works fine. But I need to access a resource within the VPC and then write to the stream. Anyone know how to fix this? Here is my function that is in the VPC functions: handleChanges: handler: functions/handlers.handleChanges timeout: 10

Invoke a lambda function with deployment using serverless framework

对着背影说爱祢 提交于 2019-12-07 05:04:35
问题 Is there a way to invoke a lambda function immediately after deployment using serverless framework. This function just creates the SNS Application, which is required to be done once only during setup. I can use serverless deploy stage && serverless invoke --function functionName but that won't tear down the setup if the function fails. I want it to be deployed as part of setup. Thanks 回答1: Hooks can be added to the lifecycle events of the Serverless framework. I used serverless-plugin-scripts

Multiple serverless files sharing the same api gateway

懵懂的女人 提交于 2019-12-07 01:00:28
问题 I am using serverless framework to build a REST API. I have reached the 200 limit stack size and read about the multiple approaches to circumvent it. The most common approach is to split the stacks in a "microservices fashion", where each stack handles a particular set of resources that make sense together. Because of how serverless works each of those services would create a new api gateway for itself and then, as explained in this blog post, a shared domain can be setup between them so all

AWS Lambda Task timed out after 6.00 seconds

淺唱寂寞╮ 提交于 2019-12-07 00:54:05
问题 I am using serverless framework. My Lambda function connects to DynamoDB table for updating item in table. Read & Write capacity units of table are 5 & auto_scaling is disabled. AWS Lambda function has 128MB memory allocated. I have used Jmeter for performance testing.I have sent 1000 requests concurrently and some response giving me perfect output while other giving internal server error(502 Bad Gateway). i have also analyzed cloudwatch for logs and only get Task Timeout error. can anyone

AWS API Gateway default response and Trigger AWS Lambda

℡╲_俬逩灬. 提交于 2019-12-06 14:04:28
I have been experimenting with AWS API Gateway and AWS Lambda to try out a serverless architecture. Have been going through blogs and AWS documentation. Have tried out sample GET/POST. But, I have the following requirement w.r.t tracking user events from my custom application Events are posted from my application to API end point I wanted the API to respond back with a custom response (Say {'fine'}) (acknowledging that the request has been received) After the response is sent, hand over the event payload to a AWS Lambda function As per the documentation, I understand, a) I can post events to

How pass output values between aws nested stacks in serverless?

半城伤御伤魂 提交于 2019-12-06 09:40:41
Here is readme about serverless-plugin-nested-stacks plugin. It makes possible to include nested stacks into main one. But how to pass values between stacks? For example I create a resouce in one nested stack - how to path it arn to another stack (nested or main one)? First you will need to export the resources from the corresponding nested stack like this: AWSTemplateFormatVersion: '2010-09-09' Parameters: ... Resources: ... Outputs: o1: Description: ... Value: <your_resource_arn> Export: Name: <your_export_name> To import the resource in other stack, you will need to use the intrinsic

How to properly connect AWS Lambda to RDS in VPC?

半腔热情 提交于 2019-12-06 08:25:35
问题 I am trying to build a graphQL API with Serverless Framework on AWS-Lambda using Apollo-Server-Lambda etc. I need to use a not publicly available PostgreSQL RDS instance. I can get lambdas up and running and sending back requests when not in VPC. I can get a Postgres RDS Database up and running and connected to PgAdmin (when in publicly available mode). The problem is once I make the RDS Postgres 'non public' and try to get all these pieces talking together I fail. I have tried multitude of