Giter Site home page Giter Site logo

Comments (2)

lucashuy avatar lucashuy commented on July 20, 2024

Hi, thanks for opening this issue. Unfortunately I'm not able to produce the issue following these steps:

1. Initial state

  1. sam init a hello world NodeJS function
  2. modify the function to look something like this:
Resources:
  HelloWorldFunction:
    Type: AWS::Serverless::Function
    Properties:
      CodeUri: hello-world/
      Handler: app.lambdaHandler
      Runtime: nodejs20.x
      Architectures:
        - x86_64
      Description: "foo1"
      VersionDescription: "bar1"
      AutoPublishAlias: gh7102alias
  1. sam build
  2. sam deploy

This deploys successfully with a Lambda version 1.

2. Adding LoggingConfig and update description

  1. modify the function
Resources:
  HelloWorldFunction:
    Type: AWS::Serverless::Function
    Properties:
      CodeUri: hello-world/
      Handler: app.lambdaHandler
      Runtime: nodejs20.x
      Architectures:
        - x86_64
      Description: "foo2"
      VersionDescription: "bar2"
      AutoPublishAlias: gh7102alias
      LoggingConfig:
          ApplicationLogLevel: DEBUG
          LogFormat: JSON
          SystemLogLevel: DEBUG
  1. sam build
  2. sam deploy

I can see that the description for the original function's description is updated, along with the version's description. Additionally, a new Lambda version was published with the new logging changes to the original function.

from aws-sam-cli.

mriccia avatar mriccia commented on July 20, 2024

Hello @lucashuy , thanks for the prompt response.
What's triggering the new version deployment in the steps you shared is the VersionDescription.
Without VersionDescription I can consistently see the Lambda Configuration being updated, without a new version being published.
Please can you test with the following steps?

Initial state

  1. sam init a hello world NodeJS function
  2. modify the function to look something like this:
Resources:
  HelloWorldFunction:
    Type: AWS::Serverless::Function
    Properties:
      CodeUri: hello-world/
      Handler: app.lambdaHandler
      Runtime: nodejs20.x
      Architectures:
        - x86_64
      Description: "foo1"
      AutoPublishAlias: gh7102alias
  1. sam build
  2. sam deploy

This deploys successfully with a Lambda version 1.

Adding LoggingConfig and update description

  1. modify the function
Resources:
  HelloWorldFunction:
    Type: AWS::Serverless::Function
    Properties:
      CodeUri: hello-world/
      Handler: app.lambdaHandler
      Runtime: nodejs20.x
      Architectures:
        - x86_64
      Description: "foo2"
      AutoPublishAlias: gh7102alias
      LoggingConfig:
          ApplicationLogLevel: DEBUG
          LogFormat: JSON
          SystemLogLevel: DEBUG
  1. sam build
  2. sam deploy

I can see that the description and logging configuration for the original function are updated, but there isn't a new Lambda Version published.

from aws-sam-cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.