How to access s3 bucket files via REST API with AWS signature Authentication in Thingworx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
How to access s3 bucket files via REST API with AWS signature Authentication in Thingworx
Hi Folks,
I am trying to access the file stored in s3 bucket in Thingworx via the AWS signature authentication. But I am unable to access the file. I tried to pass the AWS signature in the Header in below format:
let header = {
"Authorization": {
"AccessKey": + accessKey,
"SecretKey": + secretKey
}
};
Solved! Go to Solution.
- Labels:
-
Coding
-
Troubleshooting
- Tags:
- RESTAPI
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Unfortunately it's more complex than that. AWS requires you to sign REST requests, see https://docs.aws.amazon.com/AmazonS3/latest/API/RESTAuthentication.html. It won't allow you pass your secret key in HTTP header. Long story short, you have to use a proper AWS client. I'm not aware of any public AWS S3 extensions, although every ThingWorx developer seems to have written at least one in scope of some commercial project. Unless you are lucky and find one, you'd need to implement it yourself.
/ Constantine
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Similar discussions:
- "AWS S3 buckets to Thingworx": https://community.ptc.com/t5/ThingWorx-Developers/AWS-S3-buckets-to-Thingworx/td-p/664578
- "How to integrate thingworx api with S3 bucket?": https://community.ptc.com/t5/ThingWorx-Developers/How-to-integrate-thingworx-api-with-S3-bucket/td-p/771268
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Unfortunately it's more complex than that. AWS requires you to sign REST requests, see https://docs.aws.amazon.com/AmazonS3/latest/API/RESTAuthentication.html. It won't allow you pass your secret key in HTTP header. Long story short, you have to use a proper AWS client. I'm not aware of any public AWS S3 extensions, although every ThingWorx developer seems to have written at least one in scope of some commercial project. Unless you are lucky and find one, you'd need to implement it yourself.
/ Constantine
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @VV_10743662,
I wanted to see if you got the help you needed.
If so, please mark the appropriate reply as the Accepted Solution or please feel free to detail in a reply what has helped you and mark it as the Accepted Solution. It will help other members who may have the same question.
Please note that industry experts also review the replies and may eventually accept one of them as solution on your behalf.
Of course, if you have more to share on your issue, please pursue the conversation.
Thanks,
PTC Community Moderator
