Connecting to Tealium S3 Bucket Using PHP

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: https://github.com/tpyo/amazon-s3-php-class

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):

collect-us-east-1.tealium.com/bulk-downloader/companyname-profilename

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 = collect-us-east-1.tealium.com
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?

Accepted Solutions (1)

Accepted Solutions (1)

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

Bucket = collect-us-east-1.tealium.com
Prefix = bulk-downloader/companyname-profilename/

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

Rookie Contributor

Answers (0)

Ask a Question
Top Kudoed Authors