Skip to content

Instantly share code, notes, and snippets.

@ohaval
Created June 11, 2023 15:00
Show Gist options
  • Save ohaval/4595b8964c8e38ccc6228756b467c19c to your computer and use it in GitHub Desktop.
Save ohaval/4595b8964c8e38ccc6228756b467c19c to your computer and use it in GitHub Desktop.
Use classic AWS keys with boto3
import boto3
session = boto3.Session(
region_name='us-east-1',
aws_access_key_id=AWS_ACCESS_KEY_ID,
aws_secret_access_key=AWS_SECRET_ACCESS_KEY,
)
session.client('s3').list_buckets()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment