Hiya,
You can use regular message pact, to test the json payloads that will be stored/read from the buckets
https://docs.pact.io/getting_started/how_pact_works#non-http-testing-message-pact
We have a workshop which has flavours in different examples
https://docs.pact.io/university/message-pact-async/00_1_Intro
You could use localstack or moto s3 or similar to mock out the bucket in test, but you can omit that by just testing the message constructor, or message consumer, agnostic of the underlying transport
If you use different content-types other than json/plain text/xml, or want to test the underlying transport, there is the pact plugin framework which allows for extensibility.
https://docs.pact.io/plugins/quick_start
Ron created a demo of CSV content plugin, which would have been great for a client use case, where we have CSV’s files in the middle of our flow
postgres db with logical replication (wal2json) -> lambda handler to transmit via kinesis firehose -> handler to transform json document and augment with additional detail -> send a csv file to a s3 bucket
on a cron job, we would have BI system read the csv file from s3, and do work, publishing a processed report back to another bucket.