Open Pamroni opened 1 month ago
that can be done like
from sqs_extended_client import SQSExtendedClientSession
from sqs_extended_client.client import S3_KEY_ATTRIBUTE_NAME
client = SQSExtendedClientSession().client("sqs")
client.large_payload_support = "<BUCKET_NAME>"
client.use_legacy_attribute = False
client.always_through_s3 = True
client.send_message(
QueueUrl="<QUEUE_URL>",
MessageBody="<DATA>",
MessageAttributes={
S3_KEY_ATTRIBUTE_NAME: {"StringValue": "<S3_KEY>", "DataType": "String"},
},
)
I need the ability to set the subpath in my S3 bucket. Right now, it is only accepting the bucket and then the key UUID is used to store the value. There should be a way to add a path variable to save the SQS files into bucket/path/key. In my case, we only have write permission to a certain subpath in the bucket so we need a way to define this.