https://github.com/ryan-lang/web-assetlib-outputengine-s3
AWS S3 output engine for Web::AssetLib
https://github.com/ryan-lang/web-assetlib-outputengine-s3
Last synced: 8 months ago
JSON representation
AWS S3 output engine for Web::AssetLib
- Host: GitHub
- URL: https://github.com/ryan-lang/web-assetlib-outputengine-s3
- Owner: ryan-lang
- License: other
- Created: 2017-03-29T02:11:17.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-08-31T01:09:52.000Z (almost 9 years ago)
- Last Synced: 2025-10-22T06:56:30.535Z (8 months ago)
- Language: Perl
- Size: 88.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: Changes
- License: LICENSE
Awesome Lists containing this project
README
# NAME
Web::AssetLib::OutputEngine::S3 - allows exporting an asset or bundle to an AWS S3 Bucket
On first usage, a cache will be generated of all files in the bucket. This way, we know
what needs to be uploaded and what's already there.
# SYNOPSIS
my $library = My::AssetLib::Library->new(
output_engines => [
Web::AssetLib::OutputEngine::S3->new(
access_key => 'AWS_ACCESS_KEY',
secret_key => 'AWS_SECRET_KEY',
bucket_name => 'S3_BUCKET_NAME',
region => 'S3_BUCKET_REGION'
)
]
);
$library->compile( ..., output_engine => 'S3' );
# USAGE
This is an output engine plugin for [Web::AssetLib](https://metacpan.org/pod/Web::AssetLib).
Instantiate with `access_key`, `secret_key`, `bucket_name`,
and `region` arguments, and include in your library's output engine list.
# PARAMETERS
## access\_key
## secret\_key
AWS access & secret keys. Must have `List` and `Put` permissions for destination bucket.
Required.
## bucket\_name
S3 bucket name. Required.
## region
AWS region name of the bucket. Required.
## region
AWS region name of the bucket
## link\_url
Used as the base url of any asset that gets exported to S3. Make sure it's public!
Your CDN may go here.
## object\_expiration\_cb
Provide a coderef used to calculate the Expiration header. Currently,
no arguments are passed to the callback. Defaults to:
sub {
return DateTime->now( time_zone => 'local' )->add( years => 1 );
};
# SEE ALSO
[Web::AssetLib](https://metacpan.org/pod/Web::AssetLib)
[Web::AssetLib::OutputEngine](https://metacpan.org/pod/Web::AssetLib::OutputEngine)
# AUTHOR
Ryan Lang