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
Eduardo Hitek
@eduardohitek

```package main

import (
"context"
"log"
"os"

"github.com/aws/aws-lambda-go/events"
"github.com/aws/aws-lambda-go/lambda"

)

// Handler is our lambda handler invoked by the lambda.Start function call
func Handler(ctx context.Context, sqsEvent events.SQSEvent) error {
log.Println("SQS Event", sqsEvent)
for _, v := range sqsEvent.Records {
log.Println(v.Body)
}
return nil
}

func main() {
lambda.Start(Handler)
} ```

Eugene Aiken
@eugene-aiken-bytecode
Can anyone help me understand why I'm getting the following error when I try to invoke my function
Error: Call argument for function sf-2-at-pipeline-2-dev-salesforce is not a valid JSON object
    at Gaxios._request (/Users/eugene.aiken/sf_2_at_pipeline/node_modules/gaxios/build/src/gaxios.js:129:23)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async UserRefreshClient.requestAsync (/Users/eugene.aiken/sf_2_at_pipeline/node_modules/google-auth-library/build/src/auth/oauth2client.js:343:18)
Victor Villacis
@Victor-Villacis
How can I set aws secrets in the framework. I don't want to use environment variables. Can anyone advise or point me in the right direction?
2 replies
Len Boyette
@kevlened

Is Fargate still the best way to run long-running, resource intensive background tasks? I found this post, but it's from 2018.

How are people doing this today?

1 reply
Jeff Tucker
@jedatu_twitter

Would someone be able to provide more description for what the general provider setting "tracing" does?

  tracing:
    # Can only be true if API Gateway is inside a stack.
    apiGateway: true
    # Optional, can be true (true equals 'Active'), 'Active' or 'PassThrough'
    lambda: true

Does this enable X-Ray on all lambdas and render the serverless-plugin-tracing unecessary? In fact, the plugin is not compatible with the new config format (alex-murashkin/serverless-plugin-tracing#23)

4 replies
Jeff Tucker
@jedatu_twitter

I am getting a schema validation error trying to do the following in the serverless.yml file:

environment: ${file(serverless/config/environment.yml)}

The error is Incorrect type. Expected "Aws.Environment"
The format of the external file is just a simple list of key: value pairs. I tried nesting them under various keys such as additionalProperties but the validation did not work. Is this possible?

Reik Schatz
@reikje
can someone point me to an example of how to use the ecr integration with typescript. The Dockerfile needs to copy package.json and the js files into the image. However, the transpiler and packaging part is done using the serverless-esbuild plugin. Is there a good way to reuse the output from this plugin in the Dockerfile?
qvagroup
@qvagroup

Hello i have this issue

{
"errorType": "string",
"errorMessage": "Failed to create a multipart upload on S3: {\"message\":\"Missing required key 'Bucket' in params\",\"code\":\"MissingRequiredParameter\",\"time\":\"2022-05-30T10:04:12.622Z\"}",
"trace": []
}

Andrew C
@andrew-caines

I am struggling with CORS. Is there some common gotchas?
The end point in question in my serverless.yml

  getAuctions:
    handler: src/handlers/getAuctions.handler
    events:
      - http:
          method: GET
          path: /auctions
          authorizer: ${self:custom.authorizer}
          cors: true

in my authorizer

resources:
  Resources:
    GatewayResponse:
      Type: "AWS::ApiGateway::GatewayResponse"
      Properties:
        ResponseParameters:
          gatewayresponse.header.Access-Control-Allow-Origin: "'*'"
          gatewayresponse.header.Access-Control-Allow-Headers: "'*'"
        ResponseType: EXPIRED_TOKEN
        RestApiId:
          Ref: "ApiGatewayRestApi"
        StatusCode: "401"
    AuthFailureGatewayResponse:
      Type: "AWS::ApiGateway::GatewayResponse"
      Properties:
        ResponseParameters:
          gatewayresponse.header.Access-Control-Allow-Origin: "'*'"
          gatewayresponse.header.Access-Control-Allow-Headers: "'*'"
        ResponseType: UNAUTHORIZED
        RestApiId:
          Ref: "ApiGatewayRestApi"
        StatusCode: "401"

and in my React front end i get the error:
Access to XMLHttpRequest at 'https://{{URL}}/dev/auctions' from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
I am fairly new to serverless, am I missing a well known issue here?

2 replies
Jeff Tucker
@jedatu_twitter
Does anyone know if the "file" function (custom: { file('custom.yml') }) has a fallback if the target file is empty or missing? I tried this: custom: { file('custom.yml') , 'none' } but it didn't help. "...Invalid variable address at index..."
Jonathan Monroy
@JMonroy86
Hi guys!, does anyone know how to make the serverless dashboard ci/cd recognize a serverless-compose file, or how to set up the ci/cd from the applications configuration for each service, that selects the ghub repository and can go to my service folder where I have the serverless.yml?
2 replies
pablobuild
@pablobuild

Hi guys, i had a function/endpoint in my template, one of the many endpoints created through sls deploy.

Buuut i jus did this: I went via aws console => api gateway management and from there I removed the function... and now running sls deploy is failing like a loser ;)

