DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Last call! Secure your stack and shape the future! Help dev teams across the globe navigate their software supply chain security challenges.

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workloads.

Releasing software shouldn't be stressful or risky. Learn how to leverage progressive delivery techniques to ensure safer deployments.

Avoid machine learning mistakes and boost model performance! Discover key ML patterns, anti-patterns, data strategies, and more.

Related

  • Microservices With Apache Camel and Quarkus (Part 4)
  • Video Generation With Java: Leverage Nova and Amazon Bedrock
  • Leverage Amazon BedRock Chat Model With Java and Spring AI
  • Mastering Multi-Cloud and Edge Data Synchronization: A Retail Use Case With KubeMQ’s Java SDK

Trending

  • Integrating Security as Code: A Necessity for DevSecOps
  • A Complete Guide to Modern AI Developer Tools
  • The Human Side of Logs: What Unstructured Data Is Trying to Tell You
  • How the Go Runtime Preempts Goroutines for Efficient Concurrency
  1. DZone
  2. Coding
  3. Languages
  4. S3 and AWS Java SDK 2.0: Look Before You Leap

S3 and AWS Java SDK 2.0: Look Before You Leap

Before integrating AWS S3 into your Java application — be sure to look both ways before jumping in.

By 
Duncan Brown user avatar
Duncan Brown
·
Sep. 05, 19 · Analysis
Likes (3)
Comment
Save
Tweet
Share
13.7K Views

Join the DZone community and get the full member experience.

Join For Free

Image title

Make sure you look before leaping into S3 and AWS Java SDK 2.0

Introduction

Back in mid-2017, Java developers everywhere were given access to a preview of the long-awaited v2 of the AWS Java SDK.

Time passed.

A little over a year went by with several revisions being made available before Amazon published the GA release of the new SDK, and there was much rejoicing.

But not all was well in AWS land.

The Issue

If you've ever made use of S3 via any SDK, then you know that a fundamental part of integrating the service is the creation of pre-signed URLs.

These pre-signed URLs are handed back to an application via AWS and allow for the safe and secure upload/access of files in a specified S3 bucket. After all, you don't want just anyone rooting around (weak pun intended) in your buckets, especially if that bucket contains sensitive files or data.

Of course, this particular feature is well documented in the AWS SDK and is used extensively, as one might imagine.

Inexplicably, however, Amazon decided not to include that particular feature in v2 of its AWS Java SDK.

Say What?

As of the writing of this article, this particular omission is still an open issue, much to most integrators' chagrin. You can read the thread/debacle as it's progressed since it was first raised in 2017.

Yes, that's right: It's been a known issue for two years.

Now, I don't work at Amazon, and I certainly don't know all the ins and outs of their development cycle or feature prioritization process, but given the fundamental nature of this particular feature of the S3 SDK, it seems a rather odd item to neglect for such a lengthy period of time.

Workarounds

Really, there are two options:

  1. The link above (re-linked here) includes ideas and code to enact a workaround, although it isn't officially sanctioned or guaranteed to include all the same options and features of the pre-signed URL feature.

  2. Rollback to AWS Java SDK v1.x and stay safe until Amazon finally releases an updated v2 SDK that contains the full version of the pre-signed URL feature.

One of the workarounds above should handle your particular case.

That said, my personal opinion is to go with the second option in order to avoid any potential pitfalls involved with using unofficial workaround code. Of course, if you're midway through a migration/implementation with v2.0 of the AWS Java SDK elsewhere, this might not be a viable route.

Conclusion

Given how common S3 is used as part of any AWS integration, it would be extremely prudent to consider the points raised in this article before migrating from v1.x of the SDK to 2.0, or in choosing a version of the AWS Java SDK to use for a new project.

There's nothing worse than getting knee-deep into a project, only to find out you now have to make a critical decision that could potentially cause serious delays.

Hopefully, the relevance of this article is short-lived, but until then, I hope the points raised in this article help save some developers from entering a sticky situation.

AWS Software development kit Java (programming language) LEAP (programming language)

Opinions expressed by DZone contributors are their own.

Related

  • Microservices With Apache Camel and Quarkus (Part 4)
  • Video Generation With Java: Leverage Nova and Amazon Bedrock
  • Leverage Amazon BedRock Chat Model With Java and Spring AI
  • Mastering Multi-Cloud and Edge Data Synchronization: A Retail Use Case With KubeMQ’s Java SDK

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!