title: AWS SAM YAML template - Unknown Tag !Ref
body: <p>When I try to deploy my AWS SAM YAML file, it fails saying the !Ref is an unknown tag. </p>
  
  <p><a href="https://i.stack.imgur.com/Bou7N.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Bou7N.png" alt="enter image description here"></a></p>
  
  <p>Any ideas to get around this?</p>
  
  <pre><code>AWSTemplateFormatVersion: '2010-09-09'
  Transform: AWS::Serverless-2016-10-31
  
  Resources:
    MySimpleFunction:
      Type: AWS::Serverless::Function
      Properties:
        Handler: index.handler
        Runtime: nodejs4.3
        CodeUri: s3://&lt;bucket&gt;/MyCode.zip
        Events:
          MyUploadEvent:
            Type: S3
            Properties:
              Id: !Ref Bucket
              Events: Create
    Bucket:
      Type: AWS::S3::Bucket
  </code></pre>