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 - Albany NY - Jan...
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
sullis
January 18, 2018
Technology
370
0
Share
AWS SDK for Java, version 2.0 - Albany NY - January 18 2018
AWS User Group
Albany NY
January 18, 2018
#java #scala #gilttech #aws #awscloud
sullis
January 18, 2018
More Decks by sullis
See All by sullis
AI Assisted Software Development - Portland Java User Group - 2026-04-14
sullis
0
44
Dependency Management for Java - Seattle 2025-11-18
sullis
0
44
Dependency Management for Java - Portland - 2025-11-04
sullis
0
26
Dependency management for Java applications 2025-09-11
sullis
0
36
S3 NYC Iceberg meetup 2025-07-10
sullis
0
55
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
Other Decks in Technology
See All in Technology
国内外の生成AIセキュリティの最新動向 & AIガードレール製品「chakoshi」のご紹介 / Latest Trends in Generative AI Security (Domestic & International) & Introduction to AI Guardrail Product "chakoshi"
nttcom
4
1.5k
AI時代のガードレールとしてのAPIガバナンス
nagix
0
310
社内エンジニア勉強会の醍醐味と苦しみ/tamadev
nishiuma
0
250
Percolatorを廃止し、マルチ検索サービスへ刷新した話 / Search Engineering Tech Talk 2026 Spring
visional_engineering_and_design
0
170
はじめての MagicPod生成AI機能 機能紹介から活用方法まで
magicpod
0
120
データを"持てない"環境でのアノテーション基盤設計
sansantech
PRO
1
150
Agents CLI と Gemini Enterprise Agent Platform で マルチエージェント開発が楽しくなる!
kaz1437
0
160
弁護士ドットコム株式会社 エンジニア職向け 会社紹介資料
bengo4com
1
190
Scovilleモバイルエンジニア募集中.pdf
julienrudin
0
110
独断と偏見で試してみる、 シングル or マルチエージェント どっちがいいの?
shichijoyuhi
1
160
ハーネスエンジニアリングの概要と設計思想
sergicalsix
9
5.4k
Pure Intonation on Browser: Building a Sequencer with Ruby
nagachika
0
170
Featured
See All Featured
Writing Fast Ruby
sferik
630
63k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.7k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
270
Technical Leadership for Architectural Decision Making
baasie
3
340
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.4k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
150
Docker and Python
trallard
47
3.8k
Navigating Weather and Climate Data
rabernat
0
170
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
350
Transcript
Sean Sullivan January 18, 2018 AWS User Group Albany NY
AWS SDK for Java version 2.0
Thank you CommerceHub
software engineer 21 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 Albany
saksfifthavenue.com saksoff5th.com lordandtaylor.com gilt.com thebay.com
gilt.com
gilt.com
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
SDK v2 Maven artifacts
https://search.maven.org/
<dependency> <groupId>com.amazonaws<groupId> <artifactId>aws-java-sdk-dynamodb</artifactId> <version>1.11.267</version> </dependency> Maven dependencies SDK v1 <dependency>
<groupId>software.amazon.awssdk<groupId> <artifactId>dynamodb</artifactId> <version>2.0.0-preview7</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.0-preview-7" "org.scala-lang.modules" %% "scala-java8-compat" % "0.8.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
Gilt’s AWS CloudWatch Scala library
“A tiny Scala wrapper around AWS CloudWatch Java client”
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