Skip to content

S3

myna supports common S3 operations for managing buckets and objects.

  • s3.list_buckets
  • s3.list_objects
  • s3.put_object
  • s3.get_object
  • s3.delete_object

Returns a list of all buckets owned by the authenticated sender.

version = "1.0"
kind = "s3.list_buckets"
description = "List all my buckets"

Lists keys in a bucket. Uses ListObjectsV2 API.

FieldTypeRequiredDescription
bucketstringYesThe name of the bucket.
prefixstringNoLimits the response to keys that begin with the specified prefix.
max_keysintNoSets the maximum number of keys returned in the response.
version = "1.0"
kind = "s3.list_objects"
[s3]
bucket = "my-bucket"
prefix = "logs/"
max_keys = 50

Uploads an object to a bucket.

FieldTypeRequiredDescription
bucketstringYesThe name of the bucket.
keystringYesThe object key.
content_typestringNoA standard MIME type describing the format of the contents.
metadatamapNoA map of metadata to store with the object.

The content to upload is taken from the [payload] block (either data or file).

version = "1.0"
kind = "s3.put_object"
[s3]
bucket = "my-bucket"
key = "configs/app-config.json"
content_type = "application/json"
metadata = { "environment" = "production" }
[payload]
data = """
{
"setting": "value"
}
"""

Retrieves an object from a bucket.

FieldTypeRequiredDescription
bucketstringYesThe name of the bucket.
keystringYesThe object key.
version = "1.0"
kind = "s3.get_object"
[s3]
bucket = "my-bucket"
key = "configs/app-config.json"

aremoves an object from a bucket.

FieldTypeRequiredDescription
bucketstringYesThe name of the bucket.
keystringYesThe object key.
version = "1.0"
kind = "s3.delete_object"
[s3]
bucket = "my-bucket"
key = "configs/app-config.json"