npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

mindless-route53-cloudformation

v1.5.0

Published

Intelligently create DNS entries an EC2 Instance or load balancer output from a CloudFormation stack

Downloads

142

Readme

mindless-route53-cloudformation

CircleCI Coverage Status semantic-release Commitizen friendly npm version

Intelligently create DNS records an EC2 Instance or load balancer output from a CloudFormation stack. Using this command makes it easier to deal with a stack getting hosed than creating the DNS records with CloudFormation -- when something goes really wrong you can just create a new stack, and update the DNS records to point to it with this command.

Node.js API

upsertRecordSetsForStack(options)

Upserts DNS records to Route 53 for either an EC2 Instance output by a CloudFormation stack, or a load balancer output by it. If there are multiple EC2 Instances and/or load balancers output by the stack, an error will be thrown.

options

awsConfig (AWS.ConfigurationOptions, optional)

The general configuration options for AWS services, like credentials and region

StackName (string, required)

The name of the stack to generate DNS entries for.

DNSName (string, required)

The desired domain name for the DNS entries.

privateOnly (boolean, optional)

true if only private zone DNS records should be created, false if both public and private records should be created. Defaults to false.

TTL (number, optional)

The time-to-live for the DNS entries (not required for load balancers)

region (string, optional)

The AWS region to use (unless you are passing instances of the API clients you'll have to pass the region)

CloudFormation (AWS.CloudFormation, optional)

An CloudFormation API client configured how you want.

EC2 (AWS.EC2, optional)

An EC2 API client configured how you want.

ELBv2 (AWS.ELBv2, optional)

An ELBv2 API client configured how you want.

Route53 (AWS.Route53, optional)

An Route53 API client configured how you want.

log (Function, optional, default: console.error)

A logging function

verbose (boolean, optional, default: false)

Enables verbose log output

Returns

A Promise that will resolve once the upsert is complete.

genRecordSetsForStack(options)

Generates the ResourceRecordSets to upsert to Route 53 for either an EC2 Instance output by a CloudFormation stack, or a load balancer output by it. If there are multiple EC2 Instances and/or load balancers output by the stack, an error will be thrown.

options

awsConfig (AWS.ConfigurationOptions, optional)

The general configuration options for AWS services, like credentials and region

StackName (string, required)

The name of the stack to generate DNS entries for.

DNSName (string, required)

The desired domain name for the DNS entries.

privateOnly (boolean, optional)

true if only private zone DNS records should be created, false if both public and private records should be created. Defaults to false.

TTL (number, optional)

The time-to-live for the DNS entries (not required for load balancers)

region (string, optional)

The AWS region to use (unless you are passing instances of the API clients you'll have to pass the region)

CloudFormation (AWS.CloudFormation, optional)

An CloudFormation API client configured how you want.

EC2 (AWS.EC2, optional)

An EC2 API client configured how you want.

ELBv2 (AWS.ELBv2, optional)

An ELBv2 API client configured how you want.

log (Function, optional, default: console.error)

A logging function

verbose (boolean, optional, default: false)

Enables verbose log output

Returns

A Promise to be resolved with an array of the following:

{
  ResourceRecordSet: {
    Name: string,
    Type: 'A',
    ResourceRecords?: Array<{Value: string}>,
    TTL?: number,
    AliasTarget?: {
      DNSName: string,
      EvaluateTargetHealth: boolean,
      HostedZoneId: string,
    },
  },
  PrivateZone?: ?boolean,
  OutputKey?: ?string,
  InstanceId?: ?string,
  LoadBalancerArn?: ?string,
}

CLI

cfroute53 upsert

Intelligently upserts Route 53 entries for an EC2 Instance or load balancer output from a CloudFormation stack.

First it will fetch information from AWS, then display the records it plans to upsert and ask you to confirm whether to upsert them.

If there are multiple EC2 Instances and/or load balancers output by the stack, the command will error out. (In the future, it may ask you to select which you would like to upsert Route 53 entries for.)

Usage

cfroute53 upsert <stack name> <domain name> --region <AWS region> [--private-only] [--ttl <time to live>]

Options

--version           Show version number                              [boolean]
--help              Show help                                        [boolean]
-p, --private-only  only create private zone DNS records             [boolean]
--ttl               the time-to-live for the record                   [number]
-c, --comment       a comment for the change                          [string]
--region            the AWS region                                    [string]
-q, --quiet         suppress output                                  [boolean]
-v, --verbose       enable verbose output                            [boolean]
-y, --yes           don't ask for confirmation                       [boolean]