Serverless.yml not accepting cloudformation template

Here is a snippet from my serverless.yml file:

Resources:
  LogGroupInfo:
    Type: 'AWS::Logs::LogGroup'
    Properties:
      RetentionInDays: 3
  FirehoseInstance:
     Properties:
      DeliveryStreamName: ${opt:stage}-analytics
      DeliveryStreamType: DirectPut
      RedshiftDestinationConfiguration:
        CloudWatchLoggingOptions:
          Enabled: true
          LogGroupName: !Ref LogGroupInfo

Here is the error I receive:

  unknown tag !<!Ref> in "/Users/code/Project1/serverless.yml" at line 56, column 42:
     ...  LogGroupName: !Ref LogGroupInfo

This template works perfectly well as it is when used in cloudformation to create a stack

Change the !Ref to Ref:

1 Like