alex_bn_lee

导航

[1050] Website endpoints in AWS

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

posted on 2024-08-27 14:30  McDelfino  阅读(23)  评论(0)    收藏  举报