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
1
vote
0 answers

Scan list of maps from dynamodb with Java SDK v2

I am trying to scan a DynamoDB table that has lists of maps as attribute values. DynamoDB table: { "Name": "n", "Accounts": [ { "address": "a", "name": "b" }, { "address": "c", "name": "d" } } Target Java…
1
vote
1 answer

Choose profile with AWS Java sdk

I work on a multi env AWS project where we use Java for our Lambda functions. Each developer has one AWS account and multiple profiles (Dev, Stg, Prod...). Using the Java SDK, We want to be able debug the Lambda functions locally using Intellij…
1
vote
1 answer

Cognito SRP using AWS Java SDK v2.x

I need to use AWS cognito to take a token and then call a secret API. I have this python script that works. How can I convert it to Java SDK v2? I found a sample that uses the Java SDK V1, but it was not working with v2. from warrant.aws_srp import…
Tina J
  • 4,983
  • 13
  • 59
  • 125
1
vote
1 answer

Errors in reading text file from S3 via AWS Java SDK

Im trying to read a text file from AWS S3 via JAVA SDK v2 and send it back to a client via HTTP (using com.sun.net.httpserver.HttpServer). I want to read the contents as string. But my simple code below doesn't work. What is the problem? How to fix…
1
vote
1 answer

Problems in accessing S3 via AWS Java SDK

I'm trying to get and S3 object size via Java AWS SDK (v2), and send it back via HTTP response (this is all inside a HTTP Server using com.sun.net.httpserver.HttpServer). But it doesn't work and shows me the following debug messages. What's going…
Tina J
  • 4,983
  • 13
  • 59
  • 125
1
vote
0 answers

User is not authorized to perform: SNS:Publish on resource

I want to publish a message to a topic provided by aws (aws has provided me the topic for integration purposes). On topic the policy has all the actions and my account also has AmazonSNSFullAccess policy. { Policy= { "Version":"version_number", …
1
vote
2 answers

Query More Than 100 DynamoDB Items that match a Partition Key using Java SDK 2?

How can more than 100 items from a dynamodb table, matching a particular partition key, be queried using aws java sdk 2? If the number of rows that match a hash key exceeds 100 then the batchGetItemPaginator method needs to be used. This method…
1
vote
0 answers

How to use the aws-sdk-java JmesParser to filter JSON

I am attempting to use the Java JmesParser provided by the aws-sdk-java (I have tried v1 and now v2). Using the test data from the JmesPath website, I am using the following JSON as my inputValue: { "locations": [ {"name": "Seattle", "state":…
DraegerMTN
  • 1,001
  • 2
  • 12
  • 21
1
vote
0 answers

Is possible to filter buckets by prefix using Spring Cloud for AWS?

I'm trying to use the Spring Cloud for AWS to list my buckets, but I'd like to filter the buckets as LIKE operator. org.springframework.cloud
1
vote
1 answer

How to get AWS EC2 AMI image-id of a given operating system using Java sdk describe instances api

How can I get AWS Ec2 image id using describe instance Java SDK api for a given operating system which is free tier as well for the given region? I tried to use the describe Instance api but I don't know how to use…
1
vote
1 answer

AsyncFutureCompletionExecutor vs Netty event loop

I am using the AWS SDK for Java 2.0, together with the Netty HTTP client, and I noticed that there are two different thread pools that can effectively handle a response. The first one is a ThreadPoolExecutor that can be overriden as part of the…
Anvar
  • 1,110
  • 2
  • 10
  • 22
1
vote
1 answer

AWS Credentials with No File IO possible

I have an application that runs inside a framework. The framework does not permit FILE IO and throws all kinds of security exceptions killing my application. I can pass the accessKeyId and secretAccessKey via system properties and they are passed…
DevilCode
  • 1,054
  • 3
  • 35
  • 61
1
vote
2 answers

Error creating dynamo db table Hash Key not specified in Attribute Definitions

I am getting an error for creating a dynamo DB table using AWS SDK for Java 2.0. The hash key is specified but still getting error @Bean ApplicationRunner applicationRunner(DynamoDbClient dynamoDbClient) { return args -> { …
Satya
  • 328
  • 1
  • 7
  • 19
1
vote
1 answer

GetCostAndUsageWithResources mehtod is not available in JAVA SDK

Here I used AWS java SDK for the programmatic access and when I try to call getCostAndUsageWithResources, it is not available. But in java documentation it is mentioned that getCostAndUsageWithResources method is available (Link for the…
1
vote
1 answer

How can I execute an AWS Glue UpdateTable request for an Athena table using the Java SDK?

We're trying to run ALTER DDL statements on existing Athena tables, previously created through a regular Java SDK StartQueryExecutionRequest without saving versions, so we don't run into the TABLE_VERSION Glue limit (see Glue limits link below). We…
mjuarez
  • 16,372
  • 11
  • 56
  • 73
1 2 3
8 9