ref: Website endpoints
Website endpoint examples
The following examples show how you can access an Amazon S3 bucket that is configured as a static website.
Example — Requesting an object at the root level
To request a specific object that is stored at the root level in the bucket, use the following URL structure.
http://bucket-name.s3-website.Region.amazonaws.com/object-name
For example, the following URL requests the photo.jpg
object that is stored at the root level in the bucket.
http://example-bucket.s3-website.us-west-2.amazonaws.com/photo.jpg
Example — Requesting an object in a prefix
To request an object that is stored in a folder in your bucket, use this URL structure.
http://bucket-name.s3-website.Region.amazonaws.com/folder-name/object-name
The following URL requests the docs/doc1.html
object in your bucket.
http://example-bucket.s3-website.us-west-2.amazonaws.com/docs/doc1.html
In the context of AWS and APIs, the terms “endpoint” and “URL” are closely related but have distinct meanings:
URL (Uniform Resource Locator)
- Definition: A URL is a specific type of URI (Uniform Resource Identifier) that provides the address of a resource on the internet. It includes the protocol (e.g., HTTP, HTTPS), domain name, and path to the resource.
- Example:
https://example.com/path/to/resource
Endpoint
- Definition: An endpoint is a specific URL that serves as an entry point for accessing a particular resource or service. In APIs, an endpoint is where the API receives requests and sends responses.
- Example: In AWS, an S3 bucket endpoint might be
https://example-bucket.s3.amazonaws.com
.
Key Differences
- Scope: A URL can refer to any web address, while an endpoint specifically refers to a URL used to interact with an API or service.
- Function: Endpoints are used to access specific functionalities or resources within a service, whereas URLs can be used for general web navigation.
In summary, while all endpoints are URLs, not all URLs are endpoints123.
Would you like more details on any specific aspect? 1: HubSpot Blog - API Endpoint 2: Postman Blog - API Endpoint 3: Baeldung - API Endpoints
标签:1050,Website,endpoint,name,URL,object,bucket,endpoints,com From: https://www.cnblogs.com/alex-bn-lee/p/18382626