Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lambda does not update with provisioned concurrency #8750

Open
allemanfredi opened this issue Jan 12, 2021 · 8 comments
Open

lambda does not update with provisioned concurrency #8750

allemanfredi opened this issue Jan 12, 2021 · 8 comments
Labels

Comments

@allemanfredi
Copy link

allemanfredi commented Jan 12, 2021

Hello guys, i'm trying to switch from serverless-plugin-warmup to provisioned concurrencybut I noticed that updating a lambda doesn't work. Every time that i have to do a modification i need to do a full deploy. What could be?

My serverless.yaml is:

service: 'service-name'
enableLocalInstallationFallback: true

package:
  individually: true
  exclude:  
    - node_modules/aws-sdk/** 
    - db/**
    - .github/**
    - .vscode/**
    - coverage/**
    - .gitignore
    - .babelrc
    - .nvmrc
    - .prettierrc
    - .eslintrc.js
    - jest.config.js
    - docker-compose.yml
    - '**/*.md'
    - test/**
    - serverless.*.yml

custom:
  webpack:
    webpackConfig: ./webpack.config.js
    includeModules: true
    packager: 'npm'

  prune:
    automatic: true
    number: 5

  vpc-staging:
    securityGroupIds:
      ....
    subnetIds:
      ....
  vpc-production:
    securityGroupIds:
      ...
    subnetIds:
      ....

  provider:
    staging: ...
    production: ...

  redis:
    staging: ....
    production: ...

  redis-key:
    staging: ...
    production: ...

provider:
  name: aws
  runtime: nodejs12.x
  apiGateway:
    minimumCompressionSize: 1024
  stage: ${opt:stage, 'staging'}
  region: ${opt:region}
  profile:'profile name'
  versionFunctions: false
  timeout: 30
  memorySize: 256
  iamRoleStatements:
     .....

  environment:
     ....

functions:
  function-1:
    handler: src/function-1.default
    vpc: ${self:custom.vpc-${self:provider.stage}}
    events:
      - http:
          path:'path/path'
          method: post
    provisionedConcurrency: 1

function-3:
    handler: src/function-3.default
    vpc: ${self:custom.vpc-${self:provider.stage}}
    events:
      - http:
          path:'path/path3'
          method: post
    provisionedConcurrency: 3
  
  .....
  
  
plugins:
  - serverless-webpack
  - serverless-offline
  - serverless-prune-plugin
@pgrzesik
Copy link
Contributor

Hello @allemanfredi, could you please follow our standard-issue template? At the moment it's hard to reproduce potential issue here. Thanks in advance 🙇

@allemanfredi
Copy link
Author

hello thanks for the response! what is standard-issue template?

@jugglingjsons
Copy link

jugglingjsons commented Jan 13, 2021

I seem to be having similar issues with provisionedConcurrency - when I deploy singular functions that utilise it, they don't get updated.

@allemanfredi when you create an issue on this repo as a bug , there is a list of questions you have to answer that make it easier for other to debug / reproduce your problem

Can it be that the SQS triggers are points to the provisioned concurrency lambda aliases, that don't get updated with proper lambda version on singular lambda deploys? It works fine, when using full deploys.

@pgrzesik
Copy link
Contributor

As @jugglingjsons mentioned, it's visible when you create a new issue - you'll see a list of questions that help us triaging and debugging potential issues. What type of event are you using? We had instances where for certain events provisionedConcurrency didn't work properly (example: #8298), which might be the case for you as well

About your issue @jugglingjsons - I believe it's separate and related to how single-function deployment works - if you feel like that should be fixed, please create a separate issue as it's most likely a separate problem

@jugglingjsons
Copy link

jugglingjsons commented Jan 13, 2021

About your issue @jugglingjsons - I believe it's separate and related to how single-function deployment works - if you feel like that should be fixed, please create a separate issue as it's most likely a separate problem

Cool, created mine here -> #8752

@allemanfredi
Copy link
Author

@pgrzesik first sorry for not following the issue template. I have more lambdas but provisioned concurrency it's enabled only to the ones that have http as event.

@jugglingjsons
Copy link

jugglingjsons commented Jan 13, 2021

@pgrzesik first sorry for not following the issue template. I have more lambdas but provisioned concurrency it's enabled only to the ones that have http as event.

Take a look if my issue describes what is happening to you. I believe it does as I just checked and both HTTP events and queu triggers fail to launch the proper lambda after running -> #8752

sls deploy -f functionName

@pgrzesik
Copy link
Contributor

Thanks @jugglingjsons

@allemanfredi Could you still try to fill out the original issue with your serverless.yml (or at least the events that you're using with provisionedConcurrency) along with the version of the framework? Thanks in advance 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants