Flipped Interaction
On this page
We make the AI ask us questions and we answer them. Here is the template:
Template
I would like you to ask me questions to achieve X. You should ask questions until we achieve this goal, where X is the goal we’d like to achieve.
I find this useful for filling in the gaps in the process of getting to your goal. It makes sense to use this when you have already played with the tools and got your hands dirty by building some quick throw away prototypes.
Prompt
I would like you to ask me questions to achieve creating a custom image from a base image in AWS. You should ask questions until we achieve this goal, where creating a custom AMI is the goal we’d like to achieve. The response should be at a high level tasks without going into implementation details.
Iterating on the Response
The response sometimes contains assumptions that are not true. Since I already had explored different approaches, I was able to guide the process along the direction I knew is the best option for my use case. I had already made the design decisions based on my learning and experimentation.
High Level Tasks
- Select the base image: Ubuntu 22.04
- Create an IAM user with EC2, S3 and Secrets Manager access
- Download AWS credentials
- Configure boto3 with AWS credentials
- Verify boto3 configuration
- Create a key pair
- Launch an EC2 instance using the base Ubuntu 22.04 AMI
- Wait for the EC2 instance to be ready
- Run the Ansible master playbook on the EC2 instance
- Create the custom AMI from the EC2 instance using boto3
- Make the custom AMI public to share with anyone
- Copy the custom AMI to all regions
- Terminate the temporary EC2 instance used for customization
These tasks are ordered in the right sequence and provides a clear path to getting to the goal. Some of these tasks might have several subtasks. At this stage, I am only interested in capturing the entire process at a high level. The sequence is important not the low level details like region, instance size etc.