Giter Club home page Giter Club logo

terraform-aws-cloudfront-s3-lambda-edge's Introduction

terraform-aws-cloudfront-s3-website-lambda-edge

Terraform 0.12.x compatible module for creating a s3 static website with cloudfront distribution, and Lambda@Edge function

The following resources will be created

  • S3 Bucket
  • Cloudfront distribution
  • Route53 record
  • Lambda@Edge nodejs10.x function to redirect fqdn.com/folder/index.html request to fqdn.com/folder

Prerequisites:

  • Route 53 hosted zone for example.com
  • ACM certificate for *.example.com in us-east-1 region

Example 1

provider "aws" {
  region = "us-east-1"
}
 
module "cloudfront_s3_website" {
    source           = "twstewart42/cloudfront-s3-website-lambda-edge/aws"
    version          = "1.2.1"
    hosted_zone      = "example.com"
    domain_name      = "test.example.com"
    aws_region       = "us-east-1"
}

Variables

Variable Default Description
aws_region us-east-1 AWS Region to host S3 site
domain_name None FQDN of cloudfront alias for the website, S3 bucket name - blog.site.com
hosted_zone None Root domain of website - site.com
tags None Map of the tags for all resources

Credits

The original core 1.0.0 module was developed by chgangaraju/terraform-aws-cloudfront-s3-website

terraform-aws-cloudfront-s3-lambda-edge's People

Contributors

chgangaraju avatar russsavagedentsu avatar twstewart42 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.