0.7.0 • Published 8 months ago

@ez4/aws-cloudfront v0.7.0

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

EZ4: AWS CloudFront

It provides all the components to manage CloudFront distributions on AWS.

Getting started

Install

npm install @ez4/aws-cloudfront -D

Permission

Ensure the user performing deployments has the permissions below:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "OriginAccessManagement",
      "Effect": "Allow",
      "Action": [
        "cloudfront:GetOriginAccessControl",
        "cloudfront:CreateOriginAccessControl",
        "cloudfront:UpdateOriginAccessControl",
        "cloudfront:DeleteOriginAccessControl"
      ],
      "Resource": ["arn:aws:cloudfront::{account-id}:origin-access-control/*"]
    },
    {
      "Sid": "CachePolicyManagement",
      "Effect": "Allow",
      "Action": [
        "cloudfront:GetCachePolicy",
        "cloudfront:CreateCachePolicy",
        "cloudfront:UpdateCachePolicy",
        "cloudfront:DeleteCachePolicy"
      ],
      "Resource": ["arn:aws:cloudfront::{account-id}:cache-policy/*"]
    },
    {
      "Sid": "DistributionManagement",
      "Effect": "Allow",
      "Action": [
        "cloudfront:GetDistribution",
        "cloudfront:CreateDistribution",
        "cloudfront:UpdateDistribution",
        "cloudfront:DeleteDistribution",
        "cloudfront:GetInvalidation",
        "cloudfront:CreateInvalidation",
        "cloudfront:TagResource",
        "cloudfront:UntagResource"
      ],
      "Resource": ["arn:aws:cloudfront::{account-id}:distribution/*"]
    }
  ]
}

License

MIT License