Javascript based parser for Amazon Resource Name strings
JavaScript
Switch branches/tags
Nothing to show
Latest commit 753cfd8 Feb 27, 2016 @sandfox sandfox remove coffeescript and rewrite to JS
bump tap to latest
change travis tested versions (drop pre 0.8)

README.md

aws-arn-parser

Parser for Amazon Resource Name strings

Build Status

Does what it says on the tin! Parsers an Amazon Resource Name and gives it back as object. NOTE: this module is in early days, at some point later I might make it actually validate and normalize the returned object, or completely change how it works

example

thing.js

var parser = require('aws-arn-parser');
var myAwsString = "arn:aws:iam::123456789012:server-certificate/division_abc/subdivision_xyz/ProdServerCert";

var arn = parser(myAwsString);

console.log(arn);

and when we run it

$ node thing.js
{ arn: 'arn',
  aws: 'aws',
  service: 'iam',
  region: '',
  namespace: '123456789012',
  relativeId: 'server-certificate/division_abc/subdivision_xyz/ProdServerCert' }

install

With npm do:

npm install aws-arn-parser

license

MIT