How to transfer files with an S3 client
Use an S3 client to upload source data to a shared Lokad folder or download results from it. This guide uses the AWS CLI with Lokad credentials, not an AWS account or an Amazon S3 bucket.
Obtain folder credentials
- In Files, open the sharing settings of the folder to expose and create an FTP/SFTP share. Generate a password; an SSH key alone does not provide S3 credentials.
- Use Read only for downloads, or allow writes for uploads. Leave Prefix Path empty unless your integration needs a compatibility prefix.
- After creating the share, copy the S3 access key id and S3 secret key before closing the dialog. Store them securely, outside Envision scripts and source repositories.
- Obtain the numeric Lokad account ID from your account administrator. This ID is the bucket name, not the account name or folder name.
The credentials expose only the shared folder, with the share’s permissions.
With no prefix configured, an object named orders.csv maps to orders.csv
inside that folder. For example, sharing /incoming exposes
/incoming/orders.csv as s3://ACCOUNT_ID/orders.csv, not
s3://ACCOUNT_ID/incoming/orders.csv.
If Prefix Path is exchange, include it in the object key:
s3://ACCOUNT_ID/exchange/orders.csv. The prefix changes the client-visible
path; it does not grant access to another folder.
Configure the client
Use these connection settings:
| Setting | Value |
|---|---|
| Endpoint | https://s3.lokad.com |
| Region | us-east-1 |
| Bucket | Numeric Lokad account ID |
| Addressing | Path-style |
| Authentication | S3 access key and secret key, Signature Version 4 |
With the AWS CLI installed, create a dedicated profile:
aws configure --profile lokad
aws configure set s3.addressing_style path --profile lokad
At the prompts, enter the S3 access key and secret from Lokad, region
us-east-1, and output format json. Do not enter the FTP password as the
S3 secret. See the AWS CLI documentation for
named profiles
and S3 client settings.
List and transfer files
Replace ACCOUNT_ID with your numeric account ID. These examples assume an
empty Prefix Path. First check that the expected files are visible:
aws --profile lokad --endpoint-url https://s3.lokad.com s3 ls s3://ACCOUNT_ID/
Upload a local file into the shared folder:
aws --profile lokad --endpoint-url https://s3.lokad.com s3 cp ./orders.csv s3://ACCOUNT_ID/orders.csv
Uploading to an existing key replaces the file at that path. Use a distinct test filename when checking a new integration.
Download a result file from a share that exposes it:
aws --profile lokad --endpoint-url https://s3.lokad.com s3 cp s3://ACCOUNT_ID/recommendations.csv ./recommendations.csv
Verify uploaded files in Files before running the scripts that consume them. Use separate credentials and profiles if input and output folders have separate shares.
Maintain access
Changing the share’s password changes its S3 secret key. Copy the new secret from the update dialog and update each client using that share.
Use the named account bucket directly: the endpoint exposes Lokad files, not general Amazon S3 bucket administration. Object versioning and AWS session tokens are not supported. Downloads access the current file at the requested path.