# Serverless error - The CloudFormation template is invalid - during deployment

**URL:** <https://forum.serverless.com/t/serverless-error-the-cloudformation-template-is-invalid-during-deployment/16025>\
**Category:** Serverless Framework\
**Tags:** aws, lambda, cloudformation\
**Created:** [October 6, 2021, 3:18pm UTC](https://forum.serverless.com/t/serverless-error-the-cloudformation-template-is-invalid-during-deployment/16025 "2021-10-06T15:18:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Frosmatic](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/frosmatic/32/6227_2.png) [@Frosmatic](https://forum.serverless.com/u/Frosmatic)\
**Post date:** [October 6, 2021, 3:18pm UTC](https://forum.serverless.com/t/serverless-error-the-cloudformation-template-is-invalid-during-deployment/16025/1 "2021-10-06T15:18:30Z")

</div>

When deploying lambdas with serverless, the following error occurs:

_The CloudFormation template is invalid: Template format error: Output ServerlessDeploymentBucketName is malformed. The Name field of every Export member must be specified and consist only of alphanumeric characters, colons, or hyphens._

I don’t understand what the problem is.

Serverless config file:

```auto
service: lambdas-${opt:region}

frameworkVersion: '2'

provider:
  name: aws
  runtime: nodejs12.x
  memorySize: 512
  timeout: 10
  lambdaHashingVersion: 20201221
  region: ${opt:region}
  stackName: lambdas-${opt:region}
  logRetentionInDays: 14
  deploymentBucket:
    name: lambdas-${opt:region}

plugins:
  - serverless-deployment-bucket

functions:
  function1:
    handler: function1/index.handler
    name: function1-${opt:stage}
    description: This function should call specific API on Backend server
    events:
      - schedule: cron(0 0 * * ? *)
    environment:
      ENV: ${opt:stage}
  function2:
    handler: function2/index.handler
    name: function2-${opt:stage}
    description: Function should be triggered by invocation from backend.
    environment:
      ENV: ${opt:stage}

```
