Questions tagged [aws-sdk-java]

56 questions
9
votes
4 answers

Query with DynamoDB Secondary Index AWS SDK 2 Java exception creating DynamoDbIndex object

I'm having trouble running a query against a secondary index, getting an exception: Ex getting dynamodb scan: java.lang.IllegalArgumentException: Attempt to execute an operation that requires a secondary index without defining the index attributes…
Steve Mansfield
  • 341
  • 1
  • 2
  • 7
4
votes
2 answers

Why is creating a new project in AWS SDK for Java (Eclipse IDE) throwing a NoSuchMethodError?

I am getting started with the AWS SDK for Java in Eclipse IDE - have set it up using this link. Went to start programming and selected Create a New AWS Java Project (using one of the samples provided, in a new workspace), and pressed OK and it…
4
votes
1 answer

How to set Policy conditions in Java AWS S3 SDK presigned url

I use Java AWS S3 SDK to presign my requests. I have the following code: var request = new GeneratePresignedUrlRequest(bucketName, filename) .withMethod(method) .withExpiration(expiration()); // do something with request return…
3
votes
0 answers

Convert DynamoJson to something compatible with the Dynamo client

I've got a big dump of DynamoJson e.g. {"Item": {"id":{"N":"896"}, "name": {"S": "Tom"}}} I want to parse this JSON and put it to my DynamoDB table... I've tried: import com.amazonaws.services.dynamodbv2.document.Item; Item item =…
mickzer
  • 5,958
  • 5
  • 34
  • 57
3
votes
1 answer

Error in dynamoDB mapper scan() : java.lang.NullPointerException: null

I am getting below error while calling dynamoDBMapper.scan(Person.class, new DynamoDBScanExpression()) java.lang.NullPointerException: null at com.amazonaws.services.dynamodbv2.model.ScanRequest.setScanFilter(ScanRequest.java) at…
Shrinivas Shukla
  • 4,325
  • 2
  • 21
  • 33
3
votes
0 answers

How to use UpdateItemRequest in a DynamoDB transaction?

I have a Java Spring application, where I use DynamoDB, so far without transactions. However, I have recently come across a new use case, which requires persisting together related objects. I am new to this topic, and have therefore read about…
Elegie
  • 340
  • 1
  • 5
  • 16
2
votes
1 answer

SQS - Sending payload with JSONObject push empty objects

I was testing different payload structures accepted by AWS SDK (org.springframework.cloud:spring-cloud-starter-aws-messaging:2.2.6.RELEASE). I am sending the message using convertAndSend function provided by QueueMessagingTemplate. I am able to send…
Gayathry S
  • 91
  • 11
2
votes
2 answers

How to remove attribute from item in DynamoDB table?

I have an item whose particular attribute I want to remove using SDK 2.x from DynamoDB. How do I do this? I am using enhanced DynamoDB for table management. Here's a code sample: DynamoDbTable mappedTable = AwsConfig.getTableSchema(schema,…
2
votes
1 answer

Uploading to GCS using S3 Java SDK: `The MD5 you specified in Content-MD5 or x-goog-hash did not match what we computed`

I am trying to upload to Google Cloud Storage using the AWS SDK For Java 1.x. I have enabled interoperability mode and put AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY in the environment. I can list objects, but uploading is not working for me. The…
David
  • 9,288
  • 1
  • 20
  • 52
2
votes
2 answers

AWS Java SDK: updating a Route53 zone record with new RDS instance info

Java 8 using the AWS Java SDK here. I have a private hosted zone (PHZ) of, say, myapp.example.com and I have an A record in that zone called db.myapp.example.com which points to an RDS instance. I am now writing a Lambda (Java) that will create a…
2
votes
0 answers

Unknown key Message when using Aws Cloudfront Signed URL With Java

I am getting an error code in Browser when I am accessing the S3 bucket object using Cloudfront Signed URL. I think I have followed the same approach for creating a SignedUrl. Created a simple S3 bucket with settings for the bucket remained the…
2
votes
1 answer

How to put Label in email using AWS SES?

I have used this code to send email using AWS SES: package com.amazonaws.samples; import java.io.IOException; import com.amazonaws.regions.Regions; import com.amazonaws.services.simpleemail.AmazonSimpleEmailService; import…
Sachita
  • 61
  • 6
2
votes
0 answers

Trying to do resume upload for AWS S3 with java sdk. But it is starting from scratch always to upload

I am trying to upload a file with AWS SDK to demonstrate upload break due to any reason. But I see it is uploading from the beginning always. The code there is pretty straight-forward, but the problem comes with saving persistent obj status so that…
Raj
  • 21
  • 3
2
votes
0 answers

Propagate X-B3-TraceId between applications using SNS and SQS

I have 2 spring based applications both of them uses spring-sleuth. Application-1: AmazonSNS snsPublisher; snsPublisher.publish(message) I would like to add MDC context here somehow, so that application-2 can use the same context. Is there any…
2
votes
0 answers

Overriding default SdkClientOption.SCHEDULED_EXECUTOR_SERVICE in AWS SDK for Java 2

Is there a way I can override the default SdkClientOption.SCHEDULED_EXECUTOR_SERVICE in AWS SDK for Java 2? I want to get rid of all the threadpools that are opaque to the application, and ensure that the threadpools are reused across all…
1
2 3 4