Arpan
Arpan

Reputation: 993

How can I execute a simple Jar on AWS to perform some operation on S3 buckets

I am very new to AWS environment . I am trying to understand the system. For now I created a simple jar that simply list out the buckets available in my aws S3 env.

But where can I execute the jar to get the result?.. I am where at AWS

Also I have installed awscli on my local machine, but once I connect with the aws env using awscli , I no longer able to access my local system, how does it work ?

How can I execute my jar from awscli client ?

I will be really grateful for your help !!

Thanks, Arpan

Upvotes: 0

Views: 826

Answers (1)

Alvaro Carrasco
Alvaro Carrasco

Reputation: 6182

As far as I know, there's no service that runs a jar file straight from S3.

There are several options, all of them require some setup:

  • EC2 instance: just start up a server, upload your jar file and run.
  • Elastic Beanstalk: Create an environment, Procfile, package your jar in a zip file with the Procfile, upload and deploy
  • Lambda: Write your code against their java API, create a jar file, upload (can be an s3 path, but if you update the file on s3, you have to re-upload it to lambda) and deploy

If your process runs in less than 5 minutes, an AWS Lambda is the best as you don't have to worry about servers.

Upvotes: 1

Related Questions