Enable Lambda function to an S3 bucket using cloudformation
<p>We are creating an S3 bucket using a CloudFormation template.  I would like to associate (Add an event to S3 bucket) a Lambda function whenever a file is added to the S3 bucket.</p>

<p>How is it possible through CloudFormation templates. What are the properties which needs to be used in CloudFormation.</p>