“Is there a more efficient way to connect to the database”
It then went off the rails. It gave me generic answers about using connection pooling that your language framework provides.
Of course that doesn’t help with each Lambda being invoked separately.
I then asked “But each Lambda runs based on its own vm”
It then correctly said that while each Lambda invocation would have its own pool and couldn’t be shared, it could be shared with multiple connections during one invocation.
Which is technically correct. But not the answer I was looking for.
In all fairness, it’s the same type of answers I would expect from a junior to mid developer with limited experience with AWS. I would hire a person who could answer that well.
- What are the considerations?
- Implement it with the considerations
- Did we forget anything?
It understands the need for a proxy from step 1:
https://chat.openai.com/share/7ca37130-a771-457c-8742-a5f941...
It still missed using a paginator to handle the list_roles call returning more than 50 roles.
Once I pointed it out, it did add pagination support.
I'd be surprised if even after the last prompt it wouldn't notice that. Saying "Did we miss anything" leaves it open it to re-evaluate both the implementation and the original considerations
Edit: There's some non-determinism involved, but GPT-4 caught the pagination from planning stage here: https://chat.openai.com/share/3c356d4f-15d4-4f6e-bd29-af6a0b...
https://aws.amazon.com/about-aws/whats-new/2020/06/amazon-rd...