aws-sdk-kotlin does not work on apple silicon
See original GitHub issueDescribe the bug
Currently using the aws-sdk-kotlin
on Apple Silicon does not work
Unable to unpack AWS CRT lib: java.io.IOException: Unable to open library in jar for AWS CRT: /osx/armv8/libaws-crt-jni.dylib
java.io.IOException: Unable to open library in jar for AWS CRT: /osx/armv8/libaws-crt-jni.dylib
at software.amazon.awssdk.crt.CRT.extractAndLoadLibrary(CRT.java:158)
at software.amazon.awssdk.crt.CRT.loadLibraryFromJar(CRT.java:223)
at software.amazon.awssdk.crt.CRT.<clinit>(CRT.java:33)
at software.amazon.awssdk.crt.CrtResource.<clinit>(CrtResource.java:100)
at aws.sdk.kotlin.crt.io.EventLoopGroup.<init>(EventLoopGroupJVM.kt:22)
at aws.sdk.kotlin.runtime.crt.SdkDefaultIO$EventLoop$2.invoke(SdkDefaultIO.kt:24)
at aws.sdk.kotlin.runtime.crt.SdkDefaultIO$EventLoop$2.invoke(SdkDefaultIO.kt:22)
at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
at aws.sdk.kotlin.runtime.crt.SdkDefaultIO.getEventLoop(SdkDefaultIO.kt:22)
at aws.sdk.kotlin.runtime.crt.SdkDefaultIO$ClientBootstrap$2.invoke(SdkDefaultIO.kt:38)
at aws.sdk.kotlin.runtime.crt.SdkDefaultIO$ClientBootstrap$2.invoke(SdkDefaultIO.kt:37)
at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
at aws.sdk.kotlin.runtime.crt.SdkDefaultIO.getClientBootstrap(SdkDefaultIO.kt:37)
at aws.sdk.kotlin.runtime.http.engine.crt.CrtHttpEngine.<init>(CrtHttpEngine.kt:60)
at aws.sdk.kotlin.runtime.http.engine.crt.CrtHttpEngine.<init>(CrtHttpEngine.kt:32)
at aws.sdk.kotlin.services.dynamodb.DefaultDynamoDbClient.<init>(DefaultDynamoDbClient.kt:36)
at aws.sdk.kotlin.services.dynamodb.DynamoDbClient$Companion.invoke(DynamoDbClient.kt:64)
at aws.sdk.kotlin.services.dynamodb.DynamoDbClient$Companion.invoke$default(DynamoDbClient.kt:58)
Expected behavior
To not fail
Current behavior
Raises
Caused by: software.amazon.awssdk.crt.CrtRuntimeException: software.amazon.awssdk.crt.CrtRuntimeException: Unable to unpack AWS CRT library UNKNOWN(-1) UNKNOWN(-1)
at software.amazon.awssdk.crt.CRT.loadLibraryFromJar(CRT.java:233)
at software.amazon.awssdk.crt.CRT.<clinit>(CRT.java:33)
... 23 more
Steps to Reproduce
Run the following code:
import aws.sdk.kotlin.services.dynamodb.DynamoDbClient
suspend fun main() {
val client = DynamoDbClient { region = "us-west-2" }
client.listTables { limit = 10 }
}
Possible Solution
Fix related issue : https://github.com/awslabs/aws-crt-java/issues/371
Context
No response
AWS Kotlin SDK version used
0.9.5-beta
Platform (JVM/JS/Native)
openjdk 17.0.1 2021-10-19 LTS
Operating System and version
Darwin Kernel Version 21.1.0: Wed Oct 13 17:33:01 PDT 2021; root:xnu-8019.41.5~1/RELEASE_ARM64_T6000 arm64
Issue Analytics
- State:
- Created 2 years ago
- Reactions:5
- Comments:9 (1 by maintainers)
Top Results From Across the Web
Set up the AWS SDK for Kotlin
Learn the details about how to set up your development environment to work with AWS SDK for Kotlin.
Read more >Can't build to simulator on Apple Silicon
1) I've tried "pod install" & "pod update" with a Rosetta2 version of Terminal. Both complete without error, but Xcode still can't build....
Read more >PyCharm 2020.3.2 Supports Apple Silicon - The JetBrains Blog
We have special news for those of you using Mac with an M1 chip: PyCharm 2020.3.2 is out and brings support for Apple...
Read more >AWS Finally Gets Official SDKs for Rust, Kotlin, and Swift - InfoQ
Previewed at Re:invent, the new AWS SDKs for Rust, Kotlin, and Swift provide idiomatic wrappers around AWS APIs that will allow developers ...
Read more >Apple M1 Processor Overview and Compatibility - Toptal
Sticking to 8GB or 16GB of RAM on the MacBook Air or Mac Mini shouldn't be a problem for most users, but many...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Tried with
0.13.1-beta
, still doesn’t work with Apple Silicon with the same error as above. Any plans to fix it in the upcoming versions?Indeed M1 is now supported in aws-crt-java-0.16.10. Hope we could bump to this version soon 😃