- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-19-2018 04:58 AM
Hey experts,
I am struggling with how to add node.js (Already added require.js and seems working) as script include. In general i need aws-sdk.js to be added as script include so i can use it to do http calls to AWS EC2 (var x = new AWS().EC2(); ........ )
Anyone achieved this? And no, I dont want to pay for Cloud Orchestration
Cheers,
Joro
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-29-2021 02:46 AM
You can use bower and then use the built as script include. You cant run node.js in your Rhino envionment / JVM (if you dont have access to the source code of course). As an alternative - you can use MID server for that, but I dont see much benefit of that apart from few use cases.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-05-2018 03:03 PM
Is there a link that can give more details about this? I want to call AWS SDK inside a working javascript activity. Can you give more details how you did this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-06-2018 12:37 PM
Hi Jnimmala,
I use the AWS JS SDK for browser directly - this is the CDN :
<script src="https://sdk.amazonaws.com/js/aws-sdk-2.189.0.min.js"></script>
I use it from a widget , so in the HTML and invoke it from the controller. But this was only a PoC, it its feasible and doable. So as it is working and doing the trick, I will need to revamp all my code and move this to the back end, where I will do direct http requests to Amazon. The bad news here is that you need to sign this request - read that as make several encryption , from the request itself to whatever there is to sign. Here is a reference what you need to do - https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html
Note that any attempt done from my end (from the pas 2 weeks) to use the JS SDK failed badly. I either need to use Node.js set on the MID server host or directly the command line tool. But this is no more cloud solution as you can see, as it is dependent on this( those if scaled) machines 😞 . Trying to use separate crypto.js lib or directly the browser JS SDK as client callable include , failed as well. So, my only choice left is to use SncAutheticate and encrypt method. Although I am not very happy with it as it gives me really weird results - the encrypted string is definitely not hex but clean SHA1/256. So I am still struggling there. As soon as I have any results - positive or negative - will post it here.
Cheers,
Joro
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-08-2018 02:17 PM
Hi Joro,
Were you able to accomplish this using SncAuthentication?
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-25-2018 10:49 PM
Hi,
sorry for the late reply. Yes I was. I used another external library in order to get the encrytped value in bytes. Then it was all fine.
Although, it seems that SNCAuthentication should do the trick as well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-03-2020 09:23 PM
Hi,
How you are able to achieve the creation of AWS signature using the SNCAuthentication method?
Thanks