Depending on the day of the week, I might be doing a standard enterprisey dev project or I might be doing a “DevOps” project automating some things around AWS (where I work in ProServe) using the AWS SDK.
Before ChatGPT, I would spend a lot of time searching on Google for the right API call and the response structure:
Problem: I need a simple Python script that list roles in an AWS account that has at least one of a list of command line specified policies.
Before ChatGPT: I would look up the api call to list the roles (the API service area of AWS is huge), then look up the API call to list the policies for the role and then look up the API call for the “paginator” that pages through all of the results since the API call only returns 50 results at a time.
After ChatGPT:
“Write a Python script that allows me to specify a list of AWS IAM roles that contain at least one of a given list of policies”.
I get “working” code and then I start polishing it.
“Use argparse with required parameters and use a paginator to iterate through the roles”
Again expected results.
“I need the list of ARNs printed out as a comma separated list”.
I copy the code into VSCode, test it, and I’m done.
Later on for another project, the customer prefers JavaScript. I copy the code into ChatGPT, and tell it to convert it into JavaScript. It works perfectly and is idiomatic JS along with proper async/await handling