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

S3 putCustomQueryParameter to return by LastModified?

Using the aws cli I can send a --query to return only the objects since LastModified: aws s3api list-objects --profile --bucket --query 'Contents[?LastModified>=`2017-01-19`][]' Works great, returns only objects >= the date. I'm…
Mike Summers
  • 2,139
  • 3
  • 27
  • 57
3
votes
2 answers

How to get accesskey, secretkey using java aws SDK running on EC2

While running on EC2, the accesskey and secret key can be accessed by the curl command curl http://169.254.169.254/latest/meta-data/iam/security-credentials/ These credentials are not constant and keep changing. I am wondering if there…
Anthony
  • 33,838
  • 42
  • 169
  • 278
3
votes
0 answers

Wait for amazonica S3 copy to complete

I need to copy an object between two S3 buckets in different regions. The object is large enough that amazonica.aws.s3/copy-object fails with the following: AmazonS3Exception The specified copy source is larger than the maximum allowable size for…
Vebjorn Ljosa
  • 17,438
  • 13
  • 70
  • 88
3
votes
1 answer

AWS Cloudformation callback when a stack is completely deleted

I'm working on a AWS CloudFormation management platform which allows users to launch, update and delete stacks on CloudFormation. When a stack is launched, I create a DB entry to associate it with a Template (collection of resources to be created)…
Tom Nijs
  • 3,835
  • 3
  • 22
  • 40
3
votes
1 answer

Amazon S3 SDK with https connection

My current code for a REST based access to copying objects on my S3 bucket does not work. My S3 bucket is configured for https access and also has sse enabled. How would I modify the code below to make it work? Currently, I just get an error message…
everydaylearn
  • 143
  • 3
  • 14
3
votes
1 answer

AWS Java SDK (API Gateway): How to disable an API key

Hi I am trying to disable an API key programmatically, but can't find any documentation. So far I have located 2 classes that might be what I need: UpdateApiKeyRequest and DeleteApiKeyRequest. Problem is that I have no clue what to do with…
2
votes
1 answer

Issue with S3Client on DigitalOcean - Unable to execute HTTP request: Timeout waiting for connection from pool

In our app, we have attachments that are supposed to be secured. These attachments are stored in DO Spaces and we are generating resigned URLs to allow secured access. The logic of signing the URLs looks like this: String getSignUrl(String…
Shurik Agulyansky
  • 2,607
  • 2
  • 34
  • 76
2
votes
0 answers

How to tag a lambda in build.gradle file AWS Java sdk

I have a lambda function that is written in nodejs (using AWS nodejs SDK) and we are using gradle (build.gradle) to package and deploy that to AWS. Deployment is working fine but when I am trying to update tags on this Lambda and redeploying then…
Faisal Shani
  • 698
  • 1
  • 13
  • 37
2
votes
2 answers

AWS SDK for Java S3 bucket Access Key Id issue

I am trying to access an Amazon S3 bucket programmatically through Java libraries. (to do basic cloud management from a third-party application). As a first step, I tried to print whether a bucket exists or not(3rd line) AWSCredentials…
2
votes
1 answer

Include S3 object user defined metadata in list reponse

Is there a way to get a S3 object user defined metadata by AmazonS3 listObjectsV2? The only way I see in order to fetch this metadata is after listObjectsV2 request make another getObjectMetadata or getObject request.
zeugor
  • 822
  • 1
  • 8
  • 18
2
votes
1 answer

difference between Interface S3Client and Class AmazonS3Client

I am creating a method that needs a S3 client as a parameter. I do not know what type should I declare it to be. this is the doc for S3Client https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/services/s3/S3Client.html Ignore since…
xiaokang lin
  • 153
  • 1
  • 10
2
votes
0 answers

Spring boot 2.4 - must provide an explicit region in the builder or setup environment to supply a region

I'm using Spring Boot 2.4.5 and Spring Cloud 2.3.1 and referred to these docs to implement an S3 service in my Spring boot project - spring blog and spring cloud documentation. My configurations are as shown…
2
votes
1 answer

Fetching specific fields from an S3 document

I am using AWS Java SDK in my application to talk to one of my S3 buckets which holds objects in JSON format. A document may look like this: { "a" : dataA, "b" : dataB, "c" : dataC, "d" : dataD, "e" : dataE } Now, for a certain…
Kunal gupta
  • 481
  • 2
  • 7
  • 19
2
votes
2 answers

AmazonClientException: More data read has a different length the expected

When I try to upload content to an Amazon S3 bucket, I get an AmazonClientException: Data read has a different length than the expected. Here is my code. public Object uploadFile(MultipartFile file) { String fileName =…
R M
  • 69
  • 1
  • 7
2
votes
0 answers

How to authenticate to AWS using Java SDK and SSO

I am trying to find sample code to authenticate to AWS using the Java SDK (auth via SSO). If anyone has done this and could please share, that would help.