Skip to content

Example of fetching files from AWS S3 from within AdWords Scripts

License

Notifications You must be signed in to change notification settings

garanj/adwords-scripts-aws-s3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

adwords-scripts-aws-s3

Example of fetch files from AWS S3 from within AdWords Scripts.

This solution provides example code for fetching files from S3 using the ES5 environment within AdWords Scripts.

Usage

  1. Copy the code from s3-example.js and paste it into your AdWords Script.

  2. Initialize an S3 object:

    var s3 = new S3('<region>', '<access_key_id>', '<access_secret>');
  3. Once initialized, to make an authorized GET request:

    var response = s3.fetch('<AWS URL>');

The response object is of class HttpResponse.

To determine success therefore, call response.getResponseCode() to check for a status of 200, before obtaining the content with one of the other methods listed.

About

Example of fetching files from AWS S3 from within AdWords Scripts

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published