Tag: amazon web services

亚马逊Mechanical Turk资格考试要求

我正在尝试为AMT HIT创build强制authentication。 但是在发布这个数据后,HIT显示所需的资格是没有的。 这是我发布的这个数据有什么不对吗? 没有资格考试的文件。 这个function真的可以使用web服务api吗? Title=Rate%20an%20image&Description=Determine%20if%20an%20image%20is%20inappropriate%20for%20children%20or%20in%20the%20workplace.&Reward.1.Amount=0.01&Reward.1.CurrencyCode=USD&&AssignmentDurationInSeconds=180&Keywords=image%20inappropriate&qualificationRequirement.1.QualificationTypeId=ABCDEFGHIJKLMNOPQRSTUVWXYZ&qualificationRequirement.1.Comparator=EqualTo&qualificationRequirement.1.IntegerValue=10&qualificationRequirement.1.RequiredToPreview=true&AWSAccessKeyId=ABCDEFGHIJKLMNOPQRSTUVWXYZ&Timestamp=2012-11-29T07%3A04%3A15.867Z&Signature=ABCDEFGHIJKLMNOPQRSTUVWXYZ&Service=AWSMechanicalTurkRequester&Operation=RegisterHITType&Version=2008-08-02

AWS node.js没有创buildS3存储桶?

我正在尝试使用基本教程创build一个S3存储桶,如下所示 var AWS = require('aws-sdk'); AWS.config.loadFromPath('./myawsconfig.json'); AWS.config.update({region: 'eu-west-1'}); var s3 = new AWS.S3(); s3.client.createBucket({Bucket: 'pBucket'}, function() { var data = {Bucket: 'pBucket', Key: 'myKey', Body: 'Hello!'}; s3.client.putObject(data, function(err, data) { if (err) { console.log("Error uploading data: ", err); } else { console.log("Successfully uploaded data to myBucket/myKey"); } }); }); 但是我收到以下错误 node createbucket.js Error uploading data: […]

如何在node.js / Javascript中签署Amazon Simple Paybutton

我花了6个小时试图按照Amazon的说明在node.js中签署一个Simple Paybutton。 我不能接受签署,我已经尝试了混乱的说明的每一个排列。 任何人都可以帮助我摆脱苦难吗? 我得到的错误是 input参数签名无效 这是我的程序 var params={ "returnUrl": "[confidential]", "ipnUrl": "[confidential]", "processImmediate": "1", "accessKey" :"[AWS key]", "collectShippingAddress" :"0", "isDonationWidget" :"0", "amazonPaymentsAccountId" :"[the button generator creates this but there is no mention in the docs]", "referenceId" :ref, "cobrandingStyle" :"logo", "immediateReturn" :"1", "amount" :"USD "+amount, "description" : desc, "abandonUrl" :"[confidential]", "signatureMethod": "HmacSHA256", //docs not clear […]

在错误在亚马逊服务器上执行bash,bash是在正确的path

我正在使用Gith在亚马逊服务器上构build一个webhook服务器来自动部署。 当我更新我的存储库时,gith服务器可以接收更新,然后我想执行bash。 bash文件位于/home/ubuntu/node/githook/hook.sh,console.log(__ console.log(__dirname+'/hook.sh');的path上console.log(__dirname+'/hook.sh'); 输出正确的path,但是当使用execFile执行path时,它给出了一个错误 错误{ [Error: spawn EACCES] code: 'EACCES', errno: 'EACCES', syscall: 'spawn' } 上面的代码,但不知道为什么执行代码给了我这样的错误。 var gith = require('gith').create( 8080 ); var execFile = require('child_process').execFile; gith({ repo: 'heroku/node-js-sample' }).on( 'all', function( payload ) { if( payload.branch === 'master' ) { //console.log('all',payload ); console.log(__dirname+'/hook.sh'); execFile(__dirname+'/hook.sh', function(error, stdout, stderr) { // Log success in some […]

在Meteor中不能使用aws-sdk

出于某种原因,我似乎无法让AWS SDK在Meteor 0.7.0.1中工作。 如果我使用npm安装,我得到以下内容: While building the application: node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/examples/test.html:1: Can't set DOCTYPE here. (Meteor sets <!DOCTYPE html> for you) node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/LICENSE-W3C.html:1: Can't set DOCTYPE here. (Meteor sets <!DOCTYPE html> for you) node_modules/aws-sdk/dist/console.html:1: Can't set DOCTYPE here. (Meteor sets <!DOCTYPE html> for you) node_modules/aws-sdk/dist/s3upload.html:1: Can't set DOCTYPE here. (Meteor sets <!DOCTYPE html> for you) node_modules/aws-sdk/dist/tests.html:1: Can't set […]

AWS负载平衡器安全组

我正在尝试使用ELB部署一些nodejs站点,并且在ELB和EC2实例的安全组中遇到了一些问题。 我想要做的是允许ELB接受端口80的请求,并将这些请求转发到EC2实例的端口3000,我不希望EC2实例可以从互联网直接访问,只能访问(在端口3000)通过负载均衡器。 所以在我的公共子网中的VPC中,我有: 设置一个ELB,将80(HTTP)转发到3000(HTTP) 安全组从0.0.0.0/0接受端口80上的入站stream量 在端口3000上运行节点的EC2实例 安全组,接受来自 ELB实例的安全组的端口3000入站stream量 这不起作用。 如果在EC2实例上,我允许从0.0.0.0/0开始使用3000端口。 但是,我可以使用实例的公有IP去实例, 而不通过负载均衡器。 从我理解这应该是可能的,或者我错过了什么? 谢谢,乔

在Amazon Elastic BeansTalk中部署node.js应用程序

当我尝试在Amazon Elastic Beans对话pipe理控制台中部署node.js应用程序时,健康状况显示为红色。 请检查下面的错误信息,并请build议我解决这个问题。 健康红 正在运行的版本SGCP28上传和部署 configurationNode.js 如上所述,健康呈现红色,这是什么意思? 我们怎么能解决这个问题,或者找出它是红色的原因呢? Recent Events Time Type Details 2014-02-28 10:36:47 UTC+0800 INFO Deleted log fragments for this environment. 2014-02-28 10:31:49 UTC+0800 INFO Environment update completed successfully. 2014-02-28 10:31:49 UTC+0800 INFO Successfully deployed new configuration to environment. 2014-02-28 10:30:59 UTC+0800 INFO Updating environment sg-env's configuration settings. 2014-02-28 10:30:51 UTC+0800 INFO […]

Node JS和AWS sdk – 具有多个Expected值的putitem不起作用

我正在使用下面的代码来查询node.js / express框架内的dynamodb实例。 代码是查询一个名为User的表,它有一个没有范围的用户名的散列键主键。 它没有本地二级索引和3个全局二级索引(last_name-first_name,email_last-name和company_ [no range])。 我想防止重复的用户名和重复的电子邮件地址。 我可以成功阻止重复的用户名,但不能重复的电子邮件地址 文档声明“ComparisonOperator”:“NULL”或Exists:false行应该这样做(它们是互斥的,我不会同时尝试它们)。 但是,只有用户名validation由AWS sdk“尊敬”,即。 下面的代码可以防止重复的用户名被input到系统中,但重复的电子邮件仍然存在。 如果我将两个“Expected:”键(用户名和电子邮件)都保留下来,putitem只需添加一条新logging或者用相同的用户名(如文档状态和我所期望的)更新现有logging,但是只保留电子邮件密钥在将不会防止在数据库中重复的电子邮件。 请帮忙。 谢谢 var d = new Date(); var dt = d.getTime(); params = { TableName: 'User', Expected: { "username": { Exists: false // tried this also -> "ComparisonOperator": "NULL" }, "email": { Exists: false // tried this also -> "ComparisonOperator": "NULL" […]

TypeError:不是缓冲区node.js crypto,aws-sdk

我试图创build一个S3上传到亚马逊S3的策略…但是当编码策略,我得到一个types错误:不是一个缓冲区。 我正在使用encryption版本:0.0.3和aws-sdk版本:2.0.0-rc.19 这是工作之前,所以我认为它可能与更新aws-sdk有关… … 这是代码。 该注释将显示错误发生的位置: createS3Policy = function(contentType, callback) { var date = new Date(); var s3Policy = { 'expiration': getExpiryTime(), 'conditions': [ ['starts-with', '$key', 'shimmy-assets/'], {'bucket': S3_BUCKET}, {'acl': 'public-read'}, ['starts-with', '$Content-Type', contentType], {'success_action_status' : '201'} ] }; // stringify and encode the policy var stringPolicy = JSON.stringify(s3Policy); console.log('string policy: ' + stringPolicy); var […]

如何cachingnode.js服务器上的AWS S3文件并根据请求提供服务?

对于我的网站,我将所有assets (字体/图像/ js等)部署到S3 bucket 。 index.html (单页面的Ember.js应用程序)部署在弹性beanstalk node.js服务器上。 节点app.js会向www.domain.com/*发送任何请求并提供本地存储的index.html 。 我希望能够削减为每个生产构build部署新应用程序到弹性beanstalk的过程,并简单地将所有资产和index.html部署到S3 bucket 。 这是我迄今为止: var AWS = require('aws-sdk'), fs = require('fs'); /* * AWS Security credentials */ AWS.config.loadFromPath('./config.json'); var port = process.env.PORT || 3000, http = require("http"); var static = require('node-static'); /* * Create a node-static server instance * to serve the './public' folder */ […]