Lucee S3 Extension Version 2.0 (Beta)

There is a new version of the S3 Extension https://ext.lucee.org/s3-extension-2.0.0.0-BETA.lex that now allows to configure multiple endpoints to connect.
Please also see S3 Credentials

So far
Next to default credentials in the Application.cfc like this

this.s3.accessKeyId = "...";
this.s3.awsSecretKey = "...";

that you can use like this in the code

dump(directoryList("s3:///"));

New
you now can define credentials also like this in the Application.cfc

// extension provider endpoint
this.vfs.s3.extensionProvider.accessKeyId = "...";
this.vfs.s3.extensionProvider.awsSecretKey = "...";

// general artifacts
this.vfs.s3.artifacts.accessKeyId = "...";
this.vfs.s3.artifacts.awsSecretKey = "...";

// vfs=virtual file system

that then can be used like this in the code

dump(directoryList("s3://extensionProvider@/"));
dump(directoryList("s3://artifacts@/"));

Next to the Application.cfc, you can also define this endpoints in environment variables like this

LUCEE_VFS_S3_EXTENSIONPROVIDER_ACCESSKEYID =...
LUCEE_VFS_S3_EXTENSIONPROVIDER_SECRETKEY =...
LUCEE_VFS_S3_ARTIFACTS_ACCESSKEYID =...
LUCEE_VFS_S3_ARTIFACTS_SECRETKEY =...

or with system properties like this

-Dlucee.vfs.s3.extensionprovider.accesskeyid=...
-Dlucee.vfs.s3.extensionprovider.secretkey=...
-Dlucee.vfs.s3.artifacts.accesskeyid=...
-Dlucee.vfs.s3.artifacts.secretkey=...

This extension will be bundled with Lucee 6, but of course can also be used with Lucee 5.

BTW we use “vfs” as part of the structure because we plan to add more possible settings for other virtual file system in the near future and we wanna have a common structure for all this VFS settings. And yes you can also do this.vfs.s3.accessKeyId as an alias for this.s3.accessKeyId.

1 Like