Questions tagged [aws-java-sdk-2.x]

The AWS SDK for Java provides a Java API for Amazon Web Services. Using the SDK, you can easily build Java applications that work with Amazon S3, Amazon EC2, DynamoDB, and more.

Version 2.x is a major rewrite of the 1.11.x code base. Built with support for Java 8+, 2.x adds several frequently requested features, like nonblocking I/O, improved start-up performance and automatic iteration over paginated responses. In addition, many aspects of the SDK have been updated with a focus on consistency, immutability, and ease of use.

Links

125 questions
0
votes
1 answer

AWS Java 2.x TransferManager How to get TransferState in TransferListener?

In the new AWS Java SDK v2 TransferManager how do I get the equivalent of com.amazonaws.services.s3.transfer.TransferState in the v1 TransferManager? I assume it's using a TransferListener and the SdkResponse, but would rather not have to experiment…
Novaterata
  • 4,356
  • 3
  • 29
  • 51
0
votes
0 answers

AWS Java SDK 2 - Upload Directory to S3 using S3TransferManager and SHA-256 checksum

I am currently writing a Java application to handle files and directories transfers to AWS S3. I am new to the AWS Java SDK and use version 2.20.22 for my current development. One of the key feature I want to include is to use a strong enough…
MentalW
  • 1
  • 2
0
votes
0 answers

aws-java-sdk sqs async call is blocking eventloop

import AwsConfig; import com.google.inject.Inject; import io.reactivex.rxjava3.core.Completable; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import software.amazon.awssdk.services.sqs.SqsAsyncClient; import…
venkatesh .b
  • 83
  • 1
  • 1
  • 7
0
votes
0 answers

Set "Description" in RestoreRequest for S3 object retrieval from GDA to Standard storage using AWS Java SDK v2

Creating an Object Restore request from AWS S3 Glacier Deep Archieve to AWS S3 standard storage using AWS Java SDK V2 with the following code. Which works successfully with these parameters specified for restoreRequest object! try { S3Client…
0
votes
1 answer

AWS Java SDK DynamoDB, how to get attribute values from ExecuteStatementRequest response?

I'm using Java AWS SDK to query a DynamoDB table using ExecuteStatementRequest, but I'm don't know how to fetch the returned attribute values from the response. Given I have the following query: var response2 =…
João Pedro Schmitt
  • 1,046
  • 1
  • 11
  • 25
0
votes
1 answer

How to escape reserved keywords in DynamoDB ExecuteStatementRequest?

I'm trying to issue an update ExecuteStatementRequest using DynamoDB and Java SDK 2.0. I'm struggling to escape keywords that are columns in my table schema. The following statement: var response =…
0
votes
0 answers

Getting `S3Exception` when executing download operation with `S3TransferManager` AWS SDK 2.19

I am using the S3TransferManager with S3AsyncClient in my service code. I am testing this code with localstack docker S3 service. I have the local stack S3 service and created the bucket test and uploaded one file test.txt on docker service…
Kunal Varpe
  • 419
  • 1
  • 5
  • 28
0
votes
0 answers

How to do make or get an asynchronous AnonymousCredentialsProvider in the AWS JDK version 2

I need to make anonymous asynchronous requests to a public bucket in S3 from Java, using the JDK (presumably, version 2.x). When I try, it waits forever. I suspect this is because AnonymousCredentialsProvider may not be asynchronous. Code below…
John Moore
  • 332
  • 2
  • 14
0
votes
0 answers

List Rule scheduled triggers from AWS EventBridge

I'm building an application that uses EventBridge Rule scheduler, and it schedules many triggers using a Cron expression. How could I use the Java SDK 2 to list the rule schedules dates?
0
votes
1 answer

How to fix JSON string uploading to S3 with contents of "[value: string]" rather than actual data

In Scala, I'm using the AWS Java SDK to upload a simple JSON string (containing a few rows of data from a database). The upload appears to work fine but the content of the uploaded file once it's in the S3 bucket is just "[value: string]" instead of…
Alex Kerr
  • 956
  • 15
  • 44
0
votes
1 answer

GROUP BY-Like query in DynamoDB with DynamoDbEnhancedClient

I'm trying to write a Query in DynamoDB with logic similar to a GROUP BY in SQL. Let's consider the following table with partition key simulation_id: Simulation (Table): simulation_id_1 - type_1 - ... simulation_id_1 - type_1 - ... …
Nano
  • 814
  • 2
  • 13
  • 30
0
votes
0 answers

How to get the autoscaling group name from software.amazon.awssdk.services.ec2.model.Instance object

I have a few ec2s and I know their private ips. I probably can get those instances with the following java code (havent tried yet) List ec2ips = new ArrayList(); ec2ips.add("100.71.234.22"); ec2ips.add("100.71.234.12"); Filter…
user2175783
  • 1,291
  • 1
  • 12
  • 28
0
votes
1 answer

AWS SDK2 java s3 select example - how to get result bytes

I am trying to use aws sdk2 java for s3 select operations but not able to get extract the final data. Looking for an example if someone has implemented it. I got some idea from [this post][1] but not able to figure out how to get and read the full…
0
votes
0 answers

AWS SQS Receive Message and Delete message with JAVA

I am doing some operations which will publish messages to an SQS, a standard SQS, not a FIFO one. After that I am trying to receive both the messages from SQS and delete both of them. I have written the following code for receiving and deleting…
0
votes
0 answers

Specifying Catalog Id in AWSGlueClient, Java SDK

I want to create an AWSGlueClient to access resources from AWS Glue Catalog in a different account. All the IAM for cross-account access is set, but I can not find a way to specify Glue Catalog Id (so account id) upon AWSGlueClient instantiation…
1 2 3
8 9