Java Spring REST API with Empty or Optional parameters

Sometimes you need the ability to handle REST API calls with empty parameters. For instance we have following REST API: @RequestMapping(value = "/getJsonFile") public String getJsonFile(@RequestParam("instanceType") String instanceType, ...

Java Concurrency (Multithreading) – CompletableFuture Explained

Starting from Java 8 we finally have such an elegant and intuitive way to deal with concurrency with help of CompletableFuture. But the plenty of different CompletableFuture methods a bit confusing....

Java AWS SDK Create and Run EC2 Instance

Today I'll show how to create and run Amazon EC2 instance with public IP and tags using Java AWS SDK. The Subnet, VPC and the Security Group for that EC2 instance...

Java Generic Cache Map with Expiration

If you have many configuration files stored on S3 or on some other resource, you don't want your Java application to request them each time directly from the cloud because it's...

Java Read Amazon S3 Object as String

In previous post you saw how to delete several S3 objects from Amazon S3 using Java AWS SDK. Today I'll show how to read specific S3 object and convert it to...

Delete Objects from Amazon S3 Bucket using AWS SDK for Java

In previous post you saw how to Get list of files and folders from specific Amazon S3 directory. Today I'll show how to delete a list of objects from S3 bucket. Please not that...