s3Urls
From bucket/key to URL and the other way around
Usage
In javascript:
var s3urls = ;var assert = ; var url = s3urls;assert; var url = 'https://s3.amazonaws.com/my-bucket/some/key';if s3urls var result = s3urls; assert;
In a shell:
$ npm install -g s3urls # Get URLs for a bucket/key $ s3urls to-url my-bucket some/file/keys3://my-bucket/some/file/keyhttps://s3.amazonaws.com/my-bucket/some/file/keyhttps://my-bucket.s3.amazonaws.com/some/file/key # Get one type of URL for a bucket/key $ s3urls to-url my-bucket some/file/key --type bucket-in-hosthttps://my-bucket.s3.amazonaws.com/some/file/key # Convert a URL from one type to another (defaults to bucket-in-host type) $ s3urls convert s3://my-bucket/some/file/keyhttps://my-bucket.s3.amazonaws.com/some/file/key $ s3urls convert https://my-bucket.s3.amazonaws.com/some/file/key --type s3s3://my-bucket/some/file/key # Get a signed URL for a private object (default 600s expiration) $ s3urls signed my-bucket some/file/keyhttps://my-bucket.s3.amazonaws.com/some/file/key?... $ s3urls signed s3://my-bucket/some/file/key --expire 1200https://my-bucket.s3.amazonaws.com/some/file/key?...