Connecting to Tealium S3 Bucket Using PHP

Rookie Contributor

Hello, I am trying to connect to the Tealium S3 bucket programatically so I can upload some Omnichannel files and am a bit confused. I found a similar post here asking about the same thing, but using Python. I tried to follow that but I'm still having difficulties. 

I'm using this PHP class to connect to S3:

Where I'm confused is what is the bucket name, the prefix, etc. From the file configuration service screen, here's what it's telling my bucket/prefix is (substituted my company/profile with generics):

The PHP file is wanting me to set the access key and secret key which is straightforward. Then as a test I'm just trying to list the contents of the bucket. The PHP class uses this to get the list of objects:

* Get contents for a bucket
* If maxKeys is null this method will loop through truncated result sets
* @param string $bucket Bucket name
* @param string $prefix Prefix
* @param string $marker Marker (last file listed)
* @param string $maxKeys Max keys (maximum number of keys to return)
* @param string $delimiter Delimiter
* @param boolean $returnCommonPrefixes Set to true to return CommonPrefixes
* @return array | false
public static function getBucket($bucket, $prefix = null, $marker = null, $maxKeys = null, $delimiter = null, $returnCommonPrefixes = false)

I don't know what $bucket and $prefix should be. Based on the Python post, I used the following:

Bucket =
Prefix = bulk-downloader/companyname-profilename

But that didn't work. I then tried Prefix of just companyname-profilename and that didn't work either. Any help on what values I'm supposed to be using as bucket and prefix?


Connecting to Tealium S3 Bucket Using PHP

Employee Emeritus
Hi @SteveCaponetto

From what I can tell the prefix can be left out

Have you tried using Bucket = "" ?

Connecting to Tealium S3 Bucket Using PHP

Rookie Contributor

I was using some third party PHP library that I found so I thought that perhaps that was an issue. I've now pulled down the official Amazon S3 SDK and plugged in my credentials and I'm now getting the following error:

SignatureDoesNotMatch (client): The request signature we calculated does not match the signature you provided. Check your key and signing method.

Would you have any idea on what that error could possibly mean? I've done some searching but can't really find anything of use.

Connecting to Tealium S3 Bucket Using PHP

Rookie Contributor

I finally figured it out. For anyone with similar problem, here's what I used:

Bucket =
Prefix = bulk-downloader/companyname-profilename/

Note you need the trailing slash at the end of the Prefix.