Amazon S3 helper library for Convertigo.
What this library can do:
| Capability | Sequence | Description |
|---|---|---|
| List buckets | listBuckets | Returns the S3 buckets accessible with the configured S3 credentials and endpoint. |
| Create a bucket | createBucket | Creates a new S3 bucket in the configured region. |
| Upload an object | putObject | Uploads a file to a bucket using a Convertigo file upload variable as the object body. |
| List objects | listObjects | Lists objects in a bucket with optional prefix, delimiter, and maxKeys filters. |
| Download an object | getObject | Retrieves an object from a bucket by object key. |
| Delete an object | deleteObject | Deletes one object from a bucket. |
| Delete a bucket | deleteBucket | Deletes an empty S3 bucket. |
| Run regression checks | s3_regression_test | Executes the create/upload/list/get/delete cleanup flow to validate the configured project. |
Usage: configure these project symbols before calling the public sequences:
| Symbol | Required | Default | Description |
|---|---|---|---|
| lib_s3.s3.endpoint | No | s3.amazonaws.com | S3 API endpoint host used by the HTTP connector and by Signature V4. Use another S3-compatible host when needed. |
| lib_s3.s3.accessKey | Yes | S3 access key ID. | |
| lib_s3.s3.secretKey.secret | Yes | S3 secret access key. Store it as a secret symbol. | |
| lib_s3.s3.region | Yes | S3 signing region used for bucket and object requests. | |
| lib_s3.s3.sessionToken.secret | No | Session token for temporary credentials. Store it as a secret symbol when used. |
The AmazonS3 connector server property references lib_s3.s3.endpoint, and the same endpoint is used as the signed Host header. If the endpoint is not provided to the signing helper, it falls back to s3.amazonaws.com.
For putObject, provide fileContent as a file upload variable. Convertigo stores the upload as a temporary file and sends that file as the raw S3 PUT body.
For more technical informations : documentation
-
In your Convertigo Studio click on
to import a project in the treeview -
In the import wizard
paste the text below into the
Project remote URLfield:Usage Click the copy button at the end of the line To contribute lib_s3=https://github.com/convertigo/c8oprj-lib-s3.git:branch=masterTo simply use lib_s3=https://github.com/convertigo/c8oprj-lib-s3/archive/master.zip -
Click the
Finishbutton. This will automatically import the lib_s3 project
Sequence to create a new S3 bucket. Calls createBucket transaction with bucket name and optional region parameter.
variables
| name | comment |
|---|---|
| accessKey | AWS Access Key ID - Unique identifier to authenticate requests to Amazon S3. Replace with your actual AWS Access Key ID. |
| bucketName | S3 Bucket Name - Name for the new bucket to be created. Must be globally unique across all AWS accounts and follow S3 naming conventions. |
| bucketRegion | Bucket Region - Geographic region where the new bucket will be created. If empty, uses the connector's default region. |
| endpoint | S3 API endpoint host. Defaults to s3.amazonaws.com for Amazon S3; configure lib_s3.s3.endpoint for S3-compatible services. |
| region | AWS Region - Geographic region for S3 service (e.g., us-east-1, eu-west-1, ap-southeast-1). Default is us-east-1. |
| secretKey | AWS Secret Access Key - Secret key used in conjunction with Access Key ID to sign requests. Replace with your actual AWS Secret Access Key. |
| sessionToken | AWS Session Token - Temporary security token for AWS STS credentials. Optional for standard AWS credentials, required for temporary security credentials. |
Sequence to delete an S3 bucket. Calls deleteBucket transaction with bucket name to delete. Bucket must be empty to be successfully deleted.
variables
| name | comment |
|---|---|
| accessKey | AWS Access Key ID - Unique identifier to authenticate requests to Amazon S3. Replace with your actual AWS Access Key ID. |
| bucketName | S3 Bucket Name - Name of the bucket to delete. Must be a valid existing bucket name and must be empty to be deleted. |
| endpoint | S3 API endpoint host. Defaults to s3.amazonaws.com for Amazon S3; configure lib_s3.s3.endpoint for S3-compatible services. |
| region | AWS Region - Geographic region for S3 service (e.g., us-east-1, eu-west-1, ap-southeast-1). Default is us-east-1. |
| secretKey | AWS Secret Access Key - Secret key used in conjunction with Access Key ID to sign requests. Replace with your actual AWS Secret Access Key. |
| sessionToken | AWS Session Token - Temporary security token for AWS STS credentials. Optional for standard AWS credentials, required for temporary security credentials. |
Sequence to delete an object from S3 bucket. Calls deleteObject transaction with bucket name and object key to delete.
variables
| name | comment |
|---|---|
| accessKey | AWS Access Key ID - Unique identifier to authenticate requests to Amazon S3. Replace with your actual AWS Access Key ID. |
| bucketName | S3 Bucket Name - Name of the bucket containing the object to delete. Must be a valid existing bucket name. |
| endpoint | S3 API endpoint host. Defaults to s3.amazonaws.com for Amazon S3; configure lib_s3.s3.endpoint for S3-compatible services. |
| objectKey | Object Key - The key (path) of the object to delete from the S3 bucket. Must be a valid existing object key. |
| region | AWS Region - Geographic region for S3 service (e.g., us-east-1, eu-west-1, ap-southeast-1). Default is us-east-1. |
| secretKey | AWS Secret Access Key - Secret key used in conjunction with Access Key ID to sign requests. Replace with your actual AWS Secret Access Key. |
| sessionToken | AWS Session Token - Temporary security token for AWS STS credentials. Optional for standard AWS credentials, required for temporary security credentials. |
Sequence to download an object from S3 bucket. Calls getObject transaction with bucket name and object key to retrieve.
variables
| name | comment |
|---|---|
| accessKey | AWS Access Key ID - Unique identifier to authenticate requests to Amazon S3. Replace with your actual AWS Access Key ID. |
| bucketName | S3 Bucket Name - Name of the bucket containing the object to download. Must be a valid existing bucket name. |
| endpoint | S3 API endpoint host. Defaults to s3.amazonaws.com for Amazon S3; configure lib_s3.s3.endpoint for S3-compatible services. |
| objectKey | Object Key - The key (path) of the object to download from the S3 bucket. Must be a valid existing object key. |
| region | AWS Region - Geographic region for S3 service (e.g., us-east-1, eu-west-1, ap-southeast-1). Default is us-east-1. |
| secretKey | AWS Secret Access Key - Secret key used in conjunction with Access Key ID to sign requests. Replace with your actual AWS Secret Access Key. |
| sessionToken | AWS Session Token - Temporary security token for AWS STS credentials. Optional for standard AWS credentials, required for temporary security credentials. |
Sequence to list all S3 buckets accessible with configured AWS credentials. Calls listBuckets transaction with required authentication parameters.
variables
| name | comment |
|---|---|
| accessKey | AWS Access Key ID - Unique identifier to authenticate requests to Amazon S3. Replace with your actual AWS Access Key ID. |
| endpoint | S3 API endpoint host. Defaults to s3.amazonaws.com for Amazon S3; configure lib_s3.s3.endpoint for S3-compatible services. |
| region | AWS Region - Geographic region for S3 service (e.g., us-east-1, eu-west-1, ap-southeast-1). Default is us-east-1. |
| secretKey | AWS Secret Access Key - Secret key used in conjunction with Access Key ID to sign requests. Replace with your actual AWS Secret Access Key. |
| sessionToken | AWS Session Token - Temporary security token for AWS STS credentials. Optional for standard AWS credentials, required for temporary security credentials. |
Sequence to list objects in a specific S3 bucket. Calls listObjects transaction with optional filtering parameters (prefix, delimiter, maxKeys).
variables
| name | comment |
|---|---|
| accessKey | AWS Access Key ID - Unique identifier to authenticate requests to Amazon S3. Replace with your actual AWS Access Key ID. |
| bucketName | S3 Bucket Name - Name of the bucket to list objects from. Must be a valid existing bucket name. |
| delimiter | Delimiter - Character used to group keys that share a common prefix. Optional parameter for hierarchical listing. |
| endpoint | S3 API endpoint host. Defaults to s3.amazonaws.com for Amazon S3; configure lib_s3.s3.endpoint for S3-compatible services. |
| maxKeys | Max Keys - Maximum number of object keys to return in response. Default is 1000, maximum is 1000. |
| prefix | Prefix - Filter to list only objects whose keys begin with this prefix. Optional parameter. |
| region | AWS Region - Geographic region for S3 service (e.g., us-east-1, eu-west-1, ap-southeast-1). Default is us-east-1. |
| secretKey | AWS Secret Access Key - Secret key used in conjunction with Access Key ID to sign requests. Replace with your actual AWS Secret Access Key. |
| sessionToken | AWS Session Token - Temporary security token for AWS STS credentials. Optional for standard AWS credentials, required for temporary security credentials. |
Sequence to upload an object to S3 bucket. Calls putObject transaction with bucket name, object key, MIME type and content to upload.
variables
| name | comment |
|---|---|
| accessKey | AWS Access Key ID - Unique identifier to authenticate requests to Amazon S3. Replace with your actual AWS Access Key ID. |
| bucketName | S3 Bucket Name - Name of the bucket where the object will be uploaded. Must be a valid existing bucket name. |
| contentType | Content Type - MIME type of the object being uploaded (e.g., text/plain, application/json, image/png). Default is application/octet-stream. |
| endpoint | S3 API endpoint host. Defaults to s3.amazonaws.com for Amazon S3; configure lib_s3.s3.endpoint for S3-compatible services. |
| fileContent | File Content - Uploaded file to send as the S3 object body. Convertigo stores the upload in a temporary file and passes its path to the sequence. |
| objectKey | Object Key - The key (path) where the object will be stored in the S3 bucket. This will be the object's unique identifier. |
| region | AWS Region - Geographic region for S3 service (e.g., us-east-1, eu-west-1, ap-southeast-1). Default is us-east-1. |
| secretKey | AWS Secret Access Key - Secret key used in conjunction with Access Key ID to sign requests. Replace with your actual AWS Secret Access Key. |
| sessionToken | AWS Session Token - Temporary security token for AWS STS credentials. Optional for standard AWS credentials, required for temporary security credentials. |
Non-regression test sequence for lib_s3 S3 connector. Executes all 7 S3 operations with proper error handling using TryCatch.
variables
| name | comment |
|---|---|
| accessKey | AWS Access Key ID for S3 test operations |
| endpoint | S3 API endpoint host for non-regression tests. Defaults to s3.amazonaws.com for Amazon S3; configure lib_s3.s3.endpoint for S3-compatible services. |
| region | AWS Region for S3 test operations |
| secretKey | AWS Secret Access Key for S3 test operations |
| sessionToken | AWS Session Token for S3 test operations (optional) |
| testBucketName | Unique test bucket name with timestamp |
| testContent | Content to upload for test |
| testObjectKey | Unique test object key with timestamp |
