@mapbox/update-amis

0.0.2 • Public • Published

update-amis

Give a string or file with some ubuntu EC2 image ids in it, replace them with the most up-to-date image ids that share the same attributes (architecture, virtualization type, etc.)

Setup

$ npm install -g update-amis

Make sure that your environment is configured with appropriate AWS credentials. See http://docs.aws.amazon.com/AWSJavaScriptSDK/guide/node-configuring.html for details.

Usage

From the command-line:

# Prints to stdout
$ cat path/to/some-template.template | update-amis

# Updates named file
$ update-amis path/to/some-template.template

# Just prints an up-to-date ami
$ update-amis ami-b6cca686

Or in javascript:

var finder = require('update-amis');

// Get details about a particular AMI
finder.getInfo('ami-b6cca686', function(err, info) {});

// Find the most up-to-date AMI
finder.findUpdatedAmi('ami-b6cca686', function(err, newami) {});

Caveats

  • Only for Ubuntu AMI's that you could find here: http://cloud-images.ubuntu.com/locator/ec2/
  • Finds a matching AMI based on:
    • architecture
    • owner
    • root-device type
    • virtualization type
    • name: Ubuntu names their amis predictably, so that you can match versions and sort by date. Example: ubuntu/images/ubuntu-trusty-14.04-amd64-server-20140927

Readme

Keywords

none

Package Sidebar

Install

npm i @mapbox/update-amis

Weekly Downloads

0

Version

0.0.2

License

ISC

Last publish

Collaborators

  • mbx-npm-ci-production
  • mbx-npm-ci-staging
  • mbx-npm-advanced-actions-production
  • mbx-npm-advanced-actions-staging
  • mbx-npm-09-production
  • mbx-npm-08-production
  • mbx-npm-07-production
  • mbx-npm-06-production
  • mbx-npm-05-production
  • mbx-npm-04-production
  • mbx-npm-03-production
  • mbx-npm-02-production
  • mbx-npm-01-production
  • mbx-npm-02-staging
  • mapbox-npm-01
  • mapbox-npm-02
  • mapbox-npm-07
  • mapbox-npm-03
  • mapbox-npm-04
  • mapbox-npm-09
  • mapbox-npm-05
  • mapbox-npm-06
  • mapbox-npm-08
  • mapbox-npm-advanced-actions
  • mapbox-npm-ci
  • mapbox-npm
  • mapbox-admin
  • mapbox-machine-user