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

Provision Concurrency does not update #1425

Closed
elbert-rival opened this issue Jan 30, 2020 · 4 comments
Closed

Provision Concurrency does not update #1425

elbert-rival opened this issue Jan 30, 2020 · 4 comments
Labels

Comments

@elbert-rival
Copy link

elbert-rival commented Jan 30, 2020

Description:

We have a lambda function that is being deployed with the AWS SAM cli. On the first creation, the provisioned concurrency gets set correctly. However, if I make an update to the concurrency number and update the stack, the lambda function does not show the change.

For example, if I am creating my stack with a serverless function with the template below, it shows on the AWS Lambda console that the provisioned concurrency is 1.

AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31

Globals:
  Function:
    Timeout: 3
    Runtime: nodejs10.x

MyFunction:
    Type: AWS::Serverless::Function
    Properties:
      AutoPublishAlias: live
      ProvisionedConcurrencyConfig:
        ProvisionedConcurrentExecutions: 1
      DeploymentPreference:
        Type: AllAtOnce
      Tracing: Active
      CodeUri: .package/
      Handler: src/lambdas/myFunction.handler
      Timeout: 10

Up to this point, everything seems correct, but if I want to update the stack and change the provisioned concurrency number, the AWS Lambda console does not reflect the update. For example, I would expect to see the provision concurrency on the console to be 100, but it stays as 1.

AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31

Globals:
  Function:
    Timeout: 3
    Runtime: nodejs10.x

MyFunction:
    Type: AWS::Serverless::Function
    Properties:
      AutoPublishAlias: live
      ProvisionedConcurrencyConfig:
        ProvisionedConcurrentExecutions: 100
      DeploymentPreference:
        Type: AllAtOnce
      Tracing: Active
      CodeUri: .package/
      Handler: src/lambdas/myFunction.handler
      Timeout: 10

Steps to reproduce the issue:

  1. Create a stack with one lambda function with provision concurrency set to 1 (example template above)
  2. Update the existing stack with a new provision concurrency number (e.g. 10)

Observed result:

Running an update on the stack with a different provision concurrency does not update the concurrency number in the AWS Lambda console.

Expected result:

Running an update with changes to the lambda function provision concurrency to update the provision concurrency number on the AWS Lambda console

Work Around

Updating with AWS CLI seems to work correctly.

@brightsparc
Copy link

I have a similar issues where by I want to update Environment variables and have this trigger a deployment, but this doesn't appear to affect any change.

@praneetap
Copy link
Contributor

@brightsparc we have a fix rolling out soon which might help with this #1376.

@sriram-mv
Copy link
Contributor

are you still experiencing this issue?

@sriram-mv sriram-mv added the stage/bug-repro The issue/bug needs to be reproduced label Feb 22, 2021
@hoffa
Copy link
Contributor

hoffa commented May 18, 2021

I did the following:

sam init --name repro-1425-2 --runtime nodejs14.x --dependency-manager npm --app-template hello-world

Replaced template.yaml:

AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31

Globals:
  Function:
    Timeout: 3
    Runtime: nodejs14.x

Resources:
  MyFunction:
    Type: AWS::Serverless::Function
    Properties:
      AutoPublishAlias: live
      ProvisionedConcurrencyConfig:
        ProvisionedConcurrentExecutions: 1
      DeploymentPreference:
        Type: AllAtOnce
      Tracing: Active
      CodeUri: hello-world/
      Handler: app.lambdaHandler
      Timeout: 10

Deployed:

sam build --use-container
sam deploy --guided

Then deployed again with ProvisionedConcurrentExecutions: 100 and the expected concurrency showed up in Lambda. Tried with other values as well; same results.

Closing as this seems to be fixed.

@hoffa hoffa closed this as completed May 18, 2021
@hoffa hoffa removed the stage/bug-repro The issue/bug needs to be reproduced label May 18, 2021
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

6 participants