aws

Importing AWS SDK in Angular 2 Application

匿名 (未验证) 提交于 2019-12-03 08:52:47
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am attempting to use the AWS SDK in my Angular 2 application and am getting quite stuck. Here are the steps I have taken: Installed the aws sdk into my Angular 2 application using npm install aws-sdk Installed the types using npm install --save-dev @types/node Attempted to include the AWS modules several different ways in my Angular 2 service: declare var AWS: any; , import AWS = require('aws-sdk'); , and finally import * as AWS from 'aws-sdk'; . when I attempt to use the first and third type of import, I don't get a transpiler error until

Trying to set up Amazon's S3 bucket: 403 Forbidden error & setting permissions

匿名 (未验证) 提交于 2019-12-03 08:51:18
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I'm following Hartl's railstutorial.org and have arrived at 11.4.4: Image upload in production . What I've done: Signed up for Amazon Web Services In Amazon Identity and Access Management I created a user. The user was created succesfully. In Amazon S3 I created a new bucket. Set permissions on the new bucket: Permissions: The tutorial instructs to "grant read and write permission to the user created in the previous step". However, under 'Permissons' for the bucket the new user's name is not mentioned. I could only choose between

PHP AWS SDK 3 Error: AWS HTTP error: cURL error 6: Could not resolve host: s3.oregon.amazonaws.com

匿名 (未验证) 提交于 2019-12-03 08:50:26
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to connect to an AWS version 3 SDK bucket. But, I receive the below error: PHP Fatal error: Uncaught exception 'Aws\S3\Exception\S3Exception' with message 'Error executing "PutObject" on " https://s3.oregon.amazonaws.com/my-buekct-test/hello_world.txt "; AWS HTTP error: cURL error 6: Could not resolve host: s3.oregon.amazonaws.com (see http://curl.haxx.se/libcurl/c/libcurl-errors.html )' This is my code, just simple. <?php header('Content-Type: text/plain; charset=utf-8'); // Include the SDK using the Composer autoloader require

Can I use AWS LightSail with AWS CloudWatch?

匿名 (未验证) 提交于 2019-12-03 08:48:34
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I've recently started testing out LightSail , but I would like to keep my logging centralized in CloudWatch , but cannot seem to find anything that would enable this. Interestingly LightSail instances do not appear in the EC2 Dashboard. I thought they were just EC2 instances beneath the surface. 回答1: I thought they were just EC2 instances beneath the surface. Yes... but. Conceptually speaking, you are the customer of Lightsail, and Lightsail is the customer of EC2. It's as though there were an intermediary between you and AWS. The Lightsail

EMR vs EC2/Hadoop on AWS

匿名 (未验证) 提交于 2019-12-03 08:46:08
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I know that EC2 is more flexible but more work over EMR. However in terms of costs, if using EC2 it probably requires EBS volumes attached to the EC2 instances, whereas AWS just streams in data from S3. So crunching the numbers on the AWS calculator, even though for EMR one must pay for EC2 also, EMR becomes cheaper than EC2 ?? Am i wrong here ? Of course EC2 with EBS is probably faster, but is it worth the cost ? thanks, Matt 回答1: EMR does a lot of things for you that you won't find on standard Hadoop on EC2. Some particularly important

How to get the HTTP method in AWS Lambda?

匿名 (未验证) 提交于 2019-12-03 08:46:08
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: In an AWS Lambda code, how can I get the HTTP method (e.g. GET, POST...) of an HTTP request coming from the AWS Gateway API? I understand from the documentation that context.httpMethod is the solution for that. However, I cannot manage to make it work. For instance, when I try to add the following 3 lines: if (context.httpMethod) { console.log('HTTP method:', context.httpMethod) } into the AWS sample code of the "microservice-http-endpoint" blueprint as follows: exports.handler = function(event, context) { if (context.httpMethod) { console

AWS Java SDK - Unable to find a region via the region provider chain

匿名 (未验证) 提交于 2019-12-03 08:46:08
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have gone through the question titled "Setting the AWS region programmatically 1" but it doesn't provide all the answers I need. Q1: I'm getting a SDKClientException-Unable to find a region via the region provider chain . What am I doing wrong? or is there a typo that I missed. public class CreateS3Bucket { public static void main(String[] args) throws IOException { BasicAWSCredentials creds = new BasicAWSCredentials("aws-access-key", "aws-secret-key"); AmazonS3 s3Client = AmazonS3ClientBuilder.standard().withCredentials(new

AWS EFS from Windows Server 2012

匿名 (未验证) 提交于 2019-12-03 08:46:08
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Has anyone ever got Windows Server to connect to an AWS EFS volume using the Windows NFS 4.1 client? I am aware it is unsupported but wondering if anyone had done it (or via another client or utility?) We have a requirement for a Windows Server to drop files onto an NFS volume (ideally EFS) where a folder on that volume can be polled from a RHEL based application. That app doesnt support S3 else we'd use that Tks 回答1: No it is not possible. AWS specifically state that it is not possible in their documentation. For example, Using Amazon EFS

AWS SDK v2 AllAccessDisabled error for S3 file copy

匿名 (未验证) 提交于 2019-12-03 08:42:37
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm in the process of switching over to the new aws-sdk in a rails app I wrote and cannot for the life of me find working corresponding methods in the v2 sdk. I'm also running into access denied issues I can't work out. The way I make use of the v1 sdk is that users directly upload to s3 using an "uploads" namespaced key, and after they create the object they're working on, a callback moves the file to the longterm key and deletes the old one. Here is an example of that: def move_file old_key = s3_key new_key = "#{self.class.table_name}/#{id

Creating amazon aws s3 pre signed url PHP

匿名 (未验证) 提交于 2019-12-03 08:41:19
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: According to this link http://docs.aws.amazon.com/aws-sdk-php/v2/guide/service-s3.html , I can easily create a presigned link just adding the life span to getObjectUrl $signedUrl = $client->getObjectUrl($bucket, 'data.txt', '+10 minutes'); // > https://my-bucket.s3.amazonaws.com/data.txt?AWSAccessKeyId=[...]&Expires=[...]&Signature=[...] But I get a plain url, you know, without the awsaccesskeyid and expires parameters, Here's my code: $bucket = 'imagenesfc'; $keyname = 'NASimagenes/codigoBarraBoleto/1001000098.png'; $filepath = 'NASimagenes