title: Lambda function is throwing "You are not authorized to perform this operation" when trying to copy snapshots between regions
body: <p>I am trying to run a test function in order to copy a single snapshot between 2 regions in AWS (in future i want to automate it). But when I run the test it throws an error </p>
  
  <blockquote>
    <p>"errorType": "ClientError",
      "errorMessage": "An error occurred (UnauthorizedOperation) when calling the CopySnapshot operation: You are not authorized to perform this operation."</p>
  </blockquote>
  
  <p>Here is how my IAM looks like:</p>
  
  <pre><code>{
      "Version": "2012-10-17",
      "Statement": [
          {
              "Effect": "Allow",
              "Action": [
                  "logs:*"
              ],
              "Resource": "arn:aws:logs:*:*:*"
          },
          {
              "Effect": "Allow",
              "Action": "ec2:Describe*",
              "Resource": "*"
          },
          {
              "Effect": "Allow",
              "Action": [
                  "ec2:CreateSnapshot",
                  "ec2:DeleteSnapshot",
                  "ec2:CreateTags",
                  "ec2:ModifySnapshotAttribute",
                  "ec2:ResetSnapshotAttribute"
              ],
              "Resource": [
                  "*"
              ]
          }
      ]
  }
  </code></pre>
  
  <p>Here is the function:</p>
  
  <pre><code>import boto3
  
  def lambda_handler(event, context):
  client = boto3.client('ec2')
  client.copy_snapshot(SourceSnapshotId='snap-xxxxxxxxxxxxxxxxxxxxx',
                       SourceRegion='us-central-1',
                       DestinationRegion='eu-west-3')
  </code></pre>