title: How to get AWS Glue crawler to assume a role in another AWS account to get data from that account's S3 bucket?
body: <p>There's some CSV data files I need to get in S3 buckets belonging to a series of AWS accounts belonging to a third-party; the owner of the other accounts has created a role in each of the accounts which grants me access to those files; I can use the AWS web console (logged in to my own account) to switch to each role and get the files. One at a time, I switch to the role for each of the accounts and then get the files for that account, then move on to the next account and get those files, and so on.</p>
  
  <p>I'd like to automate this process.</p>
  
  <p>It looks like AWS Glue can do this, but I'm having trouble with the permissions.</p>
  
  <p>What I need it to do is create permissions so that an AWS Glue crawler can switch to the right role (belonging to each of the other AWS accounts) and get the data files from the S3 bucket of those accounts.</p>
  
  <p>Is this possible and if so how can I set it up? (e.g. what IAM roles/permissions are needed?) I'd prefer to limit changes to my own account if possible rather than having to ask the other account owner to make changes on their side.</p>
  
  <p>If it's not possible with Glue, is there some other easy way to do it with a different AWS service?</p>
  
  <p>Thanks!</p>
  
  <p>(I've had a series of tries but I keep getting it wrong - my attempts are so far from being right that there's no point in me posting the details here).</p>