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
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 - Seattle 2025-11-18
sullis
0
42
Dependency Management for Java - Portland - 2025-11-04
sullis
0
25
Dependency management for Java applications 2025-09-11
sullis
0
34
S3 NYC Iceberg meetup 2025-07-10
sullis
0
54
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
GitHub Actions ConFoo Montreal 2025-02-26
sullis
0
100
Netty Portland Java User Group 2025-02-18
sullis
0
40
Other Decks in Technology
See All in Technology
Cortex Code君、今日から内製化支援担当ね。
coco_se
0
300
DevOpsDays2026 Tokyo Cross-border practices to connect "safety" and "DX" in healthcare
hokkai7go
0
100
制約を設計する - 非決定性との境界線 / Designing constraints
soudai
PRO
6
2.4k
システムは「動く」だけでは足りない 実装編 - 非機能要件・分散システム・トレードオフをコードで見る
nwiizo
1
200
Hello UUID
mimifuwacc
0
130
Claude Teamプランの選定と、できること/できないこと
rfdnxbro
1
1.8k
建設的な現実逃避のしかた / How to practice constructive escapism
pauli
4
300
2026年度新卒技術研修 サイバーエージェントのデータベース 活用事例とパフォーマンス調査入門
cyberagentdevelopers
PRO
5
6.6k
"まず試す"ためのDatabricks Apps活用法 / Databricks Apps for Early Experiments and Validation
nttcom
1
220
ZOZOTOWNリプレイスでのSkills導入までの流れとこれから
zozotech
PRO
4
3.2k
最大のアウトプット術は問題を作ること
ryoaccount
0
320
Oracle AI Database@Google Cloud:サービス概要のご紹介
oracle4engineer
PRO
6
1.3k
Featured
See All Featured
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
190
How to Talk to Developers About Accessibility
jct
2
170
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.8k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
350
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
1
1.5k
Test your architecture with Archunit
thirion
1
2.2k
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.5k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.2k
The SEO Collaboration Effect
kristinabergwall1
0
420
Writing Fast Ruby
sferik
630
63k
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