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
Pedro Gomes
@Lusitaniae
this doesn't work
    Type: AWS::RDS::DBInstance
    Condition: !If [IsProd, true, false]
Any ideas?
it always complains mixed up types (it expect string, or all values must have same type)
Pedro Gomes
@Lusitaniae
Using https://github.com/anantab/serverless-plugin-ifelse seems to do it, but if no need for plugin all the better
Zerebokep
@Zerebokep
Hey everyone, is serverless-cloudflare-workers still being worked on or is the focus more on other cloudproviders like aws and gcp?
looks like the last commit was early 2019 :/
Arkoprabho Chakraborti
@Arkoprabho

Been struggling with a specific issue.
While deploying a function, we want to retain the log group. This can be easily done by specifying the DeletionPolicy as Retain.

At the same time, we want to be able to re-use existing log groups. How can we achieve this?
Use-case: On running sls remove, the log group isn't deleted due to retention policy (yay), but while trying to re-deploy, it throws an error saying the log group already exists.

Juan Carlos del Valle
@jc-delvalle
Hey guys, quick question, under org settings / access keys there is this option: 'Access Keys allow your CLI to authenticate with the Serverless Framework API' do you know how I tell the sls cli to use that secret?
Gareth McCumskey
@garethmcc
@jc-delvalle That access key only needs to be used on headless systems like a CI/CD server. Otherwise, you can just run serverless login to setup credentials for the CLI locally
Juan Carlos del Valle
@jc-delvalle
@garethmcc I am actually setting up a CD pipeline that's why I asked, should I manually create the .serverlessrc with that key there? or is there a way to pass it as an argument or something to the cli?
Maksymilian Babarowski
@k0mmsussert0d

I'm struggling to import my resources from one serverless.yml to another.
In the first yaml, I declare:

provider:
  name: aws
  environment:
    DOMAIN_PREFIX: ${self:service}-${opt:stage, self:provider.stage, 'dev'}
    POSTS_TABLE: ${self:provider.environment.DOMAIN_PREFIX}-posts-table
resources:
  Resources:
    PostsTable:
      Type: 'AWS::DynamoDB::Table'
      Properties:
        TableName: ${self:provider.environment.POSTS_TABLE}
  Outputs:
    PostsTableName:
      Value:
        Ref: PostsTable
      Export:
        Name: ${self:provider.environment.DOMAIN_PREFIX}-PostsTableName

This stack is getting created without problems. In another stack, I'm trying to import the table name:

provider:
  name: aws
  environment:
    DOMAIN_PREFIX: ${self:service}-${opt:stage, self:provider.stage, 'dev'}
    POSTS_TABLE:
      'Fn::ImportValue': '${self:provider.environment.DOMAIN_PREFIX}-PostsTableName'

but I'm getting an error:
Trying to populate non string value into a string for variable ${self:provider.environment.POSTS_TABLE}. Please make sure the value of the property is a string.

I checked the first stack in the AWS console and it has outputs with correct names. My guess is that there's something wacky going on with variables interpolation.

Maksymilian Babarowski
@k0mmsussert0d

Checked where the exception is being thrown in sls and found out that Variables.populateVariable function is being called with these args:

arn:aws:dynamodb:us-east-1:*:table/${self:provider.environment.POSTS_TABLE}
${self:provider.environment.POSTS_TABLE}
{ 'Fn::ImportValue': 'sf-microblog-dev-PostsTableName' }

This is for resolving the resource I put under one of my IAM roles in iamRoleStatements. Apparently, Fn::ImportValue is not resolved before variable interpolation with the resource name in the IAM role. Should I report this as a bug?

Jesse Price
@jprice-da15252
Hello, is there a built-in or more native way of disabling stack rollback in serverless for troubleshooting purposes? The only solution I'm aware of is modifying the packaged CloudFormation template then deploying with --package, but if there's a way to do it with an argument or via config/vars, I'd greatly appreciate someone letting me know
Karl
@karltaylor
Any idea why I would be getting a CORS issue purely on a nested resource for a delete method?
using serverless-http and express
functions:
  app:
    handler: src/index.handler
    events:
      - http:
          path: /
          method: ANY
          cors: true
      - http:
          path: /images/{id}
          method: ANY
          cors: true
          request:
            parameters:
              paths:
                id: true
      - http:
          path: /images/{id}
          method: delete
          cors: true # <-- CORS!
      - http:
          path: /{proxy+}
          method: ANY
          cors: true
