serverless-framework

What is “hellostepfunc1” in the serverless documenation for setup AWS stepfunctions?

China☆狼群 提交于 2021-02-11 15:00:26
问题 In these documentation from the serverless website - How to manage your AWS Step Functions with Serverless and GiTHUb - serverless-step-functions, we can find this word hellostepfunc1: in the serverless.yml file. I could not find reference to it. I dont understand what is it, and I can't find any reference to it, even after the State Machine was created into AWS. If I delete it I get the follow error Cannot use 'in' operator to search for 'role' in myStateMachine But if I change its name for

What is “hellostepfunc1” in the serverless documenation for setup AWS stepfunctions?

安稳与你 提交于 2021-02-11 14:59:01
问题 In these documentation from the serverless website - How to manage your AWS Step Functions with Serverless and GiTHUb - serverless-step-functions, we can find this word hellostepfunc1: in the serverless.yml file. I could not find reference to it. I dont understand what is it, and I can't find any reference to it, even after the State Machine was created into AWS. If I delete it I get the follow error Cannot use 'in' operator to search for 'role' in myStateMachine But if I change its name for

AWS Lambda doesn't recognize NODE_EXTRA_CA_CERTS

六眼飞鱼酱① 提交于 2021-02-11 14:33:05
问题 I'm using the serverless framework and I'm trying to reference a bundled certificate in a lambda function for some API calls. Locally, when setting and pointing NODE_EXTRA_CA_CERTS to my cert, everything works as it should. I've configured an environment variable for NODE_EXTRA_CA_CERTS with my lambda and point it to the bundled cert as follows in my serverless.yml , but the AWS node environment doesn't pick it up: provider: name: aws region: us-east-2 runtime: nodejs12.x endpointType:

How to implement redirect (301 code) mock in serverless framework config (for AWS) without lambda

邮差的信 提交于 2021-02-10 20:12:56
问题 I'd like that the root path of my API redirect (301) to completely another site with docs. So I have a lambda at e.g /function1 path and the / should return code 301 with another location. And I'd like to do it without another lambda. This is exactly what is described here, but via aws command line tool. I tried this approach - it works perfectly, but I'd like to configure such API gateway mock via serverless framework config. 回答1: Fortunately, the series of CLI commands you linked to can be

How to implement redirect (301 code) mock in serverless framework config (for AWS) without lambda

六月ゝ 毕业季﹏ 提交于 2021-02-10 20:10:02
问题 I'd like that the root path of my API redirect (301) to completely another site with docs. So I have a lambda at e.g /function1 path and the / should return code 301 with another location. And I'd like to do it without another lambda. This is exactly what is described here, but via aws command line tool. I tried this approach - it works perfectly, but I'd like to configure such API gateway mock via serverless framework config. 回答1: Fortunately, the series of CLI commands you linked to can be

Serverless+Webpack: include .pem files in ZIP

僤鯓⒐⒋嵵緔 提交于 2021-02-08 10:57:29
问题 I try to deploy my lambda function to AWS using serverless. Everything works fine but the function cannot be executed because two files are not found (thats what fs.readFileSync says). I include them with the following lines in the serverless.yml: provider: name: aws runtime: nodejs10.x stage: dev region: eu-central-1 package: exclude: - .env include: - src/config/push-cert.pem - src/config/push-key.pem When I look in the .zip file which is uploaded to S3, both .pem files are not included. I

DynamoDB queries on secondary index, how to define the indexes

拈花ヽ惹草 提交于 2021-02-07 18:09:23
问题 I've been going around and around this and it's just not clear what to do. I have a simple table where I want to make queries against several columns. As I understand it, that means creating a secondary index for each column there is to query against. I've defined the table -- using the Serverless framework serverless.yml -- and am getting a variety of strange error messages. The current serverless.yml definition is: resources: Resources: MessagesDynamoDBTable: Type: 'AWS::DynamoDB::Table'

DynamoDB queries on secondary index, how to define the indexes

这一生的挚爱 提交于 2021-02-07 18:07:34
问题 I've been going around and around this and it's just not clear what to do. I have a simple table where I want to make queries against several columns. As I understand it, that means creating a secondary index for each column there is to query against. I've defined the table -- using the Serverless framework serverless.yml -- and am getting a variety of strange error messages. The current serverless.yml definition is: resources: Resources: MessagesDynamoDBTable: Type: 'AWS::DynamoDB::Table'

How do I define resources for iamrolestatements for multiple dynamodb tables in serverless framework?

馋奶兔 提交于 2021-02-06 15:15:39
问题 I want to use more than one dynamodb table in my serverless project. How do I properly define multiple resources in the iamrolestatements? I have an example serverless.yml service: serverless-expense-tracker frameworkVersion: ">=1.1.0 <2.0.0" provider: name: aws runtime: nodejs6.10 environment: EXPENSES_TABLE: "${self:service}-${opt:stage, self:provider.stage}-expenses" BUDGETS_TABLE: "${self:service}-${opt:stage, self:provider.stage}-budgets" iamRoleStatements: - Effect: Allow Action: -

Failed to decode downloaded font on lambda production app

六眼飞鱼酱① 提交于 2021-01-29 09:59:11
问题 I am trying to deploy an angular web app to amazon lambda with the serverless module. When I run the app in local everything works fine. The problem comes up when I deploy the app to AWS. Once the app is deployed, the app is working fine but some fonts appear to be missing and do not display correctly. This are the warnings that come up in the Chrome developer console: Failed to decode downloaded font: <URL> OTS parsing error: Size of decompressed WOFF 2.0 is less than compressed size OTS