dcloud s3 bucket-access set-website

Serve the bucket as a static website on https://<bucket>.s3-website.<root>

IAM s3:PutBucketWebsiteChanges state

Only objects the bucket policy makes public are served; anything else answers 403.

Synopsis

dcloud s3 bucket-access set-website name [flags]

Arguments

  • <name>Required

    string

    Also accepted as --name. Constraints: 3-63 chars, /^[a-z0-9][a-z0-9-]*[a-z0-9]$/

Flags

  • --index-documentOptional

    string

    Index document suffix, e.g. index.html; required unless redirectAllRequestsTo

    Constraints: 1-255 chars

  • --redirect-all-requests-toOptional

    object

    { hostName, protocol? }: send every request, path and query kept, to another host

    Constraints: JSON

  • --routing-rulesOptional

    array of json

    AWS RoutingRules: [{ condition?: { keyPrefixEquals?, httpErrorCodeReturnedEquals? }, redirect: { hostName?, protocol?, replaceKeyPrefixWith? | replaceKeyWith?, httpRedirectCode? } }]

  • --error-documentOptional

    string

    Key served with 404 for a missing page, e.g. 404.html

    Constraints: 1-1024 chars

    May be null.

Example

dcloud s3 bucket-access set-website name

Generated from the API description, the same one the API checks requests against and the CLI is built from.