Upload summary result to aws s3 bucket

Hi , i need to upload the summary result file to aws s3 .

export function handleSummary(data) {
const file_name = ‘/app/’ + __ENV.DFILE_NAME

// s3 url to upload 
let resp = http.post(`s3://<bucket-name>/${__ENV.DFILE_NAME}`, JSON.stringify(data));
if (resp.status != 200) {
    console.error('Could not send summary, got status ' + resp.status);

i’m new to K6
is there a quick way or any extensions that help me to do so ?

Hi, welcome to the forum :slight_smile:

You have the right idea in mind, that should be possible… Unfortunately AWS authentication is a bit complicated and requires custom handling. @MStoykov implemented it in JS using the built-in k6/crypto module here.

It’s still a work in progress, but it seems S3 is currently the best (only?) supported service. If you’re willing to try it out I’m sure the guys would welcome any feedback.

Another approach might be to write a k6 extension and use the AWS Go SDK. I’m not sure which approach would be faster at this point, but support for AWS auth is certainly on our roadmap. You can follow issue #1031 for updates.

There’s an AWS SQS extension, which might be a good starting point for an auth extension.