Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 16 2019 18:39

    carlosandrebp on master

    upload email icon (compare)

  • Jan 15 2019 14:03

    carlosandrebp on master

    Icons update (compare)

  • Nov 13 2018 16:54
    hassankhan commented #3
  • Nov 02 2018 15:10
    hassankhan commented #3
  • Nov 02 2018 15:10
    hassankhan commented #3
  • Nov 01 2018 23:19
    hassankhan commented #3
  • Oct 29 2018 16:32
    hassankhan commented #3
  • Oct 24 2018 14:38
    hassankhan opened #3
  • Aug 14 2018 23:50

    carlosandrebp on master

    updates animations (compare)

  • Jul 19 2018 16:34
    brianneisler closed #1
  • Jul 19 2018 16:34
    brianneisler commented #1
  • Jul 18 2018 16:36

    andrepiresbp on master

    Updates (compare)

  • Jul 18 2018 15:50

    andrepiresbp on master

    Update (compare)

  • Jul 09 2018 19:25
    gornostal commented #59
  • Jul 09 2018 19:12
    maheshmasale commented #59
  • May 24 2018 23:39
    DavidWells removed as member
  • Feb 13 2018 19:40
    ivan-myob commented #54
  • Feb 08 2018 08:48
    julien2x opened #62
  • Dec 22 2017 16:14
    awcheng opened #61
  • Oct 23 2017 19:12
    dluu2015 closed #60
Jorge Haddad
@jorgejch
Bit confused in which service account does a deployed Google Cloud Function uses. Would like to set my own. Is there a way to do that in serverless.yml?
Prasannakshi Grandhe
@Prasannakshi
Hi. I would like to add this event type in Serverless.yml file. https://aws.amazon.com/blogs/compute/introducing-aws-lambda-destinations/
Please let me know what is the syntax of this event type
rob
@sudosoul
Hi all, is it possible to cast/convert a boolean to a string?

I'm reading & assigning values from a config.yml file, which uses booleans to indicate whether a function should be deployed or not. From there, I am using the serverless-plugin-ifelse plugin to conditionally exclude functions from my serverless.yml. The issue is that apparently it requires a string on the left hand condition when referencing a variable.

Getting error - "Trying to populate non string value into a string for variable ${strToBool(false)}"

I have to use the strToBool utility because sometimes the boolean property isnt always set in the config.yml (indicating the function should not be deployed).

rob
@sudosoul
custom:
  config: ${file(${opt:configFile})}
  myLambdaFunction: ${strToBool(${self:custom.config.functions.myLambdaFunction.active, 'false'})}

  serverlessIfElse:
    - If: '"${self:custom.myLambdaFunction}" == "false"'
        Exclude:
          - functions.myLambdaFunction
