serverless-framework

Serverless Framework Login From Behind a Proxy?

廉价感情. 提交于 2020-01-15 11:17:48
问题 I am trying to use the serverless framework from behind a proxy. I was able to install the framework after configuring npm to use my certs file: npm config set cafile C:\path\to\certs.pem npm install serverless --global However, when I try to login to serverless I get the following error: serverless login Fetch Error -------------------------------------------- FetchError: request to https://api.serverless.com/core/tokens failed, reason: unable to get local issuer certificate at ClientRequest

Serverless Framework Login From Behind a Proxy?

橙三吉。 提交于 2020-01-15 11:17:08
问题 I am trying to use the serverless framework from behind a proxy. I was able to install the framework after configuring npm to use my certs file: npm config set cafile C:\path\to\certs.pem npm install serverless --global However, when I try to login to serverless I get the following error: serverless login Fetch Error -------------------------------------------- FetchError: request to https://api.serverless.com/core/tokens failed, reason: unable to get local issuer certificate at ClientRequest

Map request into aws service without lambdas and using AWS service proxy integration on Api Gateway

倖福魔咒の 提交于 2020-01-14 06:19:59
问题 So i've got a scenario that i want to use an endpoint and map the provided requests directly into Kinesis stream. I was able to do that manually in the aws console. But is there a way to do change the integration to aws service using serverless or serverless plugin? I tried to find a way to deploy an endpoint that communicates directly with an aws service, without lambdas, and could not find it. 回答1: It's been a while but recently i noticed that there's a plugin now that helps setup this

serverless framework, typescript, nodejs and mysql - Error: Received packet in the wrong sequence

微笑、不失礼 提交于 2020-01-14 02:33:13
问题 When invoking a function with using mysqljs/mysql as installed with npm install --save-dev mysql I get the following error and trace. { "errorMessage": "RequestId: be7822cc-8e1d-11e8-83b8-a1383ecfa1de Process exited before completing request" } -------------------------------------------------------------------- START RequestId: be7822cc-8e1d-11e8-83b8-a1383ecfa1de Version: $LATEST 2018-07-22 19:11:46.308 (-07:00) be7822cc-8e1d-11e8-83b8-a1383ecfa1de Error: Received packet in the wrong

API timeouts in AWS Lambda?

戏子无情 提交于 2020-01-05 08:22:13
问题 I'm trying to create a lambda function in AWS which will create a new Stripe token: import stripePackage from 'stripe'; const stripe = stripePackage('...'); module.exports.create = (event, context, callback) => { stripe.tokens.create({ card: { "number": 4242424242424242, "exp_month": '02', "exp_year": '22', "cvc": '123' } }, (err, token) => { if (err) { console.log(err); callback(null, { statusCode: 400, body: "error" }); } callback(null, { statusCode: 200, body: "ok" }); console.log(token);

Serverless offline not getting route

∥☆過路亽.° 提交于 2020-01-04 04:08:09
问题 I have a serverless project that I just newly initialized: severless.yml : service: lambda provider: name: aws runtime: nodejs8.10 region: us-east-1 functions: hello: handler: handler.hello events: - http: path: /hello method: GET plugins: - serverless-offline And I run it with sls offline --port 8080 : Serverless: Starting Offline: dev/us-east-1 Serverless: Routes for hello: Serverless: GET /hello Serverless: Offline listening on http://localhost:8080 and in my handler.ts module.exports

AWS API Gateway default response and Trigger AWS Lambda

百般思念 提交于 2020-01-02 10:18:12
问题 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

Serverless WARNING: Could not determine version of module babel-runtime

泪湿孤枕 提交于 2020-01-02 04:55:11
问题 I'm running sls deploy and getting the following warning that spams many lines. Serverless: WARNING: Could not determine version of module babel-runtime Serverless: WARNING: Could not determine version of module babel-runtime Serverless: WARNING: Could not determine version of module babel-runtime Serverless: WARNING: Could not determine version of module babel-runtime Serverless: WARNING: Could not determine version of module babel-runtime ... What is the cause of this warning, should I be

How do I setup email configuration for aws cognito user pools?

 ̄綄美尐妖づ 提交于 2020-01-01 11:25:07
问题 I am not sure how to setup the "EmailConfiguration" part of the serverless cloudformation resource section. Does anyone have an example on how to do this? Any guidance would be much appreciated! Here is my serverless.yml file. service: cognito-email-config provider: name: aws runtime: nodejs6.10 region: us-east-1 plugins: - serverless-stack-output custom: output: handler: serverless/output.handler file: outputs/stack.json functions: preSignUp: handler: serverless/preSignUp.handler

API Gateway HTTP Proxy integration with serverless-offline (NOT Lambda Proxy)

瘦欲@ 提交于 2019-12-31 02:24:07
问题 I am trying to use serverless-offline to develop / simulate my API Gateway locally. My API gateway makes liberal use of the HTTP proxy integrations. The production Resource looks like this: I have created a serverless-offline configuration based on a few documents and discussion which say that it is possible to define an HTTP Proxy integration using Cloud Formation configuration: httpProxyWithApiGateway.md - Setting an HTTP Proxy on API Gateway by using Serverless framework. Setting an HTTP