S3Leaf | Config & Commands

Add S3 Configuration to app/Config.js:

Open your app/Config.js file and append the following configuration for the S3 Leaf module. Make sure it is placed after the existing app configuration:

leaf_s3: {
    module: require("etherial/leafs/s3").EthLeafS3,

    config: {
        access_key_id: process.env.ETH_LEAF_S3_ACCESS_KEY_ID,
        secret_access_key: process.env.ETH_LEAF_S3_SECRET_ACCESS_KEY,
        signature_version: process.env.ETH_LEAF_S3_SIGNATURE_VERSION,
        region: process.env.ETH_LEAF_S3_REGION,
        bucket: process.env.ETH_LEAF_S3_BUCKET,
        server: process.env.ETH_LEAF_S3_SERVER,
        tenant_id: process.env.ETH_LEAF_S3_TENANT_ID
    }
}

Ensure that this configuration block is correctly added to your Config.js file.

Add Environment Variables to .env:

Open your .env file and set the following environment variables for S3 configuration. Replace the placeholders with your actual AWS S3 credentials:

ETH_LEAF_S3_ACCESS_KEY_ID=
ETH_LEAF_S3_SECRET_ACCESS_KEY=
ETH_LEAF_S3_SIGNATURE_VERSION=
ETH_LEAF_S3_REGION=
ETH_LEAF_S3_BUCKET=
ETH_LEAF_S3_SERVER=
ETH_LEAF_S3_TENANT_ID=

Please provide your specific AWS S3 credentials as values for these environment variables.

Verify Application:

No modifications are required in the app.ts file. Save the changes to your Config.js and .env files. Your Etherial Framework application is now configured to use the S3 Leaf module with the updated S3 configuration.

Last updated

Was this helpful?