Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
AWS SDK for Java version 2.0 - Portland Oregon
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
sullis
August 28, 2018
Technology
390
0
Share
AWS SDK for Java version 2.0 - Portland Oregon
Portland Java User Group
Portland Oregon
August 28, 2018
sullis
August 28, 2018
More Decks by sullis
See All by sullis
Dependency Management for Java - Code Remix Summit 2026-05-12
sullis
0
12
AI Assisted Software Development - Portland Java User Group - 2026-04-14
sullis
0
47
Dependency Management for Java - Seattle 2025-11-18
sullis
0
45
Dependency Management for Java - Portland - 2025-11-04
sullis
0
29
Dependency management for Java applications 2025-09-11
sullis
0
47
S3 NYC Iceberg meetup 2025-07-10
sullis
0
56
Amazon S3 Chicago 2025-06-04
sullis
0
130
Amazon S3 Boston 2025-05-07
sullis
0
100
Netty ConFoo Montreal 2025-02-27
sullis
0
160
Other Decks in Technology
See All in Technology
エージェント時代の UIとAPI、CLI戦略
coincheck_recruit
0
160
"うちにはまだ早い"は本当? ─ 小さく始めるPlatform Engineering入門
harukasakihara
1
240
[Oracle TechNight#99] 生成AI時代のAI/ML入門 ~ AIとオラクルデータベースの関係 (前半)
oracle4engineer
PRO
2
240
古今東西SRE
okaru
1
140
OWASP APTSを眺めてみた
su3158
0
130
Fabric MCPの紹介と使い分け
ryomaru0825
1
150
ServiceによるKubernetes通信制御ーClusterIPを例に
miku01
1
150
QAエンジニアはどうやって プロダクト議論の場に入れるのか?
moritamasami
2
410
AIが自律的に働く時代へ Amazon Quick で実現するAIエージェント紹介
koheiyoshikawa
0
190
会社説明資料|株式会社ギークプラス ソフトウェア事業部
geekplus_tech
0
200
2026年春のAgentCoreアプデ 細かいやつ全部まとめ
minorun365
3
200
要件定義の精度を高めるための型と生成AIの活用 / Using Types and Generative AI to Improve the Accuracy of Requirements Definition
haru860
0
310
Featured
See All Featured
Bash Introduction
62gerente
615
210k
Producing Creativity
orderedlist
PRO
348
40k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
290
Designing Experiences People Love
moore
143
24k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
180
Darren the Foodie - Storyboard
khoart
PRO
3
3.3k
Technical Leadership for Architectural Decision Making
baasie
3
350
Marketing to machines
jonoalderson
1
5.2k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
820
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.2k
What does AI have to do with Human Rights?
axbom
PRO
1
2.1k
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.4k
Transcript
Sean Sullivan August 28, 2018 Portland Java User Group AWS
SDK for Java version 2.0
software engineer 22 years on the JVM Portland Oregon back
office systems Hudson’s Bay Company About me
Agenda Hudson’s Bay Company SDK for Java • version 1.x
• version 2.x Scala and AWS
https://en.wikipedia.org/wiki/Hudson%27s_Bay_Company
Toronto NYC
saksfifthavenue.com saksoff5th.com lordandtaylor.com thebay.com
saksfifthavenue.com
walmart.com
HBC Tech stack
Web Checkout Android Checkout iPhone Checkout Checkout service
AWS SDK for Java
SDK v2 announced June 2017 @awsforjava
“Under the hood, we use an HTTP client built on
top of Netty to make the non- blocking HTTP call” “first class support for non-blocking I/O in our async clients” source: AWS Developer Blog
import java.util.concurrent.CompletableFuture; DynamoDBAsyncClient client = DynamoDBAsyncClient.builder() .region(Region.US_WEST_2) .build(); CompletableFuture<ListTablesResponse> response
= client.listTables(ListTablesRequest.builder().build()); CompletableFuture<List<String>> tableNames = response.thenApply(ListTablesResponse::tableNames); tableNames.whenComplete((tables, err) -> { if (tables != null) { tables.forEach(System.out::println); } else { err.printStackTrace(); } }); SDK v2
Github projects aws-sdk-java aws-sdk-java-v2
SDK v2 Developer Preview
Pull Request
$ cd aws-sdk-java-v2 $ git log | grep 'Author: Sean
Sullivan' | wc -l 39
SDK v2 Maven artifacts
https://search.maven.org/
<dependency> <groupId>com.amazonaws<groupId> <artifactId>aws-java-sdk-dynamodb</artifactId> <version>1.11.397</version> </dependency> Maven dependencies SDK v1 <dependency>
<groupId>software.amazon.awssdk<groupId> <artifactId>dynamodb</artifactId> <version>2.0.1</version> </dependency> SDK v2
import com.amazonaws.services.cloudwatch.AmazonCloudWatchClient; import com.amazonaws.services.cloudwatch.AmazonCloudWatchClientBuilder; import com.amazonaws.services.cloudwatch.model.MetricDatum; import com.amazonaws.services.cloudwatch.model.PutMetricDataRequest; Java packages
SDK v1 import software.amazon.awssdk.services.cloudwatch.CloudWatchAsyncClient; import software.amazon.awssdk.services.cloudwatch.model.MetricDatum; import software.amazon.awssdk.services.cloudwatch.model.PutMetricDataRequest; SDK v2
distinct Maven artifact names distinct Java package names SDK v2
and SDK v1 can co-exist in a Java application SDK v1 jar SDK v2 jar
SDK v2 programming API • Immutable clients and models •
Enhanced pagination • Smart configuration merging • Forward-compatible enums • Streaming operations as first-class concepts
AWS SDK v2 in a Scala application?
val awsSdkVersion = “2.0.1" "org.scala-lang.modules" %% "scala-java8-compat" % “0.9.0", "software.amazon.awssdk"
% "cloudwatch" % awsSdkVersion, "software.amazon.awssdk" % "dynamodb" % awsSdkVersion build.sbt
import scala.compat.java8.FutureConverters._ import scala.collection.JavaConverters._ Foo.scala
FutureConverters?
java.util.concurrent.CompletableFuture scala.concurrent.Future
FutureConverters.scala
gfc-aws-cloudwatch
“A tiny Scala wrapper around AWS CloudWatch Java client” gfc-aws-cloudwatch
https://github.com/gilt/gfc-aws-cloudwatch
how to migrate gfc-aws-cloudwatch from SDK v1 to SDK v2
?
https://github.com/ gilt/gfc-aws- cloudwatch/pull/8/ files
Conclusion SDK v1 — production ready SDK v2 — coming
soon github.com/aws twitter.com/awsforjava
The end
None
Bonus material
“Developing Applications on AWS in the JVM” AWS re:Invent 2017
https://www.slideshare.net/AmazonWebServices/ dev205developing-applications-on-aws-in-the-jvm