aws-sdk

AWS java SDK manually set signature version

做~自己de王妃 提交于 2019-12-18 06:51:44
问题 I'm trying to access a blob store service which is on top of AWS S3. It supports AWS SDK and it's signature version 2. I'm using code here to access the this service. Is it possible to manually set the signature version of the request made by AWS SDK ? According to this page AWS currently supports two signature versions: signature version 2 and signature version 4, which are covered in this section. Most services support version 4, and if a service supports version 4, we strongly recommend

Retrieve S3 file as Object instead of downloading to absolute system path

妖精的绣舞 提交于 2019-12-18 04:39:15
问题 I just started learning and using S3, read the docs. Actually I didn't find anything to fetch the file into an object instead of downloading it from S3? if this could be possible, or I am missing something? Actually I want to avoid additional IO after downloading the file. 回答1: You could use StringIO and get file content from S3 using get_contents_as_string , like this: import pandas as pd import StringIO from boto.s3.connection import S3Connection AWS_KEY = 'XXXXXXDDDDDD' AWS_SECRET =

“IN” statement in dynamodb

十年热恋 提交于 2019-12-18 04:04:10
问题 I have a "Users" table, here is a sample : { username:"haddox", formattedPhoneNumber:"676767676", verified: 0, } My wish is to retrieve all users whose formattedPhoneNumber is contained in an array of phone numbers (retrieved from my contacts). I created a secondary index, with verified as HASH and formattedPhoneNumber as RANGE. Here is my try : var params = { TableName: "Users", IndexName: "FormattedPhoneSecondaryIndex", KeyConditionExpression: "verified = :v AND formattedPhone IN :n",

How do I promisify the AWS JavaScript SDK?

主宰稳场 提交于 2019-12-17 18:12:22
问题 I want to use the aws-sdk in JavaScript using promises. Instead of the default callback style: dynamodb.getItem(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response }); I instead want to use a promise style: dynamoDb.putItemAsync(params).then(function(data) { console.log(data); // successful response }).catch(function(error) { console.log(err, err.stack); // an error occurred }); 回答1: I believe calls can now be

AWS SDK for PHP: Error retrieving credentials from the instance profile metadata server

◇◆丶佛笑我妖孽 提交于 2019-12-17 15:33:03
问题 I am trying to send SNS messeges to android through web api. Downloaded and installed the SDK from http://aws.amazon.com/developers/getting-started/php/ Got following error while running sample.php: Fatal error: Uncaught exception 'Aws\Common\Exception\InstanceProfileCredentialsException' with message 'Error retrieving credentials from the instance profile metadata server. When you are not running inside of Amazon EC2, you must provide your AWS access key ID and secret access key in the "key"

Swift Xcode Index Freezing or Slow

懵懂的女人 提交于 2019-12-17 08:18:30
问题 Maybe this is just me experiencing such an annoying "feature": After upgrading from Xcode 6.0.1 to Xcode 6.1, things changed. Xcode 6.1 is forever indexing the project or compiling source files. The project is not a huge one. It just contains a bunch of Swift files and AWS SDK 2.0 Cocoapods in the workspace. I don't think it should prevent the whole to index and compile smoothly. I tried with some aws-sdk-ios-samples, just to see how Xcode 6.1 works on them, and it ended up in the same

Swift Xcode Index Freezing or Slow

大城市里の小女人 提交于 2019-12-17 08:18:11
问题 Maybe this is just me experiencing such an annoying "feature": After upgrading from Xcode 6.0.1 to Xcode 6.1, things changed. Xcode 6.1 is forever indexing the project or compiling source files. The project is not a huge one. It just contains a bunch of Swift files and AWS SDK 2.0 Cocoapods in the workspace. I don't think it should prevent the whole to index and compile smoothly. I tried with some aws-sdk-ios-samples, just to see how Xcode 6.1 works on them, and it ended up in the same

cross-account-access between 3 AWS accounts using assumeRule

独自空忆成欢 提交于 2019-12-13 20:14:10
问题 We have a service in AWS-Account-A which will copy some files with ACL: 'bucket-owner-full-control' to a s3 bucket in AWS-Account-B . Now there is a AWS-Account-C which already have a assumeRule ( which a S3 Read access policy is attached to it ) from AWS-Account-B, and S3 bucket policy already gave read access to AWS-Account-C rules, So the problem is, AWS-Account-C : Can't read those files which uploaded from AWS-Account-A and only CAN read files which uploaded using AWS-Account-B itself. I

Download file to stream instead of File

随声附和 提交于 2019-12-13 20:11:11
问题 I'm implementing an helper class to handle transfers from and to an AWS S3 storage from my web application. In a first version of my class I was using directly a AmazonS3Client to handle upload and download, but now I discovered TransferManager and I'd like to refactor my code to use this. The problem is that in my download method I return the stored file in form of byte[] . TransferManager instead has only methods that use File as download destination (for example download(GetObjectRequest

Disable/Enable Lambda SNS Trigger Programmatically

半腔热情 提交于 2019-12-13 19:33:36
问题 I need to programmatically disable a lambda's SNS trigger, however, I seem to be unable to do so. I want this to show "Disabled" in the AWS Lambda console for the function: Here's the code I've tried: function updateEndpoints(endpoints, enable) { const promises = []; endpoints.forEach((endpoint) => { console.log(`${enable ? 'Enabling' : 'Disabling'} Endpoint: ${endpoint}`); promises.push( SNS.setEndpointAttributes({ EndpointArn: endpoint, Attributes: { Enabled: enable ? 'True' : 'False', }, }