amazon-s3

Connecting Power BI to S3 Bucket

旧巷老猫 提交于 2021-01-29 10:51:28
问题 Need some guidance as I am new to Power BI and Redshift .. My Raw JSON data is stored in Amazon S3 bucket in the form of .gz files (Each .gz file has multiple rows of JSON data) I wanted to connect Power BI to Amazon s3 Bucket. As of now based on my research I got three ways: Amazon S3 is a web service and supports the REST API. We can try to use web data source to get data Question: Is it possible to unzip the .gz file (inside the S3 bucket or Inside Power BI), extract JSON data from S3 and

Dynamically create new subdomains and point to a cloud front distribution pointing to an s3 bucket

江枫思渺然 提交于 2021-01-29 10:33:21
问题 S3 Bucket in question will have my website files that will be served by a CloudFront distribution. As new customers sign up (It is a multi-tenant serverless application), new subdomains will be created dynamically (not * wild card operator as we wish to serve only valid subdomains associated to customers or redirect to root domain). The website is being served from the same CloudFront distribution/ S3 bucket. How can I dynamically create new subdomains and point to a cloud front distribution

Athena displays special characters as?

喜欢而已 提交于 2021-01-29 10:30:51
问题 I have an external table with below DDL CREATE EXTERNAL TABLE `table_1`( `name` string COMMENT 'from deserializer', `desc1` string COMMENT 'from deserializer', `desc2` string COMMENT 'from deserializer', ) ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.OpenCSVSerde' WITH SERDEPROPERTIES ( 'quoteChar'='\"', 'separatorChar'='|', 'skip.header.line.count'='1') STORED AS INPUTFORMAT 'org.apache.hadoop.mapred.TextInputFormat' OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat

AWS Athena: Named boto3 queries not creating corresponding tables

拈花ヽ惹草 提交于 2021-01-29 10:24:06
问题 I have the following boto3 draft script #!/usr/bin/env python3 import boto3 client = boto3.client('athena') BUCKETS='buckets.txt' DATABASE='some_db' QUERY_STR="""CREATE EXTERNAL TABLE IF NOT EXISTS some_db.{}( BucketOwner STRING, Bucket STRING, RequestDateTime STRING, RemoteIP STRING, Requester STRING, RequestID STRING, Operation STRING, Key STRING, RequestURI_operation STRING, RequestURI_key STRING, RequestURI_httpProtoversion STRING, HTTPstatus STRING, ErrorCode STRING, BytesSent BIGINT,

How to use AWS lambda to convert pdf files to .txt with python

只愿长相守 提交于 2021-01-29 09:57:46
问题 I need to automate the conversion of many pdf to text files using AWS lambda in python 3.7 I've successfully converted pdf files using poppler/pdftotext, tika, and PyPDF2 on my own machine. However tika times out or needs to run a java instance on a host machine which I'm not sure how to set up. pdftotext needs poppler and all the solutions for running that on lambda seems to be outdated or I'm just not familiar enough with binarys to make sense of that solution. PyPDF2 seems the most

Restrict Amazon S3 website endpoint to CloudFront

与世无争的帅哥 提交于 2021-01-29 09:41:16
问题 Is it possible to restrict an Amazon S3 website endpoint to CloudFront only? I see this is possible for S3 rest endpoints but was wondering if there were any new workarounds to do this for S3 website endpoints. 回答1: For website endpoint you can use bucket policy to allow only CloudFront IP address, not restrictive as OAI but still a way. http://d7uri8nf7uskq.cloudfront.net/tools/list-cloudfront-ips For S3 as an origin, CLOUDFRONT_REGIONAL_EDGE_IP_LIST IP address are not used unless you're

Uploading file to s3 using presigned-URL

岁酱吖の 提交于 2021-01-29 09:41:11
问题 I'm trying to upload a file in my s3 bucket with a aws presigned-URL. Here is my js function function UploadObjectUsingPresignedURL() { var file = document.getElementById('customFile').files[0]; console.log(file); var xhr = new XMLHttpRequest(); xhr.open('PUT', 'hereMyPresignedURL', true); //xhr.setRequestHeader('Content-Type', 'image/jpeg'); xhr.onload = () => { if (xhr.status === 200) { console.log('Uploaded data successfully'); } }; xhr.onerror = () => { console.log('Nope') }; xhr.send

Display a 1 GB video file in react js frontend, stored in private S3 bucket using flask

ⅰ亾dé卋堺 提交于 2021-01-29 09:29:09
问题 I need to display/stream large video files in reactjs. These files are being uploaded to private s3 bucket by user using react form and flask. I tried getObject method, but my file size is too large. get a signed url method required me to download the file. I am new to AWS-python-react setup. What is the best/most efficient/least costly approach to display large video files in react? 回答1: AWS offers other streaming specific services but if you really want to get them off S3 you could retrieve

AWS S3 bucket: CORS Configuration

梦想与她 提交于 2021-01-29 09:12:21
问题 I am trying to download an image from S3. But I got error CORS. What I have done: -Setup CORS configuration for S3 bucket: <?xml version="1.0" encoding="UTF-8"?> <CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> <CORSRule> <AllowedOrigin>*</AllowedOrigin> <AllowedMethod>GET</AllowedMethod> <AllowedMethod>POST</AllowedMethod> <AllowedMethod>PUT</AllowedMethod> <AllowedMethod>HEAD</AllowedMethod> <ExposeHeader>Accept-Ranges</ExposeHeader> <ExposeHeader>Content-Range<

How to deploy a Pre-Trained model using AWS SageMaker Notebook Instance?

岁酱吖の 提交于 2021-01-29 09:11:28
问题 I have a pre-trained model which I am loading in AWS SageMaker Notebook Instance from S3 Bucket and upon providing a test image for prediction from S3 bucket it gives me the accurate results as required. I want to deploy it so that I can have an endpoint which I can further integrate with AWS Lambda Function and AWS API GateWay so that I can use the model with real time application. Any idea how can I deploy the model from AWS Sagemaker Notebook Instance and get its endpoint? Code inside the