amazon-s3

AFNetworking 2.0: NSURLSessionDownloadTask is cancelled when received 302 to AWS S3

旧巷老猫 提交于 2020-01-13 05:23:47
问题 I'm using a simple example from the README file (from AFNetworking 2.0 page) to download an image. All works fine for the images served directly from my web-sever. But for those located on the S3 the web-server returns 302 Redirect the following error: Error Domain=NSURLErrorDomain Code=-999 "cancelled" When I try to download the image (using the same code) directly from the S3 (omitting the redirection) I receive the same error. I've checked the availability of the actual image with wget.

AWS Cloudformation- How to do string Uppercase or lowercase in json/yaml template

谁都会走 提交于 2020-01-13 05:16:11
问题 I am working on AWS CloudFormation and I created one template in which I asked user to select Environment. On the basis of selected value I created the resources. User have to select between DEV, QA, PROD, UAT etc. but when I suffix this value to S3 bucket name (-downloads.com) it not allowed because capital letter is not allowed in S3 bucket name. So I did change in JSON where I use fn::Transform with "Condition":"Lower" but then while creating resources below error occurs. No transform

What is the ARN of an assumed role assumed by a Lambda function?

为君一笑 提交于 2020-01-13 05:07:10
问题 I am trying to use the NotPrincipal element in my bucket policy to explicitly deny access to my s3 bucket while whitelisting a particular lambda that accesses the bucket. I specified the role ARN and assumed role ARN for the lambda's role in the NotPrincipal element: "arn:aws:iam::{Account ID}:role/service-role/{Lambda role name}", "arn:aws:sts::{Account ID}:assumed-role/{Lambda role name}/{role session name}" This doc explains the structure of the assumed role ARNs: https://docs.aws.amazon

Upload uint8_t* buffer to AWS S3 without going via filesystem

大城市里の小女人 提交于 2020-01-13 03:21:18
问题 Disclaimers: I am not a c++ programmer, please save me from myself. I'm trying to create a PutObjectRequest in c++ using the AWS SDK. I have a 'uint8_t*' (in Java-land from whence I hail we call this a byte[], I believe on planet c++ this is a buffer), and I need to get it into an Aws::IOStream somehow. All of the examples show the data coming directly from the filesystem. I've seen a couple of similar-ish (but not really) questions with answers that point to another third party library

Hosting CakePHP app with Amazon Web Services (EC2, etc.)?

心已入冬 提交于 2020-01-13 03:02:38
问题 I don't think I fully understand Amazon Web Services yet, which is why I'm asking this question. I want to know if AWS would be a nice host for a CakePHP application that of course runs off PHP, and MySQL? Would I have to change or add anything to my code if used a service like EC2? I also noticed that Amazon has it's own database system, does that mean no mysql. Also as a side question, what do you guys think of the cost AWS? Sorry if my question is a little scattered, or somewhat "noobish,"

Are AWS S3 Event Notifications guaranteed to be delivered?

心已入冬 提交于 2020-01-12 21:54:59
问题 I'm hooking up AWS S3 event notifications to an AWS Lambda processing pipeline. I can't find documentation on S3 event notification guarantees. Can I be sure all S3 events will fire the lambda processes? Order does not concern me, just that my lambda eventually does get fired. If no such guarantee exists, how to architect to deal with this? 回答1: In principle yes. However, Lambda has a 99.9% SLA and S3 has a 99.9% uptime SLA as well. So in theory some events could be missed, but only when they

AWS CLI upload failed: unknown encoding: idna

拈花ヽ惹草 提交于 2020-01-12 14:32:31
问题 I am trying to push some files up to s3 with the AWS CLI and I am running into an error: upload failed: ... An HTTP Client raised and unhandled exception: unknown encoding: idna I believe this is a Python specific problem but I am not sure how to enable this type of encoding for my python interpreter. I just freshly installed Python 3.6 and have verified that it being used by powershell and cmd. $> python --version Python 3.6.7 If this isn't a Python specific problem, it might be helpful to

AWS CLI upload failed: unknown encoding: idna

喜欢而已 提交于 2020-01-12 14:32:27
问题 I am trying to push some files up to s3 with the AWS CLI and I am running into an error: upload failed: ... An HTTP Client raised and unhandled exception: unknown encoding: idna I believe this is a Python specific problem but I am not sure how to enable this type of encoding for my python interpreter. I just freshly installed Python 3.6 and have verified that it being used by powershell and cmd. $> python --version Python 3.6.7 If this isn't a Python specific problem, it might be helpful to

Using S3 Presigned-URL for upload a file that will then have public-read access

故事扮演 提交于 2020-01-12 14:21:06
问题 I am using Ruby on Rails and AWS gem. I can get pre-signed URL for upload and download. But when I get the URL there is no file, and so setting acl to 'public-read' on the download-url doesn't work. Use case is this: 1, server provides the user a path to upload content to my bucket that is not readable without credentials. 2, And that content needs to be public later: readable by anyone. To clarify: I am not uploading the file, I am providing URL for my users to upload. At that time, I also

Selective file download in AWS S3 CLI

白昼怎懂夜的黑 提交于 2020-01-12 11:49:12
问题 I have files in S3 bucket, I was trying to download files based on date like 08th aug, 09th Aug, how can I download selective date file?. I used following code but it still downloads entire bucket list aws s3 cp s3://bucketname/ folder/file --profile pname --exclude \"*\" --recursive --include \"" + "2015-08-09" + "*\" I am not sure, how to achieve this. 回答1: This command will copy all files starting with 2015-08-15 : aws s3 cp s3://BUCKET/ folder --exclude "*" --include "2015-08-15*" -