2
votes

I got a bit lost in the boto3 API details and struggle to find an example to access an S3 bucket using python. I need to use an existing pem file rather than the typical access and secret key. Works fine using an ftp client but I need to get it running also with python.

Anyone that can point me in the right direction (or suggest alternatives using python)

2

2 Answers

3
votes

This is not possible.

The types of authentication used on AWS are:

  • Username and password associated with an IAM User, used to login to the web management console.
  • Access Key and Secret Key associated with an IAM User, used to make API calls to AWS services
  • Private Key (PPK/PEM) used to login to Linux instances.

Private Keys are used to login to an operating system and are unrelated to AWS. They are a standard means of accessing Linux systems and identify users defined on the computer itself rather than on AWS.

API calls to AWS require the Access Key and Secret Key and have no relationship to PPK/PEM keys.

0
votes

For anyone stumbled on this question in 2020, please see my detailed article on connecting with boto3 and Python to aws, that has an S3 example in it: https://hocli.com/tech/getting-started-with-python-and-boto