By any chance, do you know what steps I must follow so that the deploy is satisfactory again?
pablobuild
@pablobuild
Not sure if I should follow or try this answer: https://forum.serverless.com/t/apigateway-deleted-and-deploy-fails/4768/3
Chirazi Alexandru
@achirazi
Hi ! I have a small problem. I'm on a project that uses an old version of serverless framework and i get this error : Serverless: Configuration warning:
Serverless: at 'x': unrecognized property 'include'
Serverless: at 'y': unrecognized property 'include'
Serverless: at 'z': unrecognized property 'include'
Serverless: at 'q': unrecognized property 'include'
I use the plugin : - serverless-python-requirements in serverless.yaml
Anyone has an idea what i can do in this case without modifying the actual structure?
Andrew Farrell
@amfarrell
Is there a way to run serverless deploy from a machine which does not have docker installed?
Gareth McCumskey
@garethmcc
Serverless by default does not use docker
justonequestion
@justonequestion:matrix.org
[m]
Hi, I have a function and while trying to use sls deploy it times out after 120000 ms
The package is not huge I think;
Serverless: Uploading function: translate (46 MB)...
prashant
@iprashant_twitter
Your Environment Information ---------------------------
Operating System: linux
Node Version: 11.2.0
Framework Version: 2.72.3 (local)
Plugin Version: 5.5.4
SDK Version: 4.3.2
Components Version: 3.18.2
TypeError [ERR_INVALID_ARG_TYPE]: The "original" argument must be of type Function. Received type undefined
at promisify (internal/util.js:257:11)
Getting above error
Puneet Kathar
@puneetkathar1
I made the latest PR #11347, can a maintainer kindly review it?
Chintan Shah
@chintanshahts

How can i enable the Encryption in AWS SQS

Encryption key type : Amazon SQS key (SSE-SQS)

Kevin Liang
@llkevin13579
@amfarrell Al’s deploy doesn’t need docker
txxnano
@Warkanlock
Hello everyone! I'm receiving a connection pool error on Lambdas and I think I know why, did anyone here destroy the connection after the callback?
Jeevan M D
@jmd9019
Hi everyone!.. Does this library supports DO functions? If yes can you send me guide
Lorenzo Andraghetti
@andraghetti
Hello! I would like to create an s3 inventory with serverless and read it from a lambda. How can I do that?
hik
@hik:aboveaverage.space
[m]
Hello, I am trying to implement:
https://www.serverless.com/blog/container-support-for-lambda but I am having issues, particularly with "path" must be string or buffer
Serverless.yml incoming in a moment
hik
@hik:aboveaverage.space
[m]
service: sumo-admin

