I’m uploading files to s3 using the s3 AWS client in my spring application, but sometimes I’m getting the error, So as a solution to this I used the following approach and it worked for now. I have created this as a Spring Bean. But I am using this in a multithreading environment. So there will many concurrent requests at
Tag: amazon-s3
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: Now, for a certain document lets say document1 I need to fetch the values corresponding to field a and b instead of fetching the entire document. This sounds like something that
Image and PDF files getting corrupted while uploading on AWS S3
I am trying to upload images and PDF on AWS S3 using my Spring Boot app. They are getting uploaded in corrupt format without any error. Text files are uploaded successfully. Below is the dependencies we have used. Answer My code works fine. The issue was in the AWS API Gateway. We need to add ‘*/*’ in the Binary Media
AWS Transcribe S3 .wav file to text
I am trying to use aws Transcribe to convert a wav file to text. I have uploaded a wav file to S3, which is located here and it has public read/write permissions: https://s3.us-east-1.amazonaws.com/csld8xmsdksdf8s9sk3mmdjsdifkjksdijsldk/Transcribe2.wav. The wav file is valid. I can download it in my browser and replay it (and it sounds like the origin recording), so I think we can
AWS Exception “Requests specifying Server Side Encryption with AWS KMS managed keys require AWS Signature Version 4” even after set the v4 signature
I have below code to connect to AWS S3. However, I got an error I googled online, and the suggestion is to set the signature to version 4, which I did already. Any thoughts? Note my aws jdk is pretty dated as I cannot upgrade it due to some other libs conflicts. Answer Setting AWS SDK client configuration to V4
Save text pdf direct to s3 without having to save it locally
I am generating pdf files using itext 5 and Java, and saving them locally then saving these local saved files on AWS S3. Is there a way to just send them straight to S3 without having to save them locally. I have seen a few examples but none is working for me. This is how am generating the pdf file
Getting NoSuchMethoError While uploading file on Amazon S3 bucket
I was trying upload the file in Amazon s3 bucket using the server-less architecture below is the described flow ApiGateway->lambda->s3bucket I am sending Request using postman, image is encoded …
aws s3 sdk returns “You have attempted to create more buckets than allowed”
I’m using aws s3 SDK in my code. In my tests I’m trying to create/drop buckets for the test. My sdk version is 1.11.800 : The creation’s code is exactly the same as in aws examples : The exception : I got more than 100 buckets in my account but when I try to create a bucket in the aws
How do I set up an AWS S3 Object Redirect via the Java SDK
I’m asking this question in order to answer it and point others in the right direction faster then I got there. I spent far too long looking for the answer as most S3 Object Redirection questions and their answers had to do with the technical detail of confusing the S3 bucket access point for the S3 website access point. What,
Selectively extract entries from a zip file in S3 without downloading entire file
I am trying to pull specific items out of massive zip files in S3 without downloading the entire file. A Python solution here: Read ZIP files from S3 without downloading the entire file appears to work. The equivalent underlying capabilities in Java appear to be less lenient in general so I’ve had to make various adjustments. In the attached code