Or does anyone know of a better way to do conditionals?
Miguel Espinoza
@purefan
@sudosoul You can actually get the computed values from a js file, https://serverless.com/framework/docs/providers/aws/guide/variables/#reference-variables-in-javascript-files so you can move the logic to an actual JS function
James Drawneek
@jmdrawneek
Does anyone know how to throttle lambda executions? I've been looking at reservedConcurrency but it appear that kills the exec when it goes over rather than queuing them
rob
@sudosoul
@purefan yeah thats what im thinking too, but wanted to avoid, and keep everything contained within serverless.yml -- but tyy
Randy Yang
@randyyaj
Why does the serverless-plugin-typescript with kubeless+serverless cause serverless to error out with TypeError: Cannot read property 'split' of undefined?
When I remove it serverless deploy works just fine
This only happens when I add chained_seq to my serverless.yml
Miguel Espinoza
@purefan
@jmdrawneek How about queueing every request into SQS and limiting that instead? (https://dzone.com/articles/creating-aws-service-proxy-for-amazon-sqs)
Rahul Roy
@iamrahulroy

Hello, everyone! Just wanted to get expert opinion.

Problem: I have interdependent processes. What would be the appropriate way to architect it? Series of lambda functions invoking each other through SQS? For example, function 1 invoked by SQS1 and pushed data to SQS2, which invokes function 2 and so on.

SQS queue 1 --> Invokes Function 1 --> output goes to SQS queue 2 --> Invokes Function 2 --> SQS queue 3 ....

Elliot Blackburn
@BlueHatbRit

Hey, I don’t know if this is the best place to ask this but I’m looking at making a contribution to serverless with a few package updates to clear up a few security updates to various sub-dependencies. One of them would involve an update to the “boxen” dependency from 3.2.0 to the next version which is 4.x. In the 4.x update there was a change that made it require node 8+.

I can see from the travis build the project is still testing on node 6. Are there plans to remove node 6 support at any time? Would the project be open to some package updates that break node 6 support to get rid of some security issues in sub dependencies? I only ask as node 6 is out of LTS support with the node project now.

Ben Halverson
@benhalverson
wow Node 6 was EOL a while ago and Node 8 is at the end of this month. I'm no maintainer but I would update it :thumbsup: @BlueHatbRit what could possibly go wrong :D
Jaroslaw Groscyk
@JGroscyk
Hi all. I've an urgend question about the generated function policy by serverless. when i add a s3 event in my serverless.yml it will generate a function policy without a sourceAccount condition. When i create my own lambda permission in the resources section with a sourceAccount-propertiy, it just appends a new statement and aws-config still marks my my lambda as noncomplient because of 'lambda-function-public-access-prohibited Actions' rule. Any suggestions appreciated
Foo:
    handler: handler.hello
    events:
      - s3:
          bucket:demo-bucket
          event: s3:ObjectCreated:*
          rules:
            - prefix: filesPng/
            - suffix: .png
          existing: true
...
resources:
  Resources:
    FooLambdaPermission:
      Type: "AWS::Lambda::Permission"
      Properties: 
        Action: lambda:InvokeFunction
        FunctionName:
          'Fn::GetAtt':
            - FooLambdaFunction
            - Arn
        Principal: "s3.amazonaws.com"
        SourceArn: arn:aws:s3:::demo-bucket
        SourceAccount:
          Ref: "AWS::AccountId"
Elliot Blackburn
@BlueHatbRit
@benhalverson looks like the PR was rejected as they wish to keep node 6 support until they release serverless v2 ¯_(ツ)_/¯
ankitnitt15
@ankitnitt15
@JGroscyk i am also facing the same issue, the source account id is missing from the generated function policy by serverless when an event is attached to lambda function, this is causing the compliance issue. Please let me know if you find a way to solve this. Thanks
Miguel Espinoza
@purefan
@iamrahulroy I guess it depends on how often these processes trigger, if its sort of infrequent then invoke-ing other lambdas may be fine, but if they trigger frequently you could profit from batch processing by using a SQS queue
@BlueHatbRit The slack channel is pretty busy, so while Gitter works, Id say you're more likely to get more attention on slack
viswaroop vadlamudi
@vviswaroop
Hey Everyone, am new to serverless framework. And am in process of putting a design model for deploying lambda functions using serverless framework, looking for some suggestions/pros & cons of deploying multiple functions in a single serverless.yml file and deploying functions individually.
Ryan Grimm
@ryangrimm_gitlab
@vviswaroop For our project, we put all of the lambda functions that are a part of one service together for deployment at the same time. If you're using micro services, each micro service would have it's own yml file that deploys all the lambda functions for that service at once.
viswaroop vadlamudi
@vviswaroop
even my first priority would be to deploy all the functions together in a single yml file. But am thinking in terms of deployment times. inorder to deploy 30-40 functions in a single yml file will take close to one hour of time. and also if there is any change to one function, we've to deploy/update all the functions. These are some of the pros & cons am considering.
Dorian Machado
@dorian599

Hello @vviswaroop , if you are handling all in one .yml file and wants to speed up the deployment time, what you can do is to deploy "only the function that has new changes" as you can see in the Framework documentation

https://serverless.com/framework/docs/providers/aws/guide/deploying/#deploy-function

Larry Tambascio
@LiaisonLarry
CognitoExports2.jpg

Hi all!! I'm working on a multi-stack deployment. One stack will have Cognito and some basic authentication endpoints to retrieve a token, and I'm exporting Cognito, as you can see in the image. In the other stacks I'm trying to import that like this:

  CognitoUserPool:
    Fn::ImportValue:
      Fn::Sub "${cf:CAS-API-AUTH${opt:service-suffix,''}-${self:provider.stage}.CognitoUserPool}"

When I go to deploy, I see the following:

$ sls deploy -s dev --service-suffix Larry
Serverless Error ---------------------------------------
Trying to request a non exported variable from CloudFormation. Stack name: "CAS-API-AUTHLarry-dev" Requested variable: "CognitoUserPool".

It looks like it's trying to import the variable that's there, but it can't find it. I'm not sure what I'm doing wrong. Thanks in advance!!

Dorian Machado
@dorian599
Hello @LiaisonLarry in the remote CloudFormation Stack, did you set up the necessary Outputs to be retrieved from the serverless Framework ?
Larry Tambascio
@LiaisonLarry
@dorian599 Yes:
Outputs:
  UserPoolId:
    Value:
      Ref: CognitoUserPool
    Export:
      Name: CognitoUserPool
James Dixon
@jamesdixon
Hi Everyone! Is anyone here using Node + Knex.js in their Serverless functions? I'm getting a lot of "connection terminated unexpectedly" errors and it only seems to happen with the Lambda environment. Curious if it's related to Knex's pooling.
Rahul Roy
@iamrahulroy

@iamrahulroy I guess it depends on how often these processes trigger, if its sort of infrequent then invoke-ing other lambdas may be fine, but if they trigger frequently you could profit from batch processing by using a SQS queue

Yes, it's frequent and that is why we choose SQS.

Richard Rich Steinmetz
@RichStone
PATCH method not found.png
Hey there, PATCH method seems not to be defined in the serverless IDE
but the function runs through for now. Any possible side effects, if I still use it?
serverless framework shouldn’t have anything against the PATCH method either, right?
Richard Rich Steinmetz
@RichStone

or maybe with other words:

does anybody use PATCH method in serverless.yml ?
:)

Michael Bishop
@bishopandco
Can you specify a logStream in a log group on AWS?
I am trying to write to specific log group and logstream in CloudWatch
Patrick Rainier Juen
@uLan08
is there a way to define the function app name for azure functions?
lucasgnavarro
@lucasgnavarro
@RichStone method: patch works for me
Robb
@robbdempsey
is there a way to add a target to an existing AWS::Events::Rule?
Jeremy Corson
@nexeh

I've been using the serverless framework for some time now. With it I use the serverless wsgi to invoke a serverless flask application for handling my API. Recently I started a new project following the same pattern but this time the API has a cognito authorizer. When working with this I was having a hard time getting cognito to work unless I added the integration attribute as lambda inside of the HTTP event.

functions:

  api:
    handler: wsgi_handler.handler
    events:
      - http:
          path: /api
          method: ANY
          cors: true
          integration: lambda
          authorizer:
            type: COGNITO_USER_POOLS
            authorizerId:
              Ref: ApiGatewayAuthorizer
      - http:
          path: /api/{proxy+}
          method: ANY
          cors: true
          integration: lambda
          authorizer:
            type: COGNITO_USER_POOLS
            authorizerId:
              Ref: ApiGatewayAuthorizer

At that point I thought I was golden but I realized that really I was getting a new error message returned from The serverless_wsgi.py. Digging into this file what I have learned was that the path info that's attached to the event seems to be different than what was expected. Resulting in the error message that kills the whole thing.

    # If a user is using a custom domain on API Gateway, they may have a base
    # path in their URL. This allows us to strip it out via an optional
    # environment variable.
    path_info = event[u"path"]
    base_path = os.environ.get("API_GATEWAY_BASE_PATH")
    if base_path:
        script_name = "/" + base_path

        if path_info.startswith(script_name): # ERROR HERE: 'dict' object has no attribute 'startswith'
            path_info = path_info[len(script_name) :]

path info in this scenario is {'proxy': 'devices'} instead of /path/to/resource

So my question to the room is that I'm curious if anyone has done this or if I'm on an edge case? Or have I just overlooked something? I'm not sure what information to provide but I am using a custom domain and base path.

Robb
@robbdempsey
@nexeh have your tried referencing the user pool ARN directly?
authorizer:
  name: authorizer
  arn: arn:aws:cognito-idp:< region >:< account >:userpool/< userPoolId >
Mike Morrison
@mike-morr
Anyone know why serverless create --template aws-go --path serverless generates all empty files?
Dorian Machado
@dorian599
Mr @mike-morr I executed your command and i got files populated files and directories
image.png
My framework version is Framework Core: 1.61.3
Mike Morrison
@mike-morr
@dorian599 Thanks for trying it out. I am on the same version, but that is not the output I see. I only see the first 2 lines of your output and all of the files get created, but they are all empty
Jeremy Corson
@nexeh
@robbdempsey I did not because i had no issue setting up the api to be authenticated. it was clearly authenticating the quest but just limiting it to certain http methods. i put more detail in the forum post: https://forum.serverless.com/t/api-gateway-secured-with-cognito-supported-by-serverless-wsgi-flask/10371 I will give that a try once im back to my laptop tho to see if that makes any difference