Gradle not able to resolve dependencies from a private maven repo hosted on s3 - Getting a 403: Forbidden status

I have hosted a private maven repo on s3. I am trying to use it in my gradle script like this

repositories {
    maven {
        url = ''
        credentials {
            username 'mys3username'
            password 'mys3accesskey'

And my dependency as this -

dependencies {
    compile 'com.example:MyProject:1.2-SNAPSHOT'

But I am getting this error while executing the script -

> Could not resolve all dependencies for configuration ':_debugCompile'.
   > Could not resolve com.example:MyProject:1.2-SNAPSHOT.
     Required by:
      > Unable to load Maven meta-data from
         > Could not GET ''. Received status code 403 from server: Forbidden

I guess Gradle is not utilizing the s3 credentials for accessing the files. Generally accessing private s3 files through HTTP require making private/signed urls like this -

Is there any workaround I can do for now ?