FORGEBOX Enterprise 🚀 - Take your ColdFusion (CFML) Development to Modern Times! Learn More...

S3 CommandBox Commands

v0.1.2 Public

S3 Commands/Package endpoint for CommandBox

Build Status

This CommandBox module wraps the features found in jcberquist/aws-cfml and allows you to install packages from private S3 buckets. Full credit to jcberquist for all of the S3 interaction logic.

In its current state, the module only supports installing packages from private S3 buckets and this will only be available on bleeding-edge installs of CommandBox (at time of writing, the stable version of CommandBox was 3.6.0). In the future, we hope to implement further commands such as s3 put, etc.

Installation

Install into Commandbox with install s3-commandbox-commands.

Usage

Authenticating private S3 buckets

The module allows you to provide authentication credentials, a public access key and a secret key, for all S3 operations. It also allows you to provide credentials for specific buckets. This is achieved using the s3 setCredentials command:

# set global default credentials
/> s3 setCredentials global=true accessKey=<accesskey> secretKey=<secretKey>

# set bucket specific credentials
/> s3 setCredentials bucket="my-private-s3-bucket" accessKey=<accesskey> secretKey=<secretKey>

Using private S3 buckets for package endpoints

You can either install packages directly from zip files hosted in private S3 buckets, or set the location of your packages to S3 buckets. The format of S3 endpoint URIs is as follows:

s3://<bucket-name>:<optional-s3-region-code>/<path-to-resource-without-zip-extension>

For example, if your package zip file lives in a bucket, myco-commandbox-packages, in the eu-west-2 region at location /my-project/v10.2.3.zip, your URI would look like this:

s3://myco-commandbox-packages:eu-west-2/my-project/v10.2.3

If you do not supply a region, the default us-east-1 will be used.

Installing packages directly from S3 buckets

Using the URI syntax above, simply do:

install s3://myco-commandbox-packages:eu-west-2/my-project/v10.2.3

Using private S3 assets in private Forgebox packages

Using this approach, you can make use of Forgebox's great publishing and versioning system and keep your assets secure but accessible behind private S3 buckets. Simply use the S3 endpoint URI syntax in the location field of your package:

{
    "name":"My Project",
    "version":"10.2.3",
    "private":true,
    "location":"s3://myco-commandbox-packages:eu-west-2/my-project/v10.2.3",
    ...

Changelog

v0.1.2

Update for changed API in aws-cfml library

v0.1.1

Module created with ability to use private S3 buckets as commandbox package locations.

Here are all the versions for this package. Please note that you can leverage CommandBox package versioning to install any package you like. Please refer to our managing package version guide for more information.

Version Created Last Update Published By Stable Actions
Current
0.1.2 Aug 01 2017 04:51 PM Aug 01 2017 04:51 PM
Version History
0.1.1 May 21 2017 03:46 PM May 21 2017 03:46 PM

 

No collaborators yet.
 
  • May 21 2017 03:46 PM
  • Aug 01 2017 04:51 PM
  • 835
  • 0
  • 125