Search code examples
amazon-web-servicesaws-sdkaws-glueaws-glue-data-catalog

AWS Glue and Cross Region Access


I have a few questions about AWS Glue that I was hoping someone could answer for me.

So the scenario is we have an AWS Account set up in the us-east-1 region and we use AWS EMR along with Glue as the hive metastore (through emr configurations). This has been working fine for the past year or so and no hiccups, the Glue Catalog has a bunch of DB's and a bunch of tables. Now what we want to do is migrate our entire project into another region (same account, different region, e.g. us-west-1). So I've moved everything else over, ec2 instances, sg's, etc.. Problem is I don't see the tables from the us-east-1 glue metastore in the us-west-1. Now for my questions.

1.) Are AWS Glue Catalogs region specific? Meaning, if i create a db/table in glue in one region, does it stay in that region or is there something I can do to access it across all regions? Via Console & Programmatically.

2.) If there is an ability to share a single glue metastore across regions, how does that work with EMR, do I have to specify a region attribute along with the other glue settings in the EMR configurations page?

3.) If #2 is possible, are there any charges for accessing glue catalogs across regions (cross-region access)

3.) Otherwise if #2 is not possible, do I have to manually go copy the db/tables from one region and import them into a glue data catalog in another region? Is this the right way to go about doing this?


Solution

  • Just for anyone who sees this in the future. I ended up moving tables over using a java program I wrote that uses the AWS Java Glue API's to read the tables from one region and create them in another. And then the same code deletes the tables from the original region. Didn't really see any other way. We had about 1000+ tables to move over so manually copying them over wasn't really an option.