Amazon S3 S3 Website API

The S3 Website API from Amazon S3 — 1 operation(s) for s3 website.

GitHub OpenAPI

Operations 3

DELETE /{Bucket}?website Delete Bucket Website #
GET /{Bucket}?website Get Bucket Website #
PUT /{Bucket}?website Put Bucket Website #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/amazon-s3:amazon-s3-website-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

amazon-s3-website-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Amazon Simple Storage Service Website API
  version: '2006-03-01'
  description: Generated from AWS's published Smithy model for Amazon Simple Storage Service. 3 operation(s).
  contact:
    name: Amazon Web Services
    url: https://aws.amazon.com/contact-us/
  license:
    name: Apache 2.0
    identifier: Apache-2.0
    url: https://github.com/aws/api-models-aws/blob/main/LICENSE
servers:
- url: https://s3.{region}.amazonaws.com
  variables:
    region:
      default: us-east-1
security:
- sigv4: []
paths:
  /{Bucket}?website:
    delete:
      operationId: DeleteBucketWebsite
      summary: Delete Bucket Website
      description: 'This operation is not supported for directory buckets. This action removes the website configuration for
        a bucket. Amazon S3 returns a 200 OK response upon successfully deleting a website configuration on the specified
        bucket. You will get a 200 OK response if the website configuration you are trying to delete does not exist on the
        bucket. Amazon S3 returns a 404 response if the bucket specified in the request does not exist. This DELETE action
        requires the S3:DeleteBucketWebsite permission. By default, only the bucket owner can delete the website configuration
        attached to a bucket. However, bucket owners can grant other users permission to delete the website configuration
        by writing a bucket policy granting them the S3:DeleteBucketWebsite permission. For more information about hosting
        websites, see Hosting Websites on Amazon S3. The following operations are related to DeleteBucketWebsite: GetBucketWebsite
        PutBucketWebsite You must URL encode any signed header values that contain spaces. For example, if your header value
        is my file.txt, containing two spaces after my, you must URL encode this value to my%20%20file.txt.'
      responses:
        '200':
          description: Success
          content:
            text/xml:
              schema:
                type: string
      parameters:
      - name: Bucket
        in: path
        required: true
        schema:
          type: string
        description: The bucket name for which you want to remove the website configuration.
      - name: x-amz-expected-bucket-owner
        in: header
        schema:
          type: string
        description: The account ID of the expected bucket owner. If the account ID that you provide does not match the actual
          owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).
      tags:
      - Website
    get:
      operationId: GetBucketWebsite
      summary: Get Bucket Website
      description: 'This operation is not supported for directory buckets. Returns the website configuration for a bucket.
        To host website on Amazon S3, you can configure a bucket as website by adding a website configuration. For more information
        about hosting websites, see Hosting Websites on Amazon S3. This GET action requires the S3:GetBucketWebsite permission.
        By default, only the bucket owner can read the bucket website configuration. However, bucket owners can allow other
        users to read the website configuration by writing a bucket policy granting them the S3:GetBucketWebsite permission.
        The following operations are related to GetBucketWebsite: DeleteBucketWebsite PutBucketWebsite You must URL encode
        any signed header values that contain spaces. For example, if your header value is my file.txt, containing two spaces
        after my, you must URL encode this value to my%20%20file.txt.'
      responses:
        '200':
          description: Success
          content:
            text/xml:
              schema:
                $ref: '#/components/schemas/GetBucketWebsiteOutput'
              example:
                IndexDocument:
                  Suffix: index.html
                ErrorDocument:
                  Key: error.html
      parameters:
      - name: Bucket
        in: path
        required: true
        schema:
          type: string
        description: The bucket name for which to get the website configuration.
      - name: x-amz-expected-bucket-owner
        in: header
        schema:
          type: string
        description: The account ID of the expected bucket owner. If the account ID that you provide does not match the actual
          owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).
      tags:
      - Website
    put:
      operationId: PutBucketWebsite
      summary: Put Bucket Website
      description: This operation is not supported for directory buckets. Sets the configuration of the website that is specified
        in the website subresource. To configure a bucket as a website, you can add this subresource on the bucket with website
        configuration information such as the file name of the index document and any redirect rules. For more information,
        see Hosting Websites on Amazon S3. This PUT action requires the S3:PutBucketWebsite permission. By default, only the
        bucket owner can configure the website attached to a bucket; however, bucket owners can allow other users to set the
        website configuration by writing a bucket policy that grants them the S3:PutBucketWebsite permission. To redirect
        all website requests sent to the bucket's website endpoint, you add a website configuration with the following elements.
        Because all requests are sent to another website, you don't need to provide index document name for the bucket. WebsiteConfiguration
        RedirectAllRequestsTo HostName Protocol If you want granular control over redirects, you can use the following elements
        to add routing rules that describe conditions for redirecting requests and information about the redirect destination.
        In this case
      responses:
        '200':
          description: Success
          content:
            text/xml:
              schema:
                type: string
      parameters:
      - name: Bucket
        in: path
        required: true
        schema:
          type: string
        description: The bucket name.
      - name: Content-MD5
        in: header
        schema:
          type: string
        description: The Base64 encoded 128-bit MD5 digest of the data. You must use this header as a message integrity check
          to verify that the request body was not corrupted in transit. For more information, see RFC 1864. For requests made
          using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated
          automatically.
      - name: x-amz-sdk-checksum-algorithm
        in: header
        schema:
          type: string
          enum:
          - CRC32
          - CRC32C
          - SHA1
          - SHA256
          - CRC64NVME
          - SHA512
          - MD5
          - XXHASH64
          - XXHASH3
          - XXHASH128
        description: Indicates the algorithm used to create the checksum for the request when you use the SDK. This header
          will not provide any additional functionality if you don't use the SDK. When you send this header, there must be
          a corresponding x-amz-checksum or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP
          status code 400 Bad Request. For more information, see Checking object integrity in the Amazon S3 User Guide. If
          you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm parameter.
      - name: x-amz-expected-bucket-owner
        in: header
        schema:
          type: string
        description: The account ID of the expected bucket owner. If the account ID that you provide does not match the actual
          owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).
      requestBody:
        content:
          application/xml:
            schema:
              $ref: '#/components/schemas/WebsiteConfiguration'
            example:
              Bucket: examplebucket
              ContentMD5: ''
              WebsiteConfiguration:
                IndexDocument:
                  Suffix: index.html
                ErrorDocument:
                  Key: error.html
      tags:
      - Website
