Skip to content

Invalid tag when deploying masterAlias #191

@kortac

Description

@kortac

When deploying masterAlias with command

SLS_DEBUG=* sls deploy --verbose --masterAlias

it fails with the following error:

ServerlessError: Expected params.Tags[1].Value to be a string
      at /Users/***/WebstormProjects/***/node_modules/serverless/lib/plugins/aws/provider/awsProvider.js:327:27
      at runMicrotasks (<anonymous>)
      at processTicksAndRejections (internal/process/task_queues.js:94:5)

Reason for this is because serverless-aws-alias tries to add a tag with a boolean value:

Serverless: [AWS cloudformation undefined 0.004s 0 retries] createStack({
  StackName: '***',
  OnFailure: 'DELETE',
  Capabilities: [ 'CAPABILITY_IAM', 'CAPABILITY_NAMED_IAM', [length]: 2 ],
  Parameters: [ [length]: 0 ],
  TemplateBody: '{"AWSTemplateFormatVersion":"2010-09-09","Description":"Alias stack for *** (true)","Resources":{"ServerlessAliasLogGroup":{"Type":"AWS::Logs::LogGroup","Properties":{"LogGroupName":"/serverless/***-true","RetentionInDays":7}}},"Outputs":{"ServerlessAliasName":{"Description":"Alias the stack represents.","Value":"true"},"ServerlessAliasLogGroup":{"Description":"Log group for alias.","Value":{"Ref":"ServerlessAliasLogGroup"},"Export":{"Name":"***-true-LogGroup"}}}}',
  Tags: [
    { Key: 'STAGE', Value: 'production' },
    { Key: 'ALIAS', Value: true },
    [length]: 2
  ]
})

Versions:
serverless 1.61.2
serverless-aws-alias 1.8.0
serverless-domain-manager 4.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions