title: AWS Lambda Code in S3 Bucket not updating
body: <p>I am using cloudformation to create my lambda function with the code in a S3Bucket with versioning enabled. </p>
  
  <pre><code>"MYLAMBDA": {
        "Type": "AWS::Lambda::Function",
        "Properties": {
          "FunctionName": {
            "Fn::Sub": "My-Lambda-${StageName}"
          },
          "Code": {
            "S3Bucket": {
              "Fn::Sub": "${S3BucketName}"
            },
            "S3Key": {
              "Fn::Sub": "${artifact}.zip"
            },
            "S3ObjectVersion": "1e8Oasedk6sDZu6y01tioj8X._tAl3N"
          },
          "Handler": "streams.lambda_handler",
          "Runtime": "python3.6",
          "Timeout": "300",
          "MemorySize": "512",
          "Role": {
            "Fn::GetAtt": [
              "LambdaExecutionRole",
              "Arn"
            ]
          }
        }
      }
  </code></pre>
  
  <p>The lambda function gets created successfully. When i copy a new artifact zip file to the s3bucket, a new version of the file gets created with the new version  "S3ObjectVersion"  string. But the lambda function code is still using the older version.</p>
  
  <p>The documentation of aws cloudformation clearly says the following</p>
  
  <blockquote>
    <p>To update a Lambda function whose source code is in an Amazon S3
    bucket, you must trigger an update by updating the S3Bucket, S3Key, or
    S3ObjectVersion property. Updating the source code alone doesn't
    update the function.</p>
  </blockquote>
  
  <p>Is there an additional trigger event, i need to create to get the code updated?</p>