An S3 Object URL is a globally unique address that provides direct web-based access to a specific object stored in an S3 bucket, serving as the foundation for accessing, sharing, and integrating S3 data with other applications.
An S3 Object URL is a unique web address that points directly to a specific object (file) within an S3 bucket. Since S3 is a RESTful web service, every object can be accessed and manipulated over HTTP/HTTPS protocols using its URL . This URL acts as the fundamental access mechanism for retrieving or interacting with objects stored in S3.
S3 objects can be accessed using two primary URL formats:
Virtual-hosted-style URL: https://<BUCKET_NAME>.s3.amazonaws.com/<OBJECT_KEY> . For example, https://my-bucket.s3.amazonaws.com/photos/vacation.jpg
Path-style URL (older format): https://s3.amazonaws.com/<BUCKET_NAME>/<OBJECT_KEY> . For example, https://s3.amazonaws.com/my-bucket/photos/vacation.jpg
The object key represents the full path and filename, which can include prefixes that simulate folders .
Direct Access: Provides a standardized way to retrieve objects directly via browsers or applications using HTTP GET requests . All S3 objects have a REST-accessible globally unique URL .
Integration with Applications: Enables embedding of images, videos, and other assets directly in web pages or mobile applications by referencing the object URL.
Temporary Sharing: Through pre-signed URLs, you can grant time-limited access to private objects without making them public. These URLs are generated using your security credentials and expire after a specified duration .
Static Website Hosting: When configured for static website hosting, S3 provides a website endpoint that serves content with features like index documents and redirects, though this differs from the standard REST API endpoint .
Programmatic Access: Forms the basis for all SDK and API interactions with S3 objects, enabling CRUD operations over HTTP .
By default, all S3 objects are private and accessible only to the object owner . Attempting to access a private object's URL without proper authentication will result in an access denied error. To share private objects securely, you can generate pre-signed URLs with expiration times . For public access, bucket policies or ACLs must be explicitly configured, and the bucket's block public access settings must be appropriately adjusted.
S3 actually provides two different types of endpoints with distinct behaviors. The standard REST API endpoint (what most people call the S3 Object URL) supports HTTPS, all S3 operations, and works with both public and private content. The website endpoint, enabled through static website hosting, provides features like index documents and redirects but does not support HTTPS . For production websites, it's common to use CloudFront in front of the REST API endpoint to gain HTTPS support and better performance.