This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="ja"> | |
<head> | |
<title>AWS Javascript Browser SDK Example</title> | |
<meta charset="UTF-8"> | |
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/nvd3/1.1.15-beta/nv.d3.min.css"> | |
<script src="//sdk.amazonaws.com/js/aws-sdk-2.0.16.min.js"></script> | |
</head> | |
<body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log('Loading event'); | |
var Q = require('q'); | |
var aws = require('aws-sdk'); | |
var cloudfront = new aws.CloudFront(); | |
exports.handler = function (event, context) { | |
//_log('Received event: ', event); | |
var bucket = event.Records[0].s3.bucket.name; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var AWS = require('aws-sdk'); | |
var async = require('async'); | |
var path = require("path"); | |
var mkdir = require("mkdirp"); | |
var fs = require('fs'); | |
var spawn = require('child_process').spawn; | |
exports.handler = function (event, context) { | |
// console.log('Event: '+JSON.stringify(event, true, ' ')); | |
var key = event.Records[0].s3.object.key; |