Jump to content

S3 Storage for Call Recordings


simonp22

Recommended Posts

Hi All,

I am trying to set up call recording storage on S3 and have read the docs here https://docs.2600hz.com/dev/doc/blog/storage/

Firstly, when I try a

PUT /v2/accounts/077a37665a37dccf3e390fd8e66e463b/storage
{"data": {} }

I get 

{
    "error": "500",
    "message": "init failed",
    "status": "error",
    "timestamp": "2020-02-10T11:56:31Z",
    "version": "4.3.32",
    "node": "XQIuNMsKxxqsgjHG17Zezw",
    "request_id": "f785c4035ef0c13b0019f41a114939dd"
}

So instead I have tried creating the full document at once but then get a 400 bad request

PUT /v2/accounts/077a37665a37dccf3e390fd8e66e463b/storage

{
  "data": {
    "attachments": {
      "f081f97e2f0445c58248a703699f80dc": {
        "handler": "s3",
        "name": "S3 call recording storage",
        "settings": {
          "bucket": "BUCKETNAME",
          "key": "KEY",
          "secret": "SECRET"
        }
      }
    },
    "plan": {
      "modb": {
        "types": {
          "call_recording": {
            "attachments": {
              "handler": "f081f97e2f0445c58248a703699f80dc"
            }
          }
        }
      }
    }
  }
}

Where am I going wrong? The requests look fine to me, or is the documentation incorrect? This is happening on both a 4,2 cluster and a 4.3 cluster

Edited by simonp22 (see edit history)
Link to comment
Share on other sites

Dug further into the logs and found an error being returned from AWS. 

HTTP 403
"The AWS Access Key Id you provided does not exist in our records."

However I knew that it did exist.

I created the user and S3 bucket in eu-west-2 so I figured that the user and bucket hadn't propagated yet to whatever AWS region Kazoo was querying.

In my PUT storage request I have now added the host field in to the attachment settings and set it to "s3-eu-west-2.amazonaws.com".

The request now works.

Link to comment
Share on other sites

  • 2600Hz Employees
20 minutes ago, simonp22 said:

In my PUT storage request I have now added the host field in to the attachment settings and set it to "s3-eu-west-2.amazonaws.com".

the host field is used for custom s3 providers, you shouldn't be doing that.

Link to comment
Share on other sites

×
×
  • Create New...