Support Topics Documentation Slack YouTube Blog

AWS S3 Authentication to upload object to S3 using Codeless

I am trying to upload objects to an S3 bucket using codeless.

The trouble I am having is with Authentication which is slightly compex.

You need to create a signature using the hexadecimal value of the SHA256 hash of the request payload.

Hex(SHA256Hash(<payload>)

Here is the relevant AWS resource.

Is this technically feasible in Codeless or do I need code to compile such signatures?

Hello @Andreas_Marinopoulos

Unfortunately, there are no Codeless blocks for hashing. I would recommend you to create a simple JS API Service and require AWS SDK, which is already installed as a global module.

const aws = require('aws-sdk')

class MyAWSService {

  getAWS(){
    return aws //sample
  }

}

Backendless.ServerCode.addService(MyAWSService);

Regards, Vlad