title: Cloudformation S3bucket creation
body: <p>Here's the cloudformation template I wrote to create a simple S3 bucket, How do I specify the name of the bucket? Is this the right way?</p>
  
  <pre><code>{
    "AWSTemplateFormatVersion": "2010-09-09",
    "Description": "Simple S3 Bucket",
    "Parameters": {
      "OwnerService": {
        "Type": "String",
        "Default": "CloudOps",
        "Description": "Owner or service name. Used to identify the owner of the vpc stack"
      },
      "ProductCode": {
        "Type": "String",
        "Default": "cloudops",
        "Description": "Lowercase version of the product code (i.e. jem). Used for tagging"
      },
      "StackEnvironment": {
        "Type": "String",
        "Default": "stage",
        "Description": "Lowercase version of the environment name (i.e. stage). Used for tagging"
      }
    },
    "Mappings": {
      "RegionMap": {
        "us-east-1": {
          "ShortRegion": "ue1"
        },
        "us-west-1": {
          "ShortRegion": "uw1"
        },
        "us-west-2": {
          "ShortRegion": "uw2"
        },
        "eu-west-1": {
          "ShortRegion": "ew1"
        },
        "ap-southeast-1": {
          "ShortRegion": "as1"
        },
        "ap-northeast-1": {
          "ShortRegion": "an1"
        },
        "ap-northeast-2": {
          "ShortRegion": "an2"
        }
      }
    },
    "Resources": {
      "JenkinsBuildBucket": {
        "Type": "AWS::S3::Bucket",
        "Properties": {
          "BucketName": {
            "Fn::Join": [
              "-",
              [
                {
                  "Ref": "ProductCode"
                },
                {
                  "Ref": "StackEnvironment"
                },
                "deployment",
                {
                  "Fn::FindInMap": [
                    "RegionMap",
                    {
                      "Ref": "AWS::Region"
                    },
                    "ShortRegion"
                  ]
                }
              ]
            ]
          },
          "AccessControl": "Private"
        },
        "DeletionPolicy": "Delete"
      }
    },
    "Outputs": {
      "DeploymentBucket": {
        "Description": "Bucket Containing Chef files",
        "Value": {
          "Ref": "DeploymentBucket"
        }
      }
    }
  }
  </code></pre>