I can GET /images and GET /images/:id but delete not happy
Maksymilian Babarowski
@k0mmsussert0d
@karltaylor do you actually have to use http a.k.a API Gateway V1 instead of httpApi? The latest allows you to set cors for all endpoints by setting it in provider.httpApi section. Also, your second event ANY /images/{id} makes the third one redundant. I'd try deleting it and then see if cors is applied to DELETE /images/{id}
Andre Rabold
@arabold

I'm working on the serverless-export-env plugin and am looking into ways of hooking into the variable resolution of Serverless. The goal is to provide a better support for AWS intrinsic functions like Fn::GetAtt when running a serverless project locally. However, it seems there's no direct support for extending variable resolution on a low level, is there? I tried the before:invoke:local:loadEnvVars hook but unfortunately the AWS plugin will still be triggered first, leading to an error.

So, what I'm looking for is a way of updating the serverless.service.provider.environment object before any other plugin (even built-in plugins like AWS) are executed. Any suggestions?

1 reply
Christopher R Hill
@aiur100
Hey everyone! Is there a newer local API Gateway + Lambda workflow that people have been using? I am still using the serverless-offline plugin, and various offline plugins like the one for DynamoDB. I get the feeling I am "behind the times" already. :) Any suggestions would be great.
Daniil
@reflash
hey! has anyone faced an issue when zipped package contains duplicate files (same name, same path)?
Wayne Durack
@Trolleymusic

Hello, I've got a question as I was about to file a bug report - but am wondering if it is a bug, or if there's an intention behind the change:

So serverless/serverless#9281

Includes the line

Remove handling of internal noDeploy option

And the release information for 2.36.0 includes the line:

And ever since then, the --noDeploy cli flag does not work. I can't do a dry-run deployment.

This contradicts the documentation, but the documentation could be out of date.

Does anyone know what the intention was behind removing noDeploy and if there's a way of running a dry-run deploy from the command line?

1 reply
ok牧場
@okbokujo123_twitter
hello.
Can I run runtime python3.8 on serverless.ts?
  // import the function via paths
  functions: {
    hello,
    hello2: {
      handler: `handlers/hello2/test.lambda_handler`, // handlers/hello2/test.py
      runtime: 'python3.8',
    }
  },
Vlad Florin Sodringa
@vladoski
Hi guys, I'm trying to implement a very trivial Lambda Layer in AWS using Serverless but doesn't work.
I can see it in AWS but if I try to import it in my code, gives me an error saying that it can't find the Python module
my serverless.yml is this:
service: sapi-layers

frameworkVersion: ">=1.67.3"

provider:
  name: aws
  runtime: python3.8
  lambdaHashingVersion: 20201221
  region: eu-central-1

