‫So, now, let's talk about
‫Amazon S3 pre-signed URLs.
‫So, they are URLs you can generate using the S3 console,
‫the CLI or the SDK, and the URL has an expiration.
‫So if you use the console, it's up to 12 hours
‫and if use the CLI, you can go up to 168 hours.
‫So, the idea is that when you generate a pre-signed URL,
‫the user that will get that URL will inherit the permissions
‫of the user that generated that URL for a GET or a PUT.
‫So what's the use case?
‫Well, say you have an S3 bucket and it's private,
‫and you want to give someone outside of AWS
‫access to one file.
‫You don't want to make that file public.
‫You don't want to make that file in any way
‫that would break your security, right?
‫So, you as your bucket owner or the user,
‫you're going to generate a pre-signed URL out of this file,
‫and the S3 Bucket will give you a URL.
‫That URL is going to be pre-signed,
‫meaning that it will carry over your credentials,
‫in terms of authorization to access that file.
‫Then you will send this URL to the target user
‫that you want to give access to the file
‫for a limited amount of time.
‫And then that user, sorry,
‫will be using the URL to access the file
‫on the S3 Buckets.
‫And then you will get a file back from the S3 buckets,
‫and the user has being able to download it, for example.
‫So, pre-signed URL are a very, very common use case
‫when it comes to temporary access to one specific file
‫for download or even for upload.
‫So, the examples are to only allow logged-in users
‫to download a premium video of your S3 bucket
‫or to allow an ever-changing list of users
‫to download files by generating URLs dynamically,
‫or to allow, temporarily, a user to upload a file
‫to a precise location in your S3 bucket,
‫while maintaining your S3 bucket private.
‫So that's it for this lecture,
‫and I will see you in the next lecture for some hands on.