eahefnawy / aws-cloudfront

Deploy an AWS CloudFront distribution for the provided origins using Serverless Components

Home Page:https://serverless.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

aws-cloudfront

 

Deploy an AWS CloudFront distribution for the provided origins using Serverless Components.

 

  1. Install
  2. Create
  3. Configure
  4. Deploy

 

1. Install

$ npm install -g serverless

2. Create

$ mkdir cdn
$ cd cdn

the directory should look something like this:

|- serverless.yml
|- .env      # your AWS api keys

# .env
AWS_ACCESS_KEY_ID=XXX
AWS_SECRET_ACCESS_KEY=XXX

3. Configure

# serverless.yml

myWebsite:
  component: '@serverless/aws-cloudfront'
  inputs:
    region: us-east-1
    enabled: true # optional
    origins:
      - https://my-bucket.s3.amazonaws.com

4. Deploy

$ serverless

 

New to Components?

Checkout the Serverless Components repo for more information.

About

Deploy an AWS CloudFront distribution for the provided origins using Serverless Components

https://serverless.com

License:Apache License 2.0


Languages

Language:JavaScript 100.0%