西维蜀黍

【AWS】使用 AWS Lambda Functions

Requirements and Restrictions on Lambda Functions

https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/lambda-requirements-limits.html

Using AWS Lambda with CloudFront Lambda@Edge

https://docs.aws.amazon.com/lambda/latest/dg/lambda-edge.html

Lambda@Edge lets you run Node.js and Python Lambda functions to customize content that CloudFront delivers, executing the functions in AWS locations closer to the viewer. The functions run in response to CloudFront events, without provisioning or managing servers. You can use Lambda functions to change CloudFront requests and responses at the following points:

  • After CloudFront receives a request from a viewer (viewer request)
  • Before CloudFront forwards the request to the origin (origin request)
  • After CloudFront receives the response from the origin (origin response)
  • Before CloudFront forwards the response to the viewer (viewer response)

Customizing Content at the Edge with Lambda@Edge

https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/lambda-at-the-edge.html

  ...


【AWS】使用 AWS CloudFront

Specifying a Default Root Object

https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/DefaultRootObject.html

Managing How Long Content Stays in an Edge Cache (Expiration)

https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html

  ...


【hugo】使用 AWS S3 服务 hugo 博客

Create Buckets

Set up non-WWW Bucket (Root Domain Bucket)

One bucket for the naked domain called: example.com. This bucket will hold our static website files.

  1. Go to https://console.aws.amazon.com/s3/home
  2. Press Create bucket button
    1. Enter bucket name: example.com
    2. Choose the Region where you want to create the bucket.
    3. Press Next, Next and Create bucket.
      • Now your bucket list should contain the example.com bucket
  3. Click example.com bucket and select the Properties tab.

Set up WWW Bucket (Subdomain Bucket)

One bucket for the naked domain called: example.com. This bucket will hold our static website files.

  1. Go to https://console.aws.amazon.com/s3/home
  2. Press Create bucket button
    1. Enter bucket name: www.example.com
    2. Press Next, Next and Create bucket.
      • Now your bucket list should contain the www.example.com bucket
  3. Click www.example.com bucket and select the Properties tab.
  ...


【AWS】使用 AWS S3

How do I create an S3 Bucket?

https://docs.aws.amazon.com/AmazonS3/latest/user-guide/create-bucket.html

Using Amazon S3 block public access

https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html

  ...


【hugo】使用 AWS CloudFront(CDN)加速 hugo 博客

Achievement

Step by step guide to deploy your Hugo website to Amazon Web Services using:

  ...