title: Name the resources with the supplied parameters to cloud formation stack
body: <p>Im new to cloudformation and intrinsc function.
  I am trying to run a stack with the template which accepts ent type as parameter
  Using this parameter I would like to name my s3 bucket.</p>
  
  <p>But Im getting 400 Bad request</p>
  
  <p>My template
  {
      "AWSTemplateFormatVersion": "2010-09-09",
      "Description": "Creates an S3 bucket using parameters supplied.",
      "Parameters": {</p>
  
  <pre><code>    "AssetInsightId": {
          "Description": "Asset Insight ID",
          "Type": "String",
          "Default": "###"
      },
      "ResourceOwner": {
          "Description": "tr:resource-owner",
          "Type": "String",
          "Default": "###"
      },
      "EnvironmentType": {
          "Description": "tr:environment-type",
  
           "Default": "PREPROD",
          "Type": "String",
          "AllowedValues": ["PREPROD", "PROD"],
          "ConstraintDescription": "must specify PREPROD, PROD."
      }
  },
  "Resources": {
      "ResourceBucket": {
          "Type": "AWS::S3::Bucket",
          "Properties": {
              "BucketName": "!Sub a${AssetInsightId}-S3Bucket-${EnvironmentType}",
              "VersioningConfiguration": {
                  "Status": "Enabled"
              },
              "Tags": [
  
                  {
                      "Key": "tr:application-asset-insight-id",
                      "Value": "${AssetInsightId}"
                  },
                  {
                      "Key": "tr:resource-owner",
                      "Value": "${ResourceOwner}"
                  },
                  {
                      "Key": "tr:environment-type",
                      "Value": "${EnvironmentType}"
                  }
              ]
          }
      }
  },
  "Outputs": {
      "BucketName": {
          "Description": "Name of the S3 Resource Bucket",
          "Value": "!Ref ResourceBucket"
      }
  }
  </code></pre>
  
  <p>}</p>