Skip to main content

Power BI

Needs Votes

Allow connection to AWS S3

Vote (135) Share
Wesley Backelant's profile image

Wesley Backelant on 24 Apr 2015 20:45:13

Since more and more customers are probably going to have hybrid environments with on-premises, Azure and AWS combined I think S3 connectivity would make sense too

Comments (4)
Wesley Backelant's profile image Profile Picture

879170cf 37b0-4ed5-8d61-1f127f0fe7b2 on 05 Jul 2020 23:22:42

RE: Allow connection to AWS S3

ZappySys has ODBC Driver for XML/JSON API which can be used to pull data directly from AWS S3 or other AWS API (e.g. Athena, EC2, Billing API). See below Post

https://zappysys.com/blog/read-amazon-s3-data-power-bi-aws-json-xml-api/

Wesley Backelant's profile image Profile Picture

c4b38101 c861-480e-b50f-4f81c5130913 on 05 Jul 2020 23:22:17

RE: Allow connection to AWS S3

https://aws.amazon.com/about-aws/whats-new/2017/11/amazon-athena-adds-support-for-querying-data-using-an-odbc-driver/?nc1=h_ls

Wesley Backelant's profile image Profile Picture

50ba9c4c 35ea-4552-aaf5-127913f86233 on 05 Jul 2020 23:09:34

RE: Allow connection to AWS S3

This is do-able today with AWS API Gateway and a Lambda function.

1. Create a new Lambda Function ... it can be empty for now
2. Set up a new API in API Gateway
3. Create a new GET method
3.1 Select Lambda Function for the integration type
3.2 Select the Use Lambda Proxy integration option
3.3 Select the region and type in the name of the lambda function you created in step 1
4. Edit your lambda function.
4.1 Using the AWS SDK, generate a url w/ pre-signed key for your file
4.2 Return a 303 redirect to the url from step 4.1

Here is a sample of a lambda function in python 2.7:

bucket = 'bucket-name'
key = 'path-to-file'

client = boto3.client('s3')
link = client.generate_presigned_url(
'get_object',
{'Bucket': bucket, 'Key': path},
7200, 'GET')

return {
"statusCode": 303,
"headers": {'Location': link}
}

Wesley Backelant's profile image Profile Picture

a68c9743 027c-491e-89ab-a9b8839eaa8b on 05 Jul 2020 22:38:46

RE: Allow connection to AWS S3

We need this desperately at our client right now.