From the course: AWS for Developers: S3

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Presigning URLs

Presigning URLs - Amazon Web Services (AWS) Tutorial

From the course: AWS for Developers: S3

Start my 1-month free trial

Presigning URLs

- Like we've done a couple times before, we will create a presigned URL for public downloading of our private objects. keeping note with the Java SDK is going to act a little bit differently than we saw with Python, in the way that it behaves and the way that you interact with it. Let's jump back into our IDE. And we will create a new method called create presigned URL. And we need to set a bucket and a key. so the string results, equal to null and we will return that result. Now before we go any further on actually implementing this, we need to modify our class a little bit, jump back up here towards the top of the class where our statics are, and we're going to create a new private final variable, of type s3 presigner. We will simply call it presigner. Now because that's final, we need to pass it into the constructor. And now we need to go down to our main method and create that when we create our class. So…

Contents