I have just started myself with AWS cloud automations and have been using python boto3 for automations. I find boto3 is convenient for me becoz im not good with using AWS CLI commands using inside shell script for automations. My question is for AWS cloud automation, is boto3 superior to AWS CLI commands ? or whats is the advantage that python boto3 i having over AWS CLI commands or vice versa ?
If you can use boto3, then that is the far-superior choice. It gives you much more ability to supplement the AWS API calls with additional logic, such as filtering results with. It is also easier to chain API calls, such as making one call for a list of resources, then making follow-up calls to describe each resources in detail.
The AWS CLI is very convenient for one-off commands or simple automation, but things get tricky when using --filter and --query commands.
Advantage of AWS SDK boto3 over AWS CLI commands