title: passing value from cloudformation to lambda function written in python
body: <p>I have defined my lambda function in the cloudformation template. This lambda function takes bucket name using cloudformation Ref: BucketName. the problem i am facing is BucketName value is coming in next line and breaking the python code as python is space sensitive. is there any way to fix it?    </p>
  
  <pre><code>      "ZipFile": {
          "Fn::Join": [
            "\n",
            [
              "import boto3",
              "import json",
              "def handler(event, context):",
              "    try:",
              "        s3BucketName=event['detail']['requestParameters']['bucketName']",
              "        if s3BucketName == '", {"Ref": "BucketName"},"':",
              "            return ",
  </code></pre>