How to Connect Power BI to S3 Bucket

Cody Schneider9 min read

Bringing your data from an Amazon S3 bucket into Power BI is a great way to build powerful, scalable dashboards for your business. Because S3 is often used as a central data lake for everything from application logs to marketing analytics data, tapping into it can unlock a world of insights. This article walks you through the best methods to connect the two, from a quick and simple approach to a more robust, enterprise-ready solution.

Why Connect Power BI to Your S3 Bucket?

Modern businesses generate data from dozens of sources, and storing it all can get complicated and expensive. Amazon S3 offers a highly scalable, flexible, and affordable solution for storing massive datasets. You might be using it to:

  • Store raw event data from your website or mobile app.
  • Aggregate advertising performance data from multiple platforms.
  • Back up transactional data from your e-commerce store.
  • Act as a data lake for a future data science or machine learning project.

While S3 is fantastic for storage, it’s not a database. You can’t just point a BI tool at it and start building charts without an intermediary step. By connecting S3 to Power BI, you turn that raw, stored data into an active asset for creating interactive reports, tracking KPIs, and making an "impact measurement strategy" a reality.

Prerequisites: Getting Your Ducks in a Row

Before you get started, make sure you have the following ready. This will make the process much smoother.

  • Power BI Desktop: This one is a given, but ensure you have the latest version installed on your machine.
  • An AWS Account: You’ll need access to your company’s AWS account with permissions to interact with S3 and potentially other services like AWS Glue and Athena.
  • An S3 Bucket with Data: Your data should already be in S3, preferably in a common format like CSV, JSON, or Parquet. For this guide, we'll assume you have CSV files.
  • AWS Credentials: You need an Access Key ID and a Secret Access Key. Important security note: never use your root AWS account credentials. Always create a dedicated IAM (Identity and Access Management) user with limited, read-only permissions for the specific S3 buckets you need to access. This minimizes security risks.

The Challenge: Power BI Doesn't Natively 'Speak' S3

If you've looked through Power BI's long list of data connectors, you might have noticed a glaring omission: a direct connector for Amazon S3. This is because Power BI is designed to connect to structured sources - databases, APIs, Excel files - where the data schema is well-defined. Amazon S3, on the other hand, is an object storage service. Think of it like a massive digital filing cabinet where you can store any type of file.

Power BI doesn't know how to interpret the structure of the files sitting in your bucket on its own. To bridge this gap, you need a service that can sit between S3 and Power BI, translating your stored files into a queryable, structured format. That's where our recommended method comes in.

Method 1: Using Amazon Athena for a Powerful, Scalable Connection

For any serious, ongoing reporting needs, connecting through Amazon Athena is the most robust and recommended approach. Athena is a serverless, interactive query service that makes it easy to analyze data in S3 using standard SQL. You essentially turn your collection of files into a virtual database without needing to set up any new infrastructure.

This method involves three main parts: cataloging your data with AWS Glue, installing a driver to talk to Athena, and finally, connecting Power BI.

Step 1: Set Up AWS Glue to Catalog Your S3 Data

