cancel
Showing results for 
Search instead for 
Did you mean: 
Databricks Free Trial Help
Engage in discussions about the Databricks Free Trial within the Databricks Community. Share insights, tips, and best practices for getting started, troubleshooting issues, and maximizing the value of your trial experience to explore Databricks' capabilities effectively.
cancel
Showing results for 
Search instead for 
Did you mean: 

set up my AWS credentials and configure boto3, but I’m facing an issue

nima30frenkline
New Contributor

Hi everyone,

I’m working on a project where I need to upload files from my local machine to an AWS S3 bucket using the boto3 library in Python. I’ve followed the official documentation to set up my AWS credentials and configure boto3, but I’m facing an issue when trying to upload a file.

I am using : 

import boto3

s3 = boto3.client('s3')

bucket_name = 'my-bucket'
file_path = 'path/to/my/file.txt'
s3.upload_file(file_path, bucket_name, 'file.txt')

I’m encountering the following error:

botocore.exceptions.NoCredentialsError: Unable to locate credentials.

I’ve already set up my AWS Access Key ID and Secret Access Key in the ~/.aws/credentials file, but I’m still getting the same error message.

Has anyone encountered this issue before, or does anyone have suggestions on how to resolve it?

Thanks in advance!

Nima

0 REPLIES 0

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group