amazon-s3

Can I use AWS API Gateway as a reverse proxy for a S3 website?

六眼飞鱼酱① 提交于 2021-02-07 04:23:11
问题 I have a serverless website on AWS S3. But S3 have a limitation that I want to overcome: it don't allow me to have friendly URLs. For example, I would like to replace URL: www.mywebsite.com/user.html?login=daniel With this URL friendly: www.mywebsite.com/user/daniel So, I would like to know if I can use Lambda together with API Gateway to achieve this. My idea is: API Gateway ---> Lambda function ---> fetch S3 resource The API Gateway will get ANY request, and pass information to a Lambda

Django app does not load images from AWS bucket's media folder

心不动则不痛 提交于 2021-02-07 04:21:15
问题 I'm using django-oscar ,and wanted to serve my static files with AWS S3. To config my s3 bucket I've created a module called aws with conf.py and utils.py files. On my website when I upload an image to the product it gets uploaded well with the correct path to my aws s3 bucket, but then after very short time the path changes from https://mybucketname.s3.amazonaws.com/media/cache/..../image.jpg to https://mybucketname.s3.amazonaws.com/cache/..../image.jpg The images are in the media folder in

Updating a file in Amazon S3 bucket

筅森魡賤 提交于 2021-02-07 04:10:55
问题 I am trying to append a string to the end of a text file stored in S3. Currently I just read the contents of the file into a String, append my new text and resave the file back to S3. Is there a better way to do this. I am thinkinig when the file is >>> 10MB then reading the entire file would not be a good idea so how should I do this correctly? Current code [code] private void saveNoteToFile( String p_note ) throws IOException, ServletException { String str_infoFileName = "myfile.json";

Updating a file in Amazon S3 bucket

送分小仙女□ 提交于 2021-02-07 04:10:38
问题 I am trying to append a string to the end of a text file stored in S3. Currently I just read the contents of the file into a String, append my new text and resave the file back to S3. Is there a better way to do this. I am thinkinig when the file is >>> 10MB then reading the entire file would not be a good idea so how should I do this correctly? Current code [code] private void saveNoteToFile( String p_note ) throws IOException, ServletException { String str_infoFileName = "myfile.json";

Updating a file in Amazon S3 bucket

时光毁灭记忆、已成空白 提交于 2021-02-07 04:09:30
问题 I am trying to append a string to the end of a text file stored in S3. Currently I just read the contents of the file into a String, append my new text and resave the file back to S3. Is there a better way to do this. I am thinkinig when the file is >>> 10MB then reading the entire file would not be a good idea so how should I do this correctly? Current code [code] private void saveNoteToFile( String p_note ) throws IOException, ServletException { String str_infoFileName = "myfile.json";

Would S3 Select speed up Spark analyses on Parquet files?

久未见 提交于 2021-02-07 03:45:38
问题 You can use S3 Select with Spark on Amazon EMR and with Databricks, but only for CSV and JSON files. I am guessing that S3 Select isn't offered for columnar file formats because it wouldn't help that much. Let's say we have a data lake of people with first_name , last_name and country columns. If the data is stored as CSV files and you run a query like peopleDF.select("first_name").distinct().count() , then S3 will transfer all the data for all the columns to the ec2 cluster to run the

Would S3 Select speed up Spark analyses on Parquet files?

|▌冷眼眸甩不掉的悲伤 提交于 2021-02-07 03:42:20
问题 You can use S3 Select with Spark on Amazon EMR and with Databricks, but only for CSV and JSON files. I am guessing that S3 Select isn't offered for columnar file formats because it wouldn't help that much. Let's say we have a data lake of people with first_name , last_name and country columns. If the data is stored as CSV files and you run a query like peopleDF.select("first_name").distinct().count() , then S3 will transfer all the data for all the columns to the ec2 cluster to run the

How do you upload files directly to S3 over SSL?

让人想犯罪 __ 提交于 2021-02-07 03:32:42
问题 I've been using browser based direct POST uploads with Amazon S3 for a while, and just recently wanted to start posting through HTTPS. Normal HTTP posts work just fine. However, when I post the same form to https://s3.amazonaws.com/, I get a "405 Method Not Allowed". Do browser based direct AWS POST uploads not support HTTPS? If they do, how can I do it without getting a 405 error? Thanks! 回答1: It could be some problem with your HTML FORM action. The action specifies the URL that processes

S3 Hosting + Api Gateway

大憨熊 提交于 2021-02-07 02:38:10
问题 I'm trying to host a static site in S3 with ability to handle some dynamic content using Lambda/Api Gateway. Can't seem to be able to do that. I want URLs to look like this: example.com/index.html example.com/images/* example.com/css/* example.com/api/* -> API Gateway Also, when redirecting I'd like to keep the example.com as a root domain. I tried RoutingRules in S3, but redirects from the client. I need this to be transparent from the user, like proxying requests. 回答1: You can configure

Streaming S3 object to VertX Http Server Response

核能气质少年 提交于 2021-02-06 14:01:01
问题 The title basically explains itself. I have a REST endpoint with VertX . Upon hitting it, I have some logic which results in an AWS-S3 object. My previous logic was not to upload to S3 , but to save it locally. So, I can do this at the response routerCxt.response().sendFile(file_path...) . Now that the file is in S3, I have to download it locally before I could call the above code. That is slow and inefficient. I would like to stream S3 object directly to the response object. In Express , it