First, you need to tell Athena what your data looks like. The easiest way to do this is with an AWS Glue crawler. The crawler scans your data in S3, automatically infers the data types and schema (e.g., columns, text vs. numbers), and creates a metadata table in the AWS Glue Data Catalog. Athena then uses this catalog to run its queries.

  1. Navigate to the AWS Glue service in your AWS console.
  2. In the left-hand menu, under "Data Catalog," click on Crawlers.
  3. Click Create crawler.
  4. Give your crawler a descriptive name, like sales_data_crawler.
  5. For the data source, specify the S3 path where your files are located (e.g., s3://your-bucket/sales-data/).
  6. Next, either choose an existing IAM role or let Glue create one for you. This role gives the crawler permission to access your S3 bucket.
  7. Choose a database where the metadata table will be created. If you don't have one, just click Add database and create a new one.
  8. Review the settings and click Create crawler. Once created, select your crawler from the list and hit Run.

After a few minutes, the crawler will finish its run. If successful, you can go to the Tables section in AWS Glue (or inside the Athena query editor) and see your new table. You can now query your S3 files using standard SQL in Athena!

Step 2: Install the Athena ODBC Driver

For Power BI to communicate with Athena, it needs a special translator called a driver. You’ll need to download and install the official Amazon Athena ODBC driver on the computer where you have Power BI Desktop.

  1. You can find the driver on the official AWS documentation for ODBC connections.
  2. Download the version that matches your Power BI installation (usually 64-bit).
  3. Run the installer and follow the setup wizard. During installation, you'll be prompted to configure a DSN (Data Source Name), where you'll input your AWS region, S3 output location, and credentials.

Step 3: Connect Power BI to Athena

Now that all the prep work is done, connecting from Power BI is straightforward.

  1. Open Power BI Desktop.
  2. Click Get Data from the Home ribbon and select More...
  3. In the search box, type "ODBC" and select it, then click Connect.
  4. From the Data Source Name (DSN) dropdown, select the Athena DSN you configured when you installed the driver.
  5. If prompted, enter the AWS Access Key ID and Secret Access Key for the IAM user you prepared earlier.
  6. The Navigator window will open, showing you the databases available in your Athena catalog. Expand the right one, and you should see the table created by your Glue crawler.
  7. Select the table, and you'll see a preview of your data. Click Load to import it into your Power BI model or Transform Data to open the Power Query Editor for further cleaning and shaping.

That's it! Your Power BI report is now connected to your S3 data through Athena. You can refresh the data in Power BI, and it will run new queries against Athena, which in turn queries the latest files in your S3 bucket.

Method 2: Connecting to Individual Public Files in S3

If you just need a very quick, one-time analysis of a single, non-sensitive file, you can make the file public and connect to it using Power BI's built-in web connector.

Warning: This method exposes your file to the public internet. Only use this for data you are completely comfortable sharing publicly, such as open-source datasets. Do not use this for any customer data, financial information, or proprietary business data.

Step 1: Make Your S3 Object Publicly Accessible

  1. In the AWS S3 console, navigate to the file you want to use.
  2. Select the file, click the Actions menu, and choose Make public using ACL.
  3. Confirm the security warnings to proceed.
  4. Note: This will only work if your bucket settings do not have "Block all public access" enabled. You may need to edit your bucket permissions to allow this, which carries its own significant security implications.

Step 2: Get the Object URL

Once the file is public, select it again, and you will see its Object URL in the properties panel. Copy this URL. It will look like: https://your-bucket-name.s3.your-region.amazonaws.com/your-file.csv

Step 3: Connect Power BI Using a Web Connector.

  1. In Power BI Desktop, click Get Data and select Web.
  2. Paste the Object URL you copied from S3 and click OK.
  3. Power BI will analyze the file and open the Power Query Editor, just as if you were loading a local CSV. You can then transform and load the data as needed.

Bonus Method: Using Python Scripts

For more advanced users comfortable with scripting, Power BI's built-in Python integration offers a highly flexible way to connect to S3 without using Athena or making files public. This gives you complete control over the data retrieval process.

For this to work, you need Python and the pandas and boto3 libraries installed on your machine. Boto3 is the AWS SDK for Python.

In Power BI, go to Get Data -> More -> Python Script, and you can run a script like this:

import pandas as pd
import boto3
from io import StringIO

# --- Configuration ---
# It's best practice to use environment variables or a config file for credentials
aws_access_key_id = 'YOUR_ACCESS_KEY'
aws_secret_access_key = 'YOUR_SECRET_KEY'
bucket_name = 'your-bucket-name'
object_key = 'path/to/your/file.csv'
# --- End Configuration ---

s3_client = boto3.client(
    's3',
    aws_access_key_id=aws_access_key_id,
    aws_secret_access_key=aws_secret_access_key
)

# Get the object from S3
csv_obj = s3_client.get_object(Bucket=bucket_name, Key=object_key)
body = csv_obj['Body']
csv_string = body.read().decode('utf-8')

# Read into a pandas DataFrame
df = pd.read_csv(StringIO(csv_string))

## The 'df' DataFrame is now available to Power BI for loading.

After you run the script, Power BI's Navigator will show the pandas DataFrame (df) as a table that you can select and load.

Final Thoughts

Connecting Power BI to your S3 bucket unlocks the analytical potential of your data lake, allowing you to build rich, insightful dashboards from raw data sources. For secure, scalable, and ongoing analysis, leveraging the power of Amazon Athena and AWS Glue is the definitive best practice. For quick, ad-hoc needs on non-sensitive data, a direct web connection provides a fast shortcut.

While these methods are powerful for those using the Microsoft ecosystem, we know setting up drivers, managing secure access with IAM, and writing Python scripts can be a time-consuming process. We built Graphed because we believe getting insights shouldn't require an IT project. For marketing and sales teams, we offer dozens of one-click integrations with your most important platforms, allowing you to ask questions in plain English and get real-time dashboards in seconds, not hours.

Related Articles

How to Connect Facebook to Google Data Studio: The Complete Guide for 2026

Connecting Facebook Ads to Google Data Studio (now called Looker Studio) has become essential for digital marketers who want to create comprehensive, visually appealing reports that go beyond the basic analytics provided by Facebook's native Ads Manager. If you're struggling with fragmented reporting across multiple platforms or spending too much time manually exporting data, this guide will show you exactly how to streamline your Facebook advertising analytics.

Appsflyer vs Mixpanel​: Complete 2026 Comparison Guide

The difference between AppsFlyer and Mixpanel isn't just about features—it's about understanding two fundamentally different approaches to data that can make or break your growth strategy. One tracks how users find you, the other reveals what they do once they arrive. Most companies need insights from both worlds, but knowing where to start can save you months of implementation headaches and thousands in wasted budget.