8

We are currently developing AWS Lambda in java an using AWS Java SDK.

Found that AWS SDK is available in 2 packages ... but could not locate the difference and which one is better (or what is purpose of having two).

Would appreciate if somebody can throw some light on this.

to be exact ... The AWS api can be used using

import com.amazonaws.*

and

import software.amazon.awssdk.*

~ thank you

1 Answer 1

13

There are two versions of the Java SDK. The package com.amazonaws is version 1, software.amazon.awssdk is version 2.

AWS would very much like you to use version 2.

You can get more information here: https://docs.aws.amazon.com/sdk-for-java/

Sign up to request clarification or add additional context in comments.

4 Comments

AWS would very much like you to use version 2 - they just have many examples to update as they've left so many in V1.
@stdunbar - very true. And they don't seem to consider that companies might have a large codebase that uses V1.
But there's an SO user who claims to work for AWS (and who, to be honest, I expected to answer this question) that will respond to any question that uses the v1 SDK by saying that the OP should upgrade to V2. So I take that as an official position of AWS.
Yes - @smac2020 encourages it frequently.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.