I have a boto3 script ready to use. It is working fine when I specify a profile name from my .aws credentials file. But, I want to run the script in all the profiles which are present in my .aws credentials file. And, I have like more than 20 profiles. How do I automatically configure boto3 to keep fetching the profiles one by one and return the output ?
#Listing the validity of SSL certs in RDS
import boto3
from pprint import pprint
rds = boto3.client('rds')
sslcert = rds.describe_certificates()
for cert in sslcert['Certificates']:
print('Valid till', cert['ValidTill'])