Googlescript and AWS SDK

heights1976

I want to interact with Amazon Web Services DynamoDB in a Google Sheet via code in a GoogleScript. However, I cannot figure out how to integrate the AWS SDK. I am hoping to avoid having to write a library to handle the integration via the AWS HTTP API, as there are JavaScript and Java SDKs available for the SDK. Help?

(I've done some pretty extensive Google and Stack Overflow searches. This is the closest thing I've found to an answer, but that is the Google App Engine, not the Google Apps Script.)

Thanks!

smithy545

I just made a function that does the basic authentication for any api request you want to make. You still might have to get some of the headers in order but it does most of the hard work for you.

For example:

function myFunction() {
  AWS.init("MY_ACCESS_KEY", "MY_SECRET_KEY");
  var instanceXML = AWS.request('ec2', 'us-east-1', 'DescribeInstances', {"Version":"2015-10-01"});
  ...
}

I put it in a repo with some documentation for use. Here's the link: https://github.com/smithy545/aws-apps-scripts

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事