Questions tagged [aws-java-sdk]

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.

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.

Links

548 questions
3
votes
1 answer

Unable to find a region via the region provider chain with spring-cloud-starter-aws-secrets-manager-config

I am seeing the following exception with spring-cloud-starter-aws-secrets-manager-config Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'awsSecretsManagerPropertySourceLocator' defined in…
user3600073
  • 1,773
  • 3
  • 18
  • 21
3
votes
1 answer

Cross account SQS access with IAM roles

I am running EC2 instance in account A & have SQS queues in account A & B. My application is running on EC2 instance of account A. Message listener is getting the queueUrl & polling the messages from queues which can be in account A or B. Here is…
RCS
  • 1,370
  • 11
  • 27
3
votes
2 answers

How to measure request for minute for AWS Java SDK

I want to gain some insights into the performance of my application that connects to several services in AWS e.g. IAM and S3. One metric interesting to me is requests-per-minute, I have checked around for possible approaches, AWS Metrics is limited…
SyCode
  • 1,077
  • 4
  • 22
  • 33
3
votes
2 answers

Cognito user pool: How to use refreshToken to get new accessToken after accessToken gets expired in aws cognito java sdk?

I am using aws cognito in scala play framework based web app as user management solution. I am using following code to login. var mIdentityProvider: AWSCognitoIdentityProvider = getAmazonCognitoIdentityClient; def sessionLogin(userName: String,…
3
votes
1 answer

Is it safe to return an ResponseEntity that wraps S3Object.getObjectContent() in REST controller?

I'm developing an Spring Boot Application, that should allow users to download files indirectly from Amazon S3 via specified application REST interface. For this purpose I have an REST-Controller, that returns an InputStreamResource to the user like…
ilja
  • 351
  • 2
  • 14
3
votes
1 answer

How to create an s3 download link which will expire only after 6 days

I want to generate an s3 link to download a file, the link should be live for at least 6 days. I have tried with options InstanceProfileCredentialsProvider(false)(Which worked only for 24 hours), ProfileCredentialsProvider(doesn't even create a link…
user3132347
  • 363
  • 1
  • 7
  • 27
3
votes
1 answer

AWS SQS operations in lambda takes too long on cold start

I've got a Lambda that uses the AWS Java SDK. In this lambda's handler, I've got code that looks like this: AmazonSQS sqs = AmazonSQSClientBuilder.defaultClient(); sqs.sendMessage( ... ) I'd expect the above lines to be pretty fast, and for most…
V Maharajh
  • 9,013
  • 5
  • 30
  • 31
3
votes
1 answer

AwsS3 client throws error on initialization

I am seeing this crash whenever I am trying to initialize aws s3 client. I tried looking for solutions but didn't found any. BasicAWSCredentials awsCreds = new BasicAWSCredentials(amazonAccessId, amazonSecretKey); Amazon S3 s3Client =…
3
votes
1 answer

Autogenerated code in amazon swf flow framework throws syntax error

I am trying our amazon's SWF flow framework, but I am getting the below error and the project does not compile. I am using maven for my dependency management and I'm running my code from Intellij. [INFO]…
vikkyhacks
  • 3,190
  • 9
  • 32
  • 47
3
votes
1 answer

Mapping Java Optional with DynamoDBMapper annotations

Is there a clean way to map Optional fields with DynamoDBMapper, for both basic types and arbitrary/custom objects? I believe one option would be to implement DynamoDBTypeConverter for optionals of basic types (Optional, Optional,…
ergomes
  • 121
  • 1
  • 4
3
votes
0 answers

How to mock a mapper.query method when the return type is a PaginatedList of items JAVA

I am trying to test a method that uses DynamoDBMapper to query items from a dyamoDB table. My method works fine but the problem comes when I'm trying to test. I'm using Junt4 and Mockito. Basically, I'm just trying to test that my method does its…
cdcrazy2292
  • 69
  • 1
  • 6
3
votes
4 answers

Error in uploading lambda"Unable to export project to jar"

I am trying to use the Eclipse Java Toolkit. I followed the instructions on the AWS website (User Guide) to install Eclipse and the Toolkit. I was following tutorial. When I am trying to upload lambda then I keep getting the following error. Stack…
A Kumar
  • 113
  • 2
  • 12
3
votes
1 answer

Plain POJO without any annotations in AWS DynamoDB

How do I use a plain POJO class without any annotations to create tables in DynamoDB? I also have to perform basic CRUD operations on them. `@DynamoDBTable(tableName="ProductCatalog") public class CatalogItem { private Integer id; private String…
Viman
  • 41
  • 4
3
votes
2 answers

AWS Java SDK behind a corporate proxy

I want to test my AWS code locally so I have to set a proxy to a AWS client. There is a proxy host (http://user@pass:my-corporate-proxy.com:8080) set in my environment via a variable HTTPS_PROXY. I didn't find a way how to set the proxy as whole so…
Barney
  • 797
  • 1
  • 11
  • 20
3
votes
1 answer

Amazon SNS Inline Java Subscription for Testing

I want to test a live component which as a result of execution sends a message in a SNS topic. Is there a way how to create an "inline" client subscription with Java SDK? Something line this (pseudocode): @Test public void testProcessingResult()…
ttulka
  • 10,309
  • 7
  • 41
  • 52