title: Error in the policyName when creating IAM Role by cloudformation
body: <p>This is the role snippet: </p>
  
  <pre><code>"InstanceRole": {
    "Type": "AWS::IAM::Role",
    "Properties": {
      "AssumeRolePolicyDocument": {
        "Version" : "2012-10-17",
        "Statement": [ {
          "Effect": "Allow",
          "Principal": {
             "Service" : [ { "Fn::FindInMap": [ "Region2Principal", { "Ref": "AWS::Region" },"EC2Principal" ] } ] },
          "Action"  : [ "sts:AssumeRole" ]
        }]
      },
      "Path": "/",
      "Policies": [{
        "PolicyName": {"Fn::Join" : ["",["AWS::StackName","InstanceApi"] ] },
        "PolicyDocument": {
          "Statement": [{
            "Effect": "Allow",
            "Action": "*",
            "Resource": "*"
          }]
        }
      }]
    }
  },
  </code></pre>
  
  <p>This is the error : <code>The specified value for policyName is invalid. It must contain only alphanumeric characters and/or the following: +=,.@_-</code></p>
  
  <p>The value of <code>AWS::StackName</code> I entered is <code>tmplt-stack</code> , and the generated policy name that gives error is : <code>tmplt-stack-InstanceApi-O7KF5OL0TA2Q</code></p>
  
  <p>I don't understand why cloudformation denies the name even that it only contain few characters of '-'  and it's allowed according to the error message and the rest are all alphanumeric characters.</p>