185 questions
0
votes
1
answer
79
views
SQS endpoint resolution by AWS SDK
I am configuring SQS client as shown in the below snippet:
SqsClient client = SqsClient.builder()
.region(region)
.credentialsProvider(DefaultCredentialsProvider.create(...
0
votes
1
answer
69
views
quarkus-logging-json wraps AWS SDK EmfMetricLoggingPublisher logs
I'm using quarkus-logging-json in my project and want to add automatic EMF logs to my Lambda clients like this:
LambdaAsyncClient.builder()
.httpClient(NettyNioAsyncHttpClient.create())
...
0
votes
0
answers
82
views
Why does CloudFlare R2 calculate a different SignatureV4 when using awssdk's S3AsyncClient
Using software.amazon.awssdk:s3:2.32.11 I started with the following code:
var objectKey = "test.txt";
var path = Path.of("/tmp/test/log.txt");
var credentials = ...
0
votes
0
answers
93
views
Recording and reusing an AWS JSON response
I'm trying to use an existing AWS JSON response to do exploratory tests with so I don't use resources I don't have permissions for. My company has strict AWS permissions although someone has given me ...
0
votes
0
answers
192
views
Auto populate timestamp Issue AWS SDK v2 in DynamoDB Java
In aws sdk v1 :
@DynamoDBAutoGeneratedTimestamp(strategy = DynamoDBAutoGenerateStrategy.CREATE)
Above annotation was there to create auto generated time field.
In aws sdk v2 replaced with below code:
...
1
vote
1
answer
111
views
What does AWS mean when they say that there are scalability issues with Checked Exceptions? [closed]
I am upgrading AWS' Java SDK from 1.x to 2.x. In 2.x, it seems that most exceptional cases are modeled with Unchecked Exceptions, as opposed to Checked Exceptions like it was in 1.x.
When trying to ...
0
votes
0
answers
96
views
How to verify that two files are equal using Java AWS SDK
I am looking for the way how to compare two files (especially large files) in S3 within the same bucket using Java AWS SDK.
I do not need to verify whole bucket if there are duplicates. As I ...
0
votes
0
answers
51
views
Why is AWS EC2 Describe Tags endpoint override being stripped in AWS SDK for Java v2.25+
My Java microservice is using the AWS SDK for Java v2.21.
I construct an EC2 Client in this way:
Ec2Client.builder().credentialsProvider(DefaultCredentialsProvider.create())
.endpointOverride(...
0
votes
0
answers
22
views
Is there a simple way to get the progress of an uploadDirectory request to S3TransferManager?
In the AWS SDK v1, it was possible to add a ProgressListener directly to a MultipleFileUpload object and set up logging in the progressedChanged method so that the progress of a directory upload could ...
1
vote
1
answer
182
views
Java Amazon SDK 2.x equivalent for the 1.x "S3Objects" utility class
I'm migrating a java project that was using the AWS SDK 1.x to list and iterate through objects lazily in S3.
S3Objects iterableS3Objects = S3Objects.withPrefix(amazonS3, myBucketName, myPrefix);
for ...
0
votes
1
answer
698
views
How to set the request body for POST request using the AwsCrtHttpClient (AWS CRT HTTP Client?)
I am creating HTTP requests with the AWS CRT HTTP Client, but I cannot find a way to set the request body. I am using Java 11 with the AWS SDK version 2.27.9. No matter how I configure this ...
1
vote
1
answer
92
views
How to use the AWS CRT HTTP Client with Hoverfly?
I would like to implement the AwsCrtHttpClient and intercept the HTTP requests in the unit tests with Hoverfly, but Hoverfly is not intercepting the requests. The client is initialized like: private ...
2
votes
0
answers
155
views
AWS SDK Https calls from EKS pod slower than ECS
I have a Spring Boot reactive application running on both ECS and EKS, with similar hardware configuration (cpu:6 and memory 16G).
This applications has a REST API endpoint that updates multiple ...
1
vote
0
answers
108
views
AWS S3 SDK v2 Upload Adds Random String Prefix to JSON File
I'm using the AWS SDK v2 for Java to upload JSON data to an S3 bucket. However, after the upload, the file in S3 contains a random string prefix and the JSON data appears to be incomplete or corrupted....
0
votes
0
answers
161
views
AWS MQTT3 Websockets Connection Closed Unexpectedly
I'm trying to connect to AWS MQTT3 via websockets with authentication from Cognito, but I'm getting Caused by: software.amazon.awssdk.crt.mqtt.MqttException: The connection was closed unexpectedly.. ...
0
votes
1
answer
253
views
Amazon SQS Do I need to make DeleteMessage request to eliminate message or does some other way exist to delete the message from the queue?
I am new to AWS and wanted to ask a question about Amazon SQS and AWS SDK. From my understanding SQS has visibility timeout feature and after making ReceiveMessage request call the message gets hidden ...
1
vote
1
answer
995
views
AWS Java SDK 2 (putObject) + MinIO: The authorization mechanism you have provided is not supported. Please use AWS4-HMAC-SHA256
I have run MinIO in a docker container, created a bucket (test), made the bucket as public, created access key, set a server location (us-east-1).
After that I build a client:
final S3Client client = ...
0
votes
1
answer
186
views
S3EncryptionClient (not async) Unable to execute HTTP request: headersFuture is still not completed when onStream() is invoked
We are migrating to the latest versions (2.24.5) of aws-sdk and amazon-s3-encryption-client-java
The code where I create S3EncryptionClient and call it (3.1.1 library version)
I want to read the S3 ...
0
votes
1
answer
241
views
aws sdk: Where is located S3EventNotification
Here my SQS listener class:
@RequiredArgsConstructor
@Slf4j
@Service
public class SQSS3CreatedNotificationService {
private final FluxProperties fluxProperties;
private final ...
1
vote
0
answers
799
views
java.lang.NoSuchFieldError: IDENTITY_PROVIDERS calling build method for Ec2ClientBuilder
Trying to get Ec2Client using following code:
AwsCredentials awsCredentials = AwsBasicCredentials.create("<ACCESS_KEY>", "<SECRET_ACCESS_KEY">);
AwsCredentialsProvider ...
3
votes
0
answers
421
views
What are the NettyNioAsyncHttpClient default configuration values?
The AWS SDK netty HTTP client is configurable through NettyNioAsyncHttpClient.Builder, but I can't find any documentation on the default values.
In particular I'm using the firehose SDK and looking ...
0
votes
0
answers
51
views
Return custom code and message from AWS Lambda with Java
I have this test code:
package process;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.RequestBody;
import process.dto.Request;
@...
0
votes
1
answer
1k
views
Getting connection timeout while reading file from s3 using aws sdk 2x
I have a batch application which reads large file from amazon s3. MyS3 config:
@Configuration
public class S3Configuration {
@Bean
public S3Client s3Client() {
...
-1
votes
1
answer
5k
views
Why do I get Unable to unmarshall exception response using the AWS SDK for Java?
I have a Java 17 project, which interacts with DynamoDB Local and configures and deploys it while running tests.
Here is some of the code I have in my test:
var mapper = new DynamoDBMapper(...
1
vote
1
answer
399
views
AWS Java SDK: Creating a role and Lambda, Lambda cannot assume role
I am trying to get used to the Java SDK for AWS but I am failing to get some basic stuff done. The code is supposed to do the following:
Upload a zip file to s3 bucket
create execution role for ...
1
vote
3
answers
484
views
No method for setObjectAcl in AWS Java SDK v2.x
I am upgrading a legacy java application that used AWS SDK v1.5 for S3 operations, and one of the functions it had to do was to change an objects ACL, from private to public-read, based on certain ...
1
vote
0
answers
957
views
AWS Java SDK V2 and aws-secretsmanager-jdbc incompatibility?
I have a Java application that uses some V2 dependencies to manage our AWS environment. Than, these are my other aws dependencies
<dependency>
<groupId>software.amazon.awssdk</...
0
votes
1
answer
1k
views
Replacement of AWSCredentialsProvider#refresh() in AWS SDK Java v2
I used to have a custom implementation of the AWSCredentialsProvider's refresh() method then when I migrated to the AWS SDK v2, the AwsCredentialsProvider does not provide such a method anymore. How ...
1
vote
1
answer
1k
views
How do I set up LocalStackContainer for KMS using the AWS Java SDK v2?
My KMSClient is being instantiated way before LocalStack is started and I don't know how I should initialise my KmsClientBuilder to override the endpoint.
KmsClient.builder().endpointOverride("...
1
vote
0
answers
584
views
Localstack S3 + AWS Java SDK keeps erroring with inexistent Key ID
While this question has been asked multiple times, none of the answers I came across seem to make any difference in my case... (Like this one or this one)
I'm using the latest Java SDK (0.21.11 as of ...
0
votes
0
answers
171
views
Efficiently migrate Blobs from Oracle table into S3-Glacier
Scenario :- I have a Live table with few String columns(<10) and 1 Blob column (to hold binary for PDF).This in on premise cloud in Oracle 19c.
Each Blob item has an average size of 2MB, current ...
1
vote
1
answer
1k
views
Attribute not getting updated while using DynamoDB Enhanced Client
I was updating one of our DynamoDB entities with new attributes.
One of the new attribute is called isEnabled which is of type of String.
It isn’t getting stored in DynamoDB.
This is an example of the ...
0
votes
0
answers
85
views
AmazonS3ClientBuilder Internal Server Error on Lambda
I have a LambdaFunction on Java 17 and I get a Internal Server Error, if i try to add the s3Client code snippet into my codebase. I really don't know how to get rid of it.
Because of IAM I don't have ...
1
vote
3
answers
2k
views
Can I use application.properties to define the S3 endpoint for the AWS SDK for Java?
I'm working on a Spring Boot application that interfaces with AWS S3, and I need to use LocalStack.
I want to configure the endpoint in application.properties rather than in the Java code with ....
0
votes
1
answer
158
views
Invalid response from AWS KMS GeneratedDataKey: Invalid ciphertext (AWS Database Encryption SDK - DynamoDB)
When using AWS Database Encryption SDK I'm facing the error "Invalid response from AWS KMS GeneratedDataKey: Invalid ciphertext".
By debugging the AWS SDK v2 (Java), I found that the length ...
1
vote
1
answer
827
views
Create Instance of GetRequestObject AWS S3 for Mock
I have written this function to get object from S3, now I want to write Unit Test cases for the same. I am not able to mock "s3Client.getObjectAsBytes(objectRequest)" so that I can get mock ...
1
vote
0
answers
86
views
Is it possible to use dyanmodb streams with encrypted data?
I am doing some investigation on whether it is possible to use DynamoDB streams with encrypted data using the latest DynamoDB sdk updates i.e. can DynamoDB streams decrypt data that was encrypted ...
0
votes
1
answer
241
views
DynamoDbMapper.S3Link equivalent code in aws-java-sdk-2
I am working on migrating some DynamoDB code from version 1 of the AWS Java SDK to version 2 of the SDK. I have been unable to find an equivalent code for the DynamoDbMapper.S3Link in version 2 of the ...
-1
votes
2
answers
1k
views
Error creating bean with name 'dynamodbClient': Lookup method resolution failed
Java: 20.0
Springboot: 3.0.1
Dependency
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-sdk-java</artifactId>
<version>2.20....
1
vote
1
answer
131
views
How to detect Comprehend Service failure and test with SDK
My application consumes many AWS services, and some services like Comprehend needs the region to be defined while building the client. I want to know specifically about Comprehend:
how to detect if ...
1
vote
1
answer
840
views
AWS Java SDK - Is it possible to create an REST API with lambda backend
Is it possible to create a REST API with lambda backend using AWS Java SDK?
I have been able to create HTTP API using software.amazon.awssdk.services.apigatewayv2.ApiGatewayV2Client with a lambda ...
2
votes
1
answer
1k
views
AWS SDK Java Version 2 - Is there an equivalent of S3ObjectSummary from version 1
I am using S3ObjectSummary previously in my code with version 1 and I am now migrating my code to SDK 2.20. What's the equivalent of S3ObjectSummary in SDK 2.20?
0
votes
0
answers
1k
views
AWS SDK for Java 2.x: How to configure S3Client with access-key, secret-key and role-arn?
I use Spring boot 3 and AWS SDK for Java 2.x
When I try to create S3Client I get an error:
software.amazon.awssdk.services.sts.model.StsException: User: arn:aws:sts::SOME_NUMBER:assumed-role/SOME_TEXT/...
0
votes
1
answer
666
views
Hibernate Search AWS OpenSearch Serverless connection problem
I am using Hibernate Search v. 6.1.8.Final within my Spring Boot application. My implementation works for OpenSearch v. 2.5 which runs locally and in Kubernetes.
Besides the basis libraries I include ...
0
votes
1
answer
341
views
How to query a list of partitionKeys with Dynamo DB Enhanced Client in AWS SDK v2
I have a table with both partitionKey and sortKey are defined.
Per https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/ddb-en-client-use-multirecord-query.html, I can query single ...
0
votes
1
answer
571
views
Add support for AWS IAM token connection to Redis
Im trying to connect to an AWS ElasticCache Redis server but I always got this error :
{
"name": "Redis connection health check",
"status": "...
3
votes
0
answers
857
views
High latency observed while calling AWS sagemaker and online feature-store service
We have recently done an integration with AWS SageMaker and FeatureStore for one of our use-case. On Cloudwatch, we could see the p99: 50-60ms(Overhead + Model) for sagemaker and p99: 15-20ms for ...
1
vote
2
answers
414
views
DynamoDB - DynamoDbAtomicCounter return always null
I am following this document:
https://aws.amazon.com/blogs/developer/using-atomic-counters-in-the-enhanced-dynamodb-aws-sdk-for-java-2-x-client/
My goal is to use AtomicCounter to generate unique IDs, ...
1
vote
0
answers
175
views
How do I build a Policy POJO with Statements with Resources in AWS SDK for Java v2.x?
All the v2 documentation around the subject just assumes an already serialized json string, but in our existing code using the v1 SDK we easily create Policy objects with Statement objects with ...
2
votes
0
answers
430
views
Unable to fetch the custom properties from AWS secret manager for micronaut application invoked by AWS lambda function
I am getting below error :
Unable to execute HTTP request: Connect to secretsmanager.eu-central-1.amazonaws.com:443 [secretsmanager.eu-central-1.amazonaws.com/ipadress, secretsmanager.eu-central-1....