Skip to content

LogGroup ignores stage flag passed in from CLI tool. #4929

Closed

Description

@bvanderlugt

This is a Bug Report

LogGroup not being named correctly with the --stage flag

When the serverless.yml has no stage key, and you use the --stage flag, the LogGroup created does not use the value from the flag. Instead, LogGroup will be named using the default dev stage.

To reproduce, create a serverless.yml with no stage specified.

sls --stage test deploy

service: banana

provider:
  name: aws
  runtime: nodejs6.10

functions:
  hello:
    handler: handler.hello
    name: hello-${self:provider.stage}
       Value: "Some output value"

The relevant cloudformation-template-update-stack.json

...
    "HelloLogGroup": {
      "Type": "AWS::Logs::LogGroup",
      "Properties": {
        "LogGroupName": "/aws/lambda/hello-dev"
      }
    }
...

serverless v1.26.1
osx 10.13.4

Activity

  1. changed the title [-]LogGroup not created with stage flag passed in from CLI tool.[/-] [+]LogGroup ignores stage flag passed in from CLI tool.[/+] on Apr 24, 2018
  2. medikoo commented on Dec 3, 2021

    @medikoo
    Contributor

    Closing, as I believe issue this issue was fixed a while go. Currently we directly pass there lambda name, and this name definitely reflects intended stage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions