Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AWS SDK does not work with ki shell #303

Closed
kggilmer opened this issue Aug 27, 2021 · 2 comments
Closed

AWS SDK does not work with ki shell #303

kggilmer opened this issue Aug 27, 2021 · 2 comments
Labels
bug This issue is a bug. no-auto-closure We do not want this issue to be automatically closed. p2 This is a standard priority issue

Comments

@kggilmer
Copy link
Contributor

kggilmer commented Aug 27, 2021

Describe the bug

I'm unable to use an AWS client from the interactive Kotlin shell ki.

Expected Behavior

  • I can construct a service client.

Current Behavior

When I construct a service client, I get the following exception:

[1] :dependsOn aws.sdk.kotlin:s3:0.4.0-alpha
[2] import aws.sdk.kotlin.services.s3.S3Client 
[3] val s3c = S3Client { region = "us-east-2" }
java.lang.ExceptionInInitializerError
	at software.amazon.awssdk.crt.CrtResource.<clinit>(CrtResource.java:100)
	at aws.sdk.kotlin.crt.io.TlsContext.<init>(TlsContextJVM.kt:15)
	at aws.sdk.kotlin.runtime.http.engine.crt.CrtHttpEngine.<init>(CrtHttpEngine.kt:29)
	at aws.sdk.kotlin.services.s3.DefaultS3Client.<init>(DefaultS3Client.kt:30)
	at aws.sdk.kotlin.services.s3.S3Client$Companion.invoke(S3Client.kt:31)
	at Line_6.<init>(Line_6.kts:1)

Steps to Reproduce

Run ki shell, type in commands as specified in the Current Behavior section.

Possible Solution

Context

Your Environment

  • AWS Kotlin SDK version used: 0.4.0-alpha
  • Platform (JVM/JS/Native): JVM
  • Operating System and version: Ubuntu Linux 20.04
@kggilmer kggilmer added the bug This issue is a bug. label Aug 27, 2021
@ianbotsf ianbotsf added the no-auto-closure We do not want this issue to be automatically closed. label Jul 11, 2022
@ianbotsf ianbotsf added the p2 This is a standard priority issue label Apr 4, 2024
@lauzadis
Copy link
Member

lauzadis commented Apr 8, 2024

I was able to get the latest version of the SDK working in a Kotlin script (which is what ki uses under the hood). ki itself still does not work because it's compiled using an old version of Kotlin. In general the project seems to be unmaintained.

Kotlin script:

@file:DependsOn("aws.sdk.kotlin:s3-jvm:1.1.13")
import aws.sdk.kotlin.services.s3.S3Client
val s3c = S3Client {
    region = "us-east-1"
}

ki shell:

ki-shell 0.5.2-SNAPSHOT/1.7.0
type :h for help
[0] :dependsOn aws.sdk.kotlin:s3-jvm:1.1.13
[1] import aws.sdk.kotlin.services.s3.S3Client
ERROR Class 'aws.sdk.kotlin.services.s3.S3Client' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1.

Note: The dependsOn coordinate needs to be s3-jvm (s3 does not work), it's likely an issue with how dependency resolution works in Kotlin scripts.

@lauzadis lauzadis closed this as completed Apr 8, 2024
Copy link

github-actions bot commented Apr 8, 2024

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. no-auto-closure We do not want this issue to be automatically closed. p2 This is a standard priority issue
Projects
None yet
Development

No branches or pull requests

3 participants