Reputation: 2238
So we have a use case where we need to be able to download the S3
files from the outside world on the internet. For this we are creating s3 pre signed url
as below. My doubt is how can we access this on the internet? Are these urls accessible by default on the internet. Or do we need to create a proxy.
https://<bucket-name>.s3.amazonaws.com/<filename><some other parameters>
Upvotes: 0
Views: 805
Reputation: 10734
The URL you are showing is not a Pre-signed URL. A Pre-signed URL look like this:
Once you generate a valid Pre-signed URL, you do not need a proxy. A user can download the object in the given time window - which you define when you create GetObjectPresignRequest .
GetObjectPresignRequest getObjectPresignRequest = GetObjectPresignRequest.builder()
.signatureDuration(Duration.ofMinutes(60))
.getObjectRequest(getObjectRequest)
.build();
You can see the proper way to create a pre-signed URL using AWS SDK for Java v2 in the AWS Code Github here:
TO read more about using the AWS SDK for Java v2 to create them, see this topic in the AWS Java V2 Developer Guide.
Working with Amazon S3 presigned URLs
Upvotes: 2