cloudfront_remover

command module
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 15, 2021 License: MIT Imports: 1 Imported by: 0

README

cloudfront_remover

Disable and then delete CloudFront Distributions and OAIs

Binaries for Windows, MacOS, and Linux are available on the Releases page.

Usage

cloudfront_remover
Disable and then delete AWS CloudFront Distributions and associated OAIs

Set the AWS_PROFILE environment variable to use a different profile from the AWS credential file.

Usage:
  cloudfront_remover [command]

Available Commands:
  delete      Delete a CloudFront Distribution
  deleteOAI   Delete CloudFront Origin Access Identifier (OAI)
  disable     Disable a CloudFront Distribution
  list        List distributions and their OAIs
  listOAI     List CloudFront Origin Access Identities (OAIs)
  s3search    Search for an OAI in all S3 bucket policies

Examples

  • List distributions and OAIs
$ cloudfront list

+----------------+----------------+---------+----------+-------------------+--------------------------------------------------+--------------------------+
|       ID       |      ETAG      | ENABLED |  STATUS  |     1ST ALIAS     |                     1ST OAI                      |         COMMENT          |
+----------------+----------------+---------+----------+-------------------+--------------------------------------------------+--------------------------+
| E012345678912  | E0123456789123 | true    | Deployed | www.example.io    | N/A                                              | N/A                      |
| E987654321098  | E9876543210987 | true    | Deployed | www.example.com   | origin-access-identity/cloudfront/E9876543210987 | terraform--example.com   |
+----------------+----------------+---------+----------+-------------------+--------------------------------------------------+--------------------------+
  • Delete a distribution
PS C:\> .\cloudfront_remover.exe delete -i E012345678912
(no output upon success)
  • Search all S3 Buckets for an OAI (with region hint)
$ cloudfront_remover.exe s3search -i E012345678912 -r us-east-1

+-----------------------+-----------+---------------+
|        BUCKET         |  REGION   |      OAI      |
+-----------------------+-----------+---------------+
| www.stadiumscores.com | us-east-1 | E012345678912 |
+-----------------------+-----------+---------------+

Acknowledgment

Documentation

Overview

Copyright © 2021 John Taylor

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL