- TLC Home Home
- Discussions Discussions
- Documentation Documentation
- Knowledge Base Knowledge Base
- Education Education
- Blog Blog
- Support Desk Support Desk
04-27-2020 07:47 AM
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?
Solved! Go to Solution.
04-27-2020 06:14 PM
04-28-2020 09:29 AM
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.
04-29-2020 07:31 AM
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.
Copyright All Rights Reserved © 2008-2023