Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
I'm trying to import data from AWS S3 bucket into power bi using python script. the script works in Power BI desktop, but I encounter data refresh failures after publishing it to PB service.
error message:
"error":{"code":"DM_GWPipeline_Gateway_MashupDataAccessError","pbi.error":{"code":"DM_GWPipeline_Gateway_MashupDataAccessError","parameters":{},"details":[{"code":"DM_ErrorDetailNameCode_UnderlyingErrorCode","detail":{"type":1,"value":"-2147467259"}},{"code":"DM_ErrorDetailNameCode_UnderlyingErrorMessage","detail":{"type":1,"value":"ADO.NET: Python script error.\r\nModuleNotFoundError: No module named 'boto3'\r\n</pi>"}}
my python script set up in PB Options and Settings
Based on Python setup in Power BI, I have manually saved the boto3 package in C:\Python311\Lib\site-packages, below is the python script I used to import AWS bucket3 data.
*****************
import pandas as pd
import io
import os
import boto3
....
***************
But the error message seems to suggest it couldn't import boto3. Where should the boto3 package to stored?
Solved! Go to Solution.
Raised a support ticket to Microsoft and heard back that boto3 package is not supported in Power BI. Below is MS response:
I checked your issue with my internal team and got to know that as the boto 3 python package is not listed in the support packages for power BI as per this document (Learn which Python packages are supported - Power BI | Microsoft Learn). For python scripts used in power BI you can install and use the boto 3 in power BI desktop.
 
					
				
		
Hi @Jeanxyz ,
You can do this by running the following command in your terminal or command prompt:
pip install boto3This command will help you to install boto3 directly before trying to import boto3
Best Regards,
Xianda Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I have done that already. The installation is successful, but data refreshing still showing the same error.
Hi @Jeanxyz ,
If you still report the same error, you can try reading this article:
How To Solve ModuleNotFoundError: No module named in Python (pytutorial.com)
Best Regards,
Xianda Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Raised a support ticket to Microsoft and heard back that boto3 package is not supported in Power BI. Below is MS response:
I checked your issue with my internal team and got to know that as the boto 3 python package is not listed in the support packages for power BI as per this document (Learn which Python packages are supported - Power BI | Microsoft Learn). For python scripts used in power BI you can install and use the boto 3 in power BI desktop.
 
					
				
				
			
		
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
 
            | User | Count | 
|---|---|
| 84 | |
| 49 | |
| 35 | |
| 31 | |
| 30 |