package:
  exclude:
    - node_modules/**
    - venv/**
    - .direnv/**

functions:
  esg:
    handler: esg.esg.handler
    events:
      - http:
          path: /esg/{proxy+}
          method: ANY
    layers:
      - { Ref: SharedLambdaLayer }

  risk:
    handler: risk.risk.handler
    events:
      - http:
          path: /risk/{proxy+}
          method: ANY
    layers:
      - { Ref: SharedLambdaLayer }

layers:
  shared:
    path: shared
    compatibleRuntimes:
      - python3.8
    allowedAccounts:
      - "*" # ALL accounts!

custom:
  pythonRequirements:
    usePoetry: true
    # dockerizePip: non-linux

plugins:
  - serverless-python-requirements
Raviteja Lingineni
@rlingineni
image.png
Hey All, I'm getting this error of spawn E2BIG when doing serverless deploy which is new for me. I think some part of the package is too large perhaps? I'm not exactly sure which part, or how to go about fixing this. It used to deploy just fine, I did a clean npm install, and that may also have caused the issue? I have the aws-sdk as a devDependency for local debugging, I'm not sure if that's also being packaged here.
2 replies
Jonathan Demirgian
@Quidge
Is it possible to provision an SNS topic without related it to a lambda? All examples I've seen that use lambdas create the SNS topic for use within a lambda. Can sls be used as a general purpose infra provisioning tool like this?
Pranav Malaviya
@pranavmalaviya2

Hi all,
I am creating a multi-service serverless architecture and facing some difficulties.

All the services contain at least 1 lambda and this lambda is triggered by an API endpoint.
I am following Shared API gateway from this guideline.
https://www.serverless.com/framework/docs/providers/aws/events/apigateway#share-api-gateway-and-api-resources

I can deploy 1st service with endpoint path "api/thingOne", but getting following error when I deploy the second lambda with the endpoint "api/thingTwo"

Error: ApiGatewayResourceApi - Another resource with the same parent already has this name: API

That was expected as per the guideline. "Cloudformation will throw an error if we try to generate an existing path resource."

To avoid that the document says "we reference the resource ID of /posts" and they added

restApiResources:
      posts: xxxxxxxxxx

My question is what is this 'xxxxxx'?

1 reply
Eliza D
@elizad
any advice, from where to start with serverless?
Stephen Rust
@probablyabear
Hi all - have a quick question about deployment. In my org, in order to deploy AWS resources, I have to assume a certain role, eg: aws-vault exec {some-org-role} ... Is there a way to configure this in serverless.yml or through serverless config credentials for this service I'm working on? FYI, I've already configured my default AWS profile via serverless config credentials
Morgan Litton
@TechTeam12

Hey everyone, not sure that this is a new question, but I'm getting a deprecation warning

Deprecation warning: Variables resolver reports following resolution errors:
              - Cannot resolve variable at "provider.deploymentBucket.name": Value not found at "opt" source

Any input for what is going on, or where I can start to understand this issue?

Morgan Litton
@TechTeam12
I tracked down a variablesResolutionMode field in the serverless documentation, but that causes issues for serverless-offline and the application errors with the above.
Aleksei Tcelishchev
@casualuser

Hello everyone!

Any gurus here with deep experience in splitting huge API?
I'm hitting here issue with Maximum policy size of 10240 bytes exceeded for role
And this happens already after serverless-plugin-split-stacks and
serverless-plugin-custom-roles applied and API split in smaller chunks.

After that cloudformation-template-update-stack.json still like 200Kb size.

Please suggest something or point with a proper direction for research.

Aleksei Tcelishchev
@casualuser
for all interested persons in reasons of Maximum policy size of 10240 bytes exceeded for role which not solvable with split-stacks
serverless/serverless#9517
Tim Stackhouse
@tstackhouse
Where does one find the 1.x docs? I can't find the docs repo on github anywhere, and there's no version toggle on the docs site
Domingo Tamayo
@dgptamayo
hi all. i'm trying to find any documentation/references about the 'custom' property in serverless.yml. can anybody point me in the right direction?
chimmy-changa
@chimmy-changa
image.png

Hi all,
I'm struggling with resolving relative imports in yaml files. How do I resolve path to a js file using relative path ?

This is my folder structure:

My serverless.yml file and the hello.yml file . I want to be able to point to the index.js file in the same directory as hello.yml file but unable to do it:

image.png
image.png
Gareth McCumskey
@garethmcc
@chimmy-changa handler: functions/index.handler
the format is path/to/file/filename.functioname
Greg Swallow
@gswallow

Hi all! I am brand new to serverless and I'm jumping in as a pretty dense "sysadmin" type. When I run serverless deploy... on a stack I just cloned, it creates an AWS::ApiGateway::Deployment resource whose name changes each time serverless deploy is run:

    ApiGatewayDeployment1622610163204: {
      "Type": "AWS::ApiGateway::Deployment",
      Properties: {
        RestApiId: {
          Ref: ApiGatewayRestApi
        },
        StageName: dev
      },
      DependsOn: [
        ApiGatewayMethodGraphqlOptions,
        ApiGatewayMethodGraphqlPost,
        ApiGatewayMethodGraphqlopenPost,
        ApiGatewayMethodHealthcheckGet
      ]
    }

Problem is I have an AWS::WAFv2::WebAclAssociation resource that's created with static cloudformation and it fails with a WAFNonexistentItemException error (https://docs.aws.amazon.com/waf/latest/APIReference/API_AssociateWebACL.html):

  WebAclToApiGateway:
    Type: AWS::WAFv2::WebACLAssociation
    Properties:
      ResourceArn: !Join
        - ""
        - - "arn:aws:apigateway:${opt:region, self:provider.region}::/restapis/"
          - !Ref ApiGatewayRestApi
          - "/stages/${self:provider.stage}"
      WebACLArn: !GetAtt WafWebACL.Arn
The stage doesn't exist until the AWS::ApiGateway::Deployment resource exists, so I assume I need to DependsOn that resource but its name changes. Is there a variable I should be looking for as part of a plugin that I can use?
Greg Swallow
@gswallow
I think the answer is ${sls:instanceId}
Ben Collier
@bencollier_twitter
Hi all - having an issue with deployment of a few of our lambdas. AWS is complaining that it can't find the relevant shared object files (.so) - we've tried turning off "slim" and also specifying the .so files in the DockerExtraFiles parameter, but none of these seem to work. Has anyone else experienced this, and is there anything obvious we may be doing wrong. These lambdas all work absolutely fine locally.