You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
3) Add the `aws.accessKeyId` and `aws.secretKey` properties:
18
+
19
+
.application.conf
20
+
[source, properties]
21
+
----
22
+
aws.accessKeyId = "your access key id"
23
+
aws.secretKey = "your secret key"
24
+
----
25
+
26
+
This step is optional if you choose one of the https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/credentials-chain.html[default credentials mechanism].
27
+
28
+
4) Install
29
+
30
+
.Java
31
+
[source,java,role="primary"]
32
+
----
33
+
import io.jooby.awssdkv2.AwsModule;
34
+
35
+
{
36
+
install(
37
+
new AwsModule() <1>
38
+
.setup(credentials -> { <2>
39
+
var s3 = S3Client.builder().build();
40
+
var s3transfer = S3TransferManager.builder().s3Client(s3).build();
41
+
return Stream.of(s3, s3transfer);
42
+
})
43
+
)
44
+
);
45
+
}
46
+
----
47
+
48
+
.Kotlin
49
+
[source, kt, role="secondary"]
50
+
----
51
+
import io.jooby.awssdkv2.AwsModule
52
+
53
+
{
54
+
install(
55
+
AwsModule() <1>
56
+
.setup { credentials -> <2>
57
+
val s3 = S3Client.builder().build()
58
+
val s3transfer = S3TransferManager.builder().s3Client(s3).build()
59
+
return Stream.of(s3, s3transfer)
60
+
}
61
+
)
62
+
);
63
+
}
64
+
----
65
+
66
+
<1> Install module
67
+
<2> Setup one or more services
68
+
69
+
Services created from setup function are:
70
+
71
+
- Registered in the application service registry, for require call usage or DI framework
72
+
- Services are shutdown at application shutdown time
getLog().info("Access to maven properties is available from ascii files. If you want to access to `${avaje.inject.version}` uses the `{avaje_inject_version}` syntax and make sure to set the `subs` attribute, like:\n\n" +
40
+
"[source, xml, role = \"primary\", subs=\"verbatim,attributes\"]\n" +
0 commit comments