amazon

Register device id directly with Amazon SNS

邮差的信 提交于 2019-11-29 14:06:33
问题 I am using the Amazon Web Service to send push notifications directly to a device. After I install the app I get the device id, that I need to manually add to the Amazon SNS. I would like to know if there is anyway to register the device id directly with the amazon server the moment the user starts the application. I have read this, but found it difficult to understand. Does anyone have any previous experience of how to do this? EDIT 2 (What I have done so far) I've followed the instructions

how to convert character encoding with ruby 1.9

女生的网名这么多〃 提交于 2019-11-29 13:06:02
问题 i am currently having trouble with results from the amazon api. the service returns a string with unicode characters: Learn Objective\xE2\x80\x93C on the Mac (Learn Series) with ruby 1.9.1 the string could not even been processed: REXML::ParseException: #<Encoding::CompatibilityError: incompatible encoding regexp match (UTF-8 regexp with ASCII-8BIT string)> ... Exception parsing Line: 1 Position: 1636 Last 80 unconsumed characters: Learn Objective–C on the Mac (Learn Series) 回答1: As the

AmazonClientException: Data read has a different length than the expected

﹥>﹥吖頭↗ 提交于 2019-11-29 10:59:12
1.When I am using AmazonS3Client to upload file on amazon s3 file store. 2.when I am trying to upload multiple files at a time it gives exceptions: but same file multiple threads. I tried out client configure such as : 1.connectionTimeout=50000 in ms 2.maxConnections=500 3.socketTimeout=50000 in ms Exception stacktrace: com.amazonaws.AmazonClientException: Data read has a different length than the expected: dataLength=8192; expectedLength=79352; includeSkipped=false; in.getClass()=class com.amazonaws.internal.ResettableInputStream; markedSupported=true; marked=0; resetSinceLastMarked=false;

Amazon ECS API to fetch 1000 top selling books

你说的曾经没有我的故事 提交于 2019-11-29 09:17:06
问题 I need the API to fetch the top selling books on Amazon. By default it only fetches the top 10 items, but I need more than 10, near about 1000 items content by using single hit. OR I need the way to scrape the 1000 top selling books using the Amazon ECS API. OR Is there any way except the Amazon API to scrape all of the top selling books on Amazon? 回答1: here's how I do it - but it won't work for more than 100 items after the end of this month as Amazon are limiting ItemPage to 10. rescheck =

How to properly sign a GET request to Amazon's ItemLookup using client-side JavaScript only?

无人久伴 提交于 2019-11-29 07:38:51
Here's what I have so far: function sha256(stringToSign, secretKey) { return CryptoJS.HmacSHA256(stringToSign, secretKey); } function getAmazonItemInfo(barcode) { var parameters = "Service=AWSECommerceService&" + "AWSAccessKeyId=" + appSettings.amazon.accessKey + "&" + "Operation=ItemLookup&" + "ItemId=" + barcode + "&Timestamp=" + Date.now().toString(); var stringToSign = "GET\n" + "webservices.amazon.com\n" + "/onca/xml\n" + parameters; var signature = "&Signature=" + encodeURIComponent(sha256(stringToSign, appSettings.amazon.secretKey)); var amazonUrl = "http://webservices.amazon.com/onca

Unable to log in to Amazon using Python

馋奶兔 提交于 2019-11-29 05:19:55
I'm using Python 3 to write a script to log in to Amazon to grab my Kindle highlights. It is based on this article: https://blog.jverkamp.com/2015/07/02/scraping-kindle-highlights/ I am unable to successfully log in and instead get a message saying to enable cookies to continue: <RequestsCookieJar[<Cookie ubid-main=189-4768762-8531647 for .amazon.com/>]> Failed to login: Please Enable Cookies to Continue To continue shopping at Amazon.com, please enable cookies in your Web browser. Learn more about cookies and how to enable them. I have included requests sessions to handle cookies, but it

Amazon S3 Redirect rule - GET data is missing

孤街浪徒 提交于 2019-11-29 02:41:28
We recently moved our website to Amazon S3 (all static pages). We moved al static files to a different subdomain which still points to our old server. All is working lovely except one thing. We got a script that's still being called from old clients on the main domain. On the new clients, the URL is fixed, but the old clients are still using the old URL. I found we can manage redirects in Amazon S3 as described on http://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html . This is working, except the fact we are loosing all our GET-variables. Is there a way to define a S3

How to start an Amazon EC2 instance programmatically in .NET

為{幸葍}努か 提交于 2019-11-29 01:21:10
问题 I have been attempting to start an instance of EC2 in C# without luck. When passing in an instance id to start the instance I get an error that the instance cannot be found despite that I am passing in an instance ID that I have obtained from the object property. I would be most grateful for any tips or pointers with this. 回答1: Amazon made huge efforts to integrate its AWS Cloud .Net SDK To VS2008 & VS 2010 1 - Download and Install the AWS SDK msi 2 - Create an AWS Console project, enter your

Match sub-string within a string with tolerance of 1 character mismatch

て烟熏妆下的殇ゞ 提交于 2019-11-28 23:27:13
问题 I was going through some Amazon interview questions on CareerCup.com, and I came across this interesting question which I haven't been able to figure out how to do. I have been thinking on this since 2 days. Either I am taking a way off approach, or its a genuinely hard function to write. Question is as follows: Write a function in C that can find if a string is a sub-string of another. Note that a mismatch of one character should be ignored. A mismatch can be an extra character: ’dog’

amazon S3 bucket policy - restricting access by referer BUT not restricting if urls are generated via query string authentication

限于喜欢 提交于 2019-11-28 21:27:54
问题 I have the following bucket policy set on my bucket: { "Version": "2008-10-17", "Id": "My access policy", "Statement": [ { "Sid": "Allow only requests from our site", "Effect": "Allow", "Principal": { "AWS": "*"}, "Action": "s3:GetObject", "Resource": "arn:aws:s3:::my_bucket/*", "Condition": { "StringLike": { "aws:Referer": [" http://mydomain.com/*"," http://www.mydomain.com/*"] } } }, { "Sid": "Dont allow direct acces to files when no referer is present", "Effect": "Deny", "Principal": {"AWS