【发布时间】:2014-05-01 10:53:29
【问题描述】:
我正在使用https://github.com/bevacqua/grunt-ec2 连接并更新 Amazon AWS 的存储桶。当我执行任何 ec2 命令(例如:grunt ec2_list_json:all)时,它会挂起并且从不响应。以下是相关文件的样子:
Gruntfile.js
// Generated on 2014-04-28 using angfull 1.4.2
'use strict';
// # Globbing
// for performance reasons we're only matching one level down:
// 'test/spec/{,*/}*.js'
// use this if you want to recursively match all subfolders:
// 'test/spec/**/*.js'
module.exports = function (grunt) {
// Load grunt tasks automatically
require('load-grunt-tasks')(grunt);
// Time how long tasks take. Can help when optimizing build times
require('time-grunt')(grunt);
// Define the configuration for all the tasks
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
ec2: 'aws-credentials.json',
...
});
grunt.loadNpmTasks('grunt-ec2');
...
aws-credentials.json
{
"AWS_ACCESS_KEY_ID": "xxx",
"AWS_SECRET_ACCESS_KEY": "xxx",
"AWS_SECURITY_GROUP": "xxx",
"AWS_DEFAULT_REGION": "us-east-1d",
"AWS_IMAGE_ID": "ami-05355a6c",
"NODE_SCRIPT": "server.js"
}
当我执行需要连接到 AWS 实例的命令时 - 它挂起。显然它根本没有连接 - 我只是不确定为什么。谢谢。
【问题讨论】:
标签: node.js amazon-web-services amazon-ec2 amazon-s3 gruntjs