liveBook · Manning

Static file

As explained in Amazon Web Services in Action, Third Edition: An in-depth guide to AWS

A static website is a website whose pages are served as preexisting files rather than generated dynamically for each request.

A static file is preexisting content served directly to a visitor instead of being generated dynamically for each request. Static website content commonly includes HTML, JavaScript, CSS, images, audio, and video. section 1.2.1 section 7.6

Amazon S3 can store and serve static files without virtual machines. A static site generator such as Hexo can create the files, while S3 provides cost-effective, scalable, maintenance-free hosting. section 7.6

A typical static-file deployment uses these components:

  • An S3 bucket stores the website objects. section 7.6
  • A bucket policy grants public read access when the bucket delivers a public website. section 7.6.2
  • S3 website hosting selects an index document, such as index.html or helloworld.html, and can define error documents and redirects. section 7.6 section 7.6.2
  • A CDN such as Amazon CloudFront caches files at geographically distributed nodes, reducing latency and origin load. section 1.2.1 section 7.6

Configure an S3 static website

Create a JSON bucket policy that allows everyone to perform s3:GetObject on the bucket’s objects, apply it with aws s3api put-bucket-policy, and enable website hosting with aws s3 website using an index document. section 7.6.2

Static hosting does not execute server-side scripts such as PHP or JSP, so applications that require server-side processing—such as WordPress—cannot run directly from S3. section 7.6

How Amazon Web Services in Action, Third Edition: An in-depth guide to AWS covers it

How deep it goes
Defines static content, explains S3 configuration and CDN delivery, then stops short of CloudFront setup details.
Examples
Uses a web-shop logo, Hexo blog files, HTML, CSS, JavaScript, images, and an S3 helloworld.html index.
What it assumes
Assumes basic AWS CLI and JSON policy familiarity while teaching static hosting through concrete S3 commands.
What you can do after
Operate/configure an S3 static website with public object access, an index document, redirects, and optional CDN delivery.
How it connects
Connects static files with S3, object storage, static site generators, CDNs, CloudFront, DNS, and dynamic content.

Also explained in

Compare how 6 books explain static file →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Amazon Web Services in Action, Third Edition: An in-depth guide to AWS. The section links point to the parts of the book it draws on.