title: Unable to link AWS S3 with AWS Lambda
body: <p>I want to connect my <a href="https://aws.amazon.com/s3/" rel="nofollow">AWS S3</a> with my <a href="https://aws.amazon.com/lambda/" rel="nofollow">AWS Lambda</a>. I created my s3 bucket and named it <code>xyz</code>. While creating an event source on my AWS Lambda function, it is showing the following error </p>
  
  <pre><code>There was an error creating the event source mapping: Your bucket must be in the same region as the function.
  </code></pre>
  
  <p>While going through this <a href="http://docs.aws.amazon.com/AmazonS3/latest/UG/SettingBucketNotifications.html" rel="nofollow">link</a>, I found out that I needed to setup a event notification for the s3 bucket for the AWS Lambda function. But I am unable to setup event notification for the s3 bucket as it is not showing settings for an AWS lambda function in the events tab of the s3 bucket's properties.</p>
  
  <p>My Policy document for the IAM role I created for Lambda is as follows</p>
  
  <pre><code>{
  "Version": "VersionNumber",
  "Statement": [
      {
          "Effect": "Allow",
          "Action": [
              "logs:CreateLogGroup",
              "logs:CreateLogStream",
              "logs:PutLogEvents"
          ],
          "Resource": "arn:aws:logs:*:*:*"
      },
      {
          "Effect": "Allow",
          "Action": [
              "s3:GetObject",
              "s3:PutObject"
          ],
          "Resource": [
              "arn:aws:s3:::xyz/*"
          ]
      }
     ]
   }
  </code></pre>
  
  <p>Can somebody let me know why I am unable to create an event for AWS Lambda for an operation on s3 bucket?</p>