How do I get my AWS Glue client in JAVA?

+1 vote

Hi guys, I am facing some issues with AWS Glue client!

I've been trying to invoke a Job in AWS Glue from my Lambda code which is in written in Java but I am not able to get the Glue Client here.
You can see that we will be able to see the DynamoClient like this -

AmazonDynamoDB client = AmazonDynamoDB client = AmazonDynamoDBClientBuilder.standard().withRegion("us-east-1").build();

What would be the equivalent code for a Glue Client?

AWSGlueClient glue = null; // how to instantiate client
StartJobRunRequest jobRunRequest = new StartJobRunRequest();
jobRunRequest.setJobName("TestJob");
StartJobRunResult jobRunResult = glue.startJobRun(jobRunRequest);

This is the code which I am running for Glue.
I am not able to see the  AmazonGlueClientBuilder class because I am new to this glue so I am bit confused, please let me know if I am doing it a right way? or is there any other way I can use to invoke the glue job.

Even I am following the Maven Dependency code -

<dependency>            
   <groupId>com.amazonaws</groupId>
   <artifactId>aws-java-sdk-glue</artifactId>
   <version>1.11.289</version>
</dependency>

Let me know a way out to get this thing done, a code will be much appreciated.

Apr 17, 2018 in AWS by Flying geek
• 3,150 points
779 views

2 answers to this question.

+1 vote
Best answer

Hey, you've been using a correct code check with it again. However, the equivalent for it can be: 

AWSGlueClient.builder().withRegion("us-east-1").build() 

Hope it helps, let me know through reply if it doesn't work.

Cheers! 

answered Apr 17, 2018 by Cloud gunner
• 4,260 points

selected Aug 22, 2018 by Priyaj
0 votes

The equivalent would be

AWSGlueClient.builder().withRegion("us-east-1").build()
answered Aug 22, 2018 by Priyaj
• 56,160 points

Related Questions In AWS

+1 vote
0 answers

How can i start my AWS - glue job from my java application

i want to start and stop my ...READ MORE

Jul 15 in AWS by Dhanesh
29 views
+1 vote
4 answers

How do I cache my images which are stored in Amazon S3?

when caching ec2 instance these can be ...READ MORE

answered Oct 23, 2018 in AWS by Nabarupa
406 views
0 votes
1 answer

How do i manage firewall settings for my instance in Lightsail?

Yes. You can control the data traffic ...READ MORE

answered Sep 12, 2018 in AWS by Archana
• 4,090 points
103 views
0 votes
1 answer

How do I enable SSH for my AWS-EB instance?

Using the EB CLI to do eb ...READ MORE

answered Oct 9, 2018 in AWS by Archana
• 4,090 points
37 views
0 votes
1 answer

Deploy Docker Containers from Docker Cloud

To solve this problem, I followed advice ...READ MORE

answered Sep 3, 2018 in AWS by Priyaj
• 56,160 points
101 views
+13 votes
2 answers
0 votes
1 answer