components:
  securitySchemes:
    sigv4:
      type: apiKey
      in: header
      name: Authorization
      description: AWS Signature Version 4. The Authorization header carries an AWS4-HMAC-SHA256 signature over the canonical
        request, with X-Amz-Date (and X-Amz-Security-Token for temporary credentials). Not a bearer token.
      x-aws-sigv4:
        signingName: s3
  schemas:
    Condition:
      type: object
      properties:
        HttpErrorCodeReturnedEquals:
          type: string
          description: The HTTP error code when the redirect is applied. In the event of an error, if the error code equals
            this value, then the specified redirect is applied. Required when parent element Condition is specified and sibling
            KeyPrefixEquals is not specified. If both are specified, then both must be true for the redirect to be applied.
        KeyPrefixEquals:
          type: string
          description: The object key name prefix when the redirect is applied. For example, to redirect requests for ExamplePage.html,
            the key prefix will be ExamplePage.html. To redirect request for all pages with the prefix docs/, the key prefix
            will be /docs, which identifies all objects in the docs/ folder. Required when the parent element Condition is
            specified and sibling HttpErrorCodeReturnedEquals is not specified. If both conditions are specified, both must
            be true for the redirect to be applied. Replacement must be made for object keys containing special characters
            (such as carriage returns) when using XM
    ErrorDocument:
      type: object
      properties:
        Key:
          type: string
          description: The object key name to use when a 4XX class error occurs. Replacement must be made for object keys
            containing special characters (such as carriage returns) when using XML requests. For more information, see XML
            related object key constraints.
      required:
      - Key
    GetBucketWebsiteOutput:
      type: object
      properties:
        RedirectAllRequestsTo:
          $ref: '#/components/schemas/RedirectAllRequestsTo'
        IndexDocument:
          $ref: '#/components/schemas/IndexDocument'
        ErrorDocument:
          $ref: '#/components/schemas/ErrorDocument'
        RoutingRules:
          type: array
          items:
            $ref: '#/components/schemas/RoutingRule'
          description: Rules that define when a redirect is applied and the redirect behavior.
    IndexDocument:
      type: object
      properties:
        Suffix:
          type: string
          description: A suffix that is appended to a request that is for a directory on the website endpoint. (For example,
            if the suffix is index.html and you make a request to samplebucket/images/, the data that is returned will be
            for the object with the key name images/index.html.) The suffix must not be empty and must not include a slash
            character. Replacement must be made for object keys containing special characters (such as carriage returns) when
            using XML requests. For more information, see XML related object key constraints.
      required:
      - Suffix
    Redirect:
      type: object
      properties:
        HostName:
          type: string
          description: The host name to use in the redirect request.
        HttpRedirectCode:
          type: string
          description: The HTTP redirect code to use on the response. Not required if one of the siblings is present.
        Protocol:
          type: string
          enum:
          - http
          - https
          description: Protocol to use when redirecting requests. The default is the protocol that is used in the original
            request.
        ReplaceKeyPrefixWith:
          type: string
          description: The object key prefix to use in the redirect request. For example, to redirect requests for all pages
            with prefix docs/ (objects in the docs/ folder) to documents/, you can set a condition block with KeyPrefixEquals
            set to docs/ and in the Redirect set ReplaceKeyPrefixWith to /documents. Not required if one of the siblings is
            present. Can be present only if ReplaceKeyWith is not provided. Replacement must be made for object keys containing
            special characters (such as carriage returns) when using XML requests. For more information, see XML related object
            key constraints.
        ReplaceKeyWith:
          type: string
          description: The specific object key to use in the redirect request. For example, redirect request to error.html.
            Not required if one of the siblings is present. Can be present only if ReplaceKeyPrefixWith is not provided. Replacement
            must be made for object keys containing special characters (such as carriage returns) when using XML requests.
            For more information, see XML related object key constraints.
    RedirectAllRequestsTo:
      type: object
      properties:
        HostName:
          type: string
          description: Name of the host where requests are redirected.
        Protocol:
          type: string
          enum:
          - http
          - https
          description: Protocol to use when redirecting requests. The default is the protocol that is used in the original
            request.
      required:
      - HostName
    RoutingRule:
      type: object
      properties:
        Condition:
          $ref: '#/components/schemas/Condition'
        Redirect:
          $ref: '#/components/schemas/Redirect'
      required:
      - Redirect
    WebsiteConfiguration:
      type: object
      properties:
        ErrorDocument:
          $ref: '#/components/schemas/ErrorDocument'
        IndexDocument:
          $ref: '#/components/schemas/IndexDocument'
        RedirectAllRequestsTo:
          $ref: '#/components/schemas/RedirectAllRequestsTo'
        RoutingRules:
          type: array
          items:
            $ref: '#/components/schemas/RoutingRule'
          description: Rules that define when a redirect is applied and the redirect behavior.
x-provenance:
  method: harvested
  publisher: Amazon Web Services
  source: https://raw.githubusercontent.com/aws/api-models-aws/3cd98287b471c106254abd89279cc87308d38bfd/models/s3/service/2006-03-01/s3-2006-03-01.json
  note: converted by smithy-to-openapi.py from AWS's Smithy model (roadmap#1001)