amazon-s3

S3 object url is not secure(ssl) when opened in browser

大憨熊 提交于 2021-02-10 09:26:30
问题 I am building a small REST API service to store and retrieve photos. For that, I am using S3 as following: public String upload(InputStream uploadedInputStream, Map<String, String> metadata, String group, String filename) { TransferManager tm = TransferManagerBuilder.standard() .withS3Client(amazonS3) .build(); ObjectMetadata objectMetadata = new ObjectMetadata(); objectMetadata.setContentType(metadata.get(Configuration.CONTENT_TYPE_METADATA_KEY)); // TODO: 26/06/20 Add content-type to

S3 object url is not secure(ssl) when opened in browser

旧巷老猫 提交于 2021-02-10 09:25:34
问题 I am building a small REST API service to store and retrieve photos. For that, I am using S3 as following: public String upload(InputStream uploadedInputStream, Map<String, String> metadata, String group, String filename) { TransferManager tm = TransferManagerBuilder.standard() .withS3Client(amazonS3) .build(); ObjectMetadata objectMetadata = new ObjectMetadata(); objectMetadata.setContentType(metadata.get(Configuration.CONTENT_TYPE_METADATA_KEY)); // TODO: 26/06/20 Add content-type to

How to resize image on fly(express and S3)

独自空忆成欢 提交于 2021-02-10 06:59:07
问题 I am tring to get image from url and then to resize on fly without saving var request = require('request'); request .get('s3url') .on('response', function (response) { console.log(response) // 200 console.log(response.headers['content-type']) // 'image/png' }) .pipe(res) I can now return same picture with request lib but how can I manipulate it and then return as response? 回答1: There are several npm modules that do resizing one example is sharp. You can use it in this way (example taken from

How to resize image on fly(express and S3)

浪子不回头ぞ 提交于 2021-02-10 06:58:52
问题 I am tring to get image from url and then to resize on fly without saving var request = require('request'); request .get('s3url') .on('response', function (response) { console.log(response) // 200 console.log(response.headers['content-type']) // 'image/png' }) .pipe(res) I can now return same picture with request lib but how can I manipulate it and then return as response? 回答1: There are several npm modules that do resizing one example is sharp. You can use it in this way (example taken from

iOS AWS S3 Upload How To Retry Failed or Faulted Tasks?

廉价感情. 提交于 2021-02-10 05:45:06
问题 I'm utilizing the iOS AWS SDK's batch upload [AWSTask taskForCompletionOfAllTasks:tasks] The tasks array is an array of AWSTask *task = [self.transferManager upload:uploadRequest]; objects. Once the upload is complete I can enumerate through the array to check to see if all the tasks were successful or not. However, I can't seem to figure out how to retry a failed or faulted task. If I pass an array of failed tasks to taskForCompletionOfAllTasks it doesn't do anything with those tasks? The

How to fix “MissingHeaders” Error while appending where clause with s3 select

假如想象 提交于 2021-02-10 05:41:30
问题 I have a csv file in the format IDATE_TIMESTAMP,OPEN,HIGH,LOW,CLOSE,VOLUME 1535535060,94.36,94.36,94.36,94.36,1 1535535120,94.36,94.36,93.8,93.8,1 1535535180,93.8,93.8,93.8,93.8,0 1535535240,93.8,93.8,93.74,93.74,1 1535535300,93.74,93.74,93.74,93.74,0 1535535360,93.74,93.74,93.74,93.74,0 1535535420,93.74,93.74,93.74,93.74,0 1535535480,93.74,93.74,93.74,93.74,0 1535535540,93.74,93.74,93.74,93.74,0 . . . . I have to and from timestamp which will filter out the data from the file and return the

AWS InterruptedException: sleep interrupted com.amazonaws.http.IdleConnectionReaper

别等时光非礼了梦想. 提交于 2021-02-09 20:49:32
问题 we have a web application use AWS (Amazone api), in the coreConfiguration class we create a awsApi bean with predestroy method, the code for coreConfiguration is: @Bean(destroyMethod = "destroy") public IGridStorageManager awsApi() { ..... } in awsApi class we have detroy methode, the code is: @Override @PreDestroy public void destroy() { if (clientS3 != null) { clientS3.shutdown(); } } My problem is sometime in PROD when i use the API i see thos logs: 2020-08-03 11:27:00.090 DEBUG 25172 ---

AWS InterruptedException: sleep interrupted com.amazonaws.http.IdleConnectionReaper

房东的猫 提交于 2021-02-09 20:41:20
问题 we have a web application use AWS (Amazone api), in the coreConfiguration class we create a awsApi bean with predestroy method, the code for coreConfiguration is: @Bean(destroyMethod = "destroy") public IGridStorageManager awsApi() { ..... } in awsApi class we have detroy methode, the code is: @Override @PreDestroy public void destroy() { if (clientS3 != null) { clientS3.shutdown(); } } My problem is sometime in PROD when i use the API i see thos logs: 2020-08-03 11:27:00.090 DEBUG 25172 ---

Terraform: Issue with assume_role

本秂侑毒 提交于 2021-02-09 11:17:04
问题 I'm trying to solve this mystery for few days now, but no joy. Basically, Terraform cannot assume role and failing with: Initializing the backend... 2019/10/28 09:13:09 [DEBUG] New state was assigned lineage "136dca1a-b46b-1e64-0ef2-efd6799b4ebc" 2019/10/28 09:13:09 [INFO] Setting AWS metadata API timeout to 100ms 2019/10/28 09:13:09 [INFO] Ignoring AWS metadata API endpoint at default location as it doesn't return any instance-id 2019/10/28 09:13:09 [INFO] AWS Auth provider used:

utf-8 filename in s3 bucket

拥有回忆 提交于 2021-02-09 11:13:14
问题 Is it possible to add a key to s3 with an utf-8 encoded name like "åøæ.jpg"? I'm getting the following error when uploading with boto: <Error><Code>InvalidURI</Code><Message>Couldn't parse the specified URI.</Message> 回答1: @2083: This is a bit of an old question, but if you haven't found the solution, and for everyone else that comes here like me looking for an answer: From the official documentation (http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html): Although you can use any