frameworkVersion: '3'

custom:
  tableName: 'users-table-${self:provider.stage}'
  sumoTableName: 'sumo-table-${self:provider.stage}'
  wsgi:
    app: app.app

provider:
  name: aws
  runtime: python3.8
  stage: dev
  region: us-west-2
  ecr:
    images:
      app:
        path: ./
  iam:
    role:
      statements:
        - Effect: Allow
          Action:
            - dynamodb:Query
            - dynamodb:Scan
            - dynamodb:GetItem
            - dynamodb:PutItem
            - dynamodb:UpdateItem
            - dynamodb:DeleteItem
          Resource:
            - Fn::GetAtt: [ UsersTable, Arn ]
        - Effect: Allow
          Action:
            - ssm:*
          Resource:
            - "*"
  environment:
    USERS_TABLE: ${self:custom.tableName}
    SUMO_TABLE: ${self:custom.sumoTableName}

functions:
  api:
    image:
      name: app
    handler: wsgi_handler.handler
    events:
      - httpApi: '*'
    environment:
      SUMO_ACCESS_ID: ${ssm:/sumologic/sumoservice.access.key.id}
      SUMO_ACCESS_KEY: ${ssm:/sumologic/sumoservice.access.key.secret}
plugins:
  - serverless-wsgi
  - serverless-python-requirements
  - serverless-dotenv-plugin

resources:
  Resources:
    UsersTable:
      Type: AWS::DynamoDB::Table
      Properties:
        AttributeDefinitions:
          - AttributeName: userId
            AttributeType: S
        KeySchema:
          - AttributeName: userId
            KeyType: HASH
        ProvisionedThroughput:
          ReadCapacityUnits: 1
          WriteCapacityUnits: 1
        TableName: ${self:custom.tableName}
    SumoTable:
      Type: AWS::DynamoDB::Table
      Properties:
        AttributeDefinitions:
          - AttributeName: service_name
            AttributeType: S
        KeySchema:
          - AttributeName: service_name
            KeyType: HASH
        ProvisionedThroughput:
          ReadCapacityUnits: 1
          WriteCapacityUnits: 1
        TableName: ${self:custom.sumoTableName}
I'm not sure why "path" is undefined anywhere
hik
@hik:aboveaverage.space
[m]
Has anyone gotten serverless-wsgi and serverless-python-requirements to play nice for dockerizing a build?
I have the flags in the tutorial for doing this, but serverless just wants to package the wsgi handler normally without any references to docker
Thiago Cardoso
@thiagocardoso1988
hi everybody, does anybody has a reference to how create a subscription to SNS from a SQS using typescript`s serverless schema?
dreaminpast123
@minshi123
Has anyone else had a similar experience? When running a long-running application, especially with large call counts; compared with EC2/Fargate etc, Lambda is very expensive...
When should I choose Lambda/FaaS?(sometimes I feel like it's ok, but it's expensive...)
Guru
@GuruBrahmaraju
image.png
I am trying to fix this error
can any one help me
hik
@hik:aboveaverage.space
[m]
It's saying that the function you're targeting with that aws lambda permission doesn't exist.
"Why doesn't it exist" could be a bunch of reasons
Sometimes this can get weird if you have lambdas in other stacks that you're applying permissions to, aren't naming them correctly ("correctly" here means "that they match up to other places they're referenced"), maybe you have an issue where you should put DependsOn: GetAtt! [ "lambda", "arn" ] to make sure that CFN waits for the lambda to establish the permission
Walter
@McCo0L
Hey, I'm trying to deploy a nextjs application using serverless, something I did before for other environment, but now it's not working with the following error:
  DEBUG ─ Updating CloudFront distribution of ID XXXXXXXXX.

  error:
  Error [UriParameterError]: Expected uri parameter to have length >= 1, but found "" for params.Bucket
the deployment is over an existing Cloudfront distribution, trying to update with the following serverless.yml
name: FE

nextApp:
  component: "@sls-next/serverless-component@3.7.0"
  inputs:
    build:
      env:
        BASE_FE_URL: "https://stage.xxxxxxxxxxxxxx.com"
    memory: 1024
    bucketName: "XXXXXXXXXXXXX-XXXXXXXXXXX-app"
    bucketRegion: "us-west-2"
    cloudfront:
      distributionId: XXXXXXXXXX
      aliases: ["stage.xxxxxxxxxxxxxx.com"]
      defaults:
        forward:
          cookies: ["Auth"]
          headers: ["Authorization"]
      _next/data/*:
        forward:
          cookies: ["Auth"]
          headers: ["Authorization"]
      _next/image*:
        forward:
          cookies: ["Auth"]
          headers: ["Authorization"]
      _next/static/*:
        forward:
          cookies: ["Auth"]
          headers: ["Authorization"]
      static/*:
        forward:
          cookies: ["Auth"]
          headers: ["Authorization"]
      origins:
        - url: https://xxxxxxxxxxxxxxxxxx.us-west-2.elb.amazonaws.com
          protocolPolicy: https-only
          pathPatterns:
            sam/admin/*:
              minTTL: 0
              maxTTL: 86400
              defaultTTL: 60
              allowedHttpMethods:
                ["GET", "HEAD", "OPTIONS", "PUT", "POST", "PATCH", "DELETE"]
              forward: # optional
                headers: ["Host", "Referer"]
                cookies: "all"
                queryString: true
            scm/admin/*:
              minTTL: 0
              maxTTL: 86400
              defaultTTL: 60
              allowedHttpMethods:
                ["GET", "HEAD", "OPTIONS", "PUT", "POST", "PATCH", "DELETE"]
              forward: # optional
                headers: ["Host"]
                cookies: "all"
                queryString: true
        - url: https://xxxxxxxxxxxxxxxxxx.us-west-2.elb.amazonaws.com
          protocolPolicy: https-only
          pathPatterns:
            sam/*:
              minTTL: 0
              maxTTL: 86400
              defaultTTL: 60
              allowedHttpMethods:
                ["GET", "HEAD", "OPTIONS", "PUT", "POST", "PATCH", "DELETE"]
              forward: # optional
                headers: ["Host", "Referer"]
                cookies: "all"
                queryString: true
            scm/*:
              minTTL: 0
              maxTTL: 86400
              defaultTTL: 60
              allowedHttpMethods:
                ["GET", "HEAD", "OPTIONS", "PUT", "POST", "PATCH", "DELETE"]
              forward: # optional
                headers: ["Host", "Referer"]
                cookies: "all"
                queryString: true
        - url: https://xxxxxxxxxxxxxx.lambda-url.us-west-2.on.aws
          protocolPolicy: https-only
          pathPatterns:
            facade/*:
              minTTL: 0
              maxTTL: 86400
              defaultTTL: 60
              allowedHttpMethods:
                ["GET", "HEAD", "OPTIONS", "PUT", "POST", "PATCH", "DELETE"]
              forward: # optional
                headers: "none"
                cookies: "all"
                queryString: true
Walter
@McCo0L
any ideas?
Gareth McCumskey
@garethmcc
@McCo0L The nextjs component you are using isn't developed by Serverless but by the community of the next js component at https://github.com/serverless-nextjs/serverless-next.js. If you do not get an answer here you can probably get more people to assist there.
Sascha Kuhnigk
@sakuh:matrix.org
[m]
Hello, i am wondering if there is something like "cdk diff" for serverless available... can someone support here?
Gareth McCumskey
@garethmcc
@sakuh:matrix.org This looks like it can do the trick: https://github.com/nicka/serverless-plugin-diff
1 reply
Walter
@McCo0L
He @garethmcc , thanks for the advice. I raised an issue there to see if they give an answer, but thought about giving it a try here as it's possible that someone has an idea about what's going on with that error.