title: How to Add iamRoleStatements to S3 Trigger Bucket in Serverless Framework
body: <p>When I am adding the following code in <strong>serverless.yml</strong> file</p>
  
  <pre><code>provider:
    name: aws
    runtime: python3.6
    stage: dev
    region: [REGION]
    iamRoleStatements:
      - Effect: "Allow"
        Action:
         - "s3:GetObject"
        Resource: { "Fn::Join": ["", ["arn:aws:s3:::", { "Ref": [BUCKET NAME] }, "/*" ] ] }
  </code></pre>
  
  <p>On deployment, I am getting <strong>“The CloudFormation template is invalid: Circular dependency between resources:”</strong></p>
  
  <p>I am using <strong>boto3</strong> with <strong>python3</strong> to get the private file that is uploaded to the S3 bucket after the trigger event so like to give the permission to <strong>Lambda function</strong> for that bucket.</p>