Skip to content
TheChatArchiveThe Chat Archive
gpt-4.1-2025-04-14· OpenAIHugging Face LMArena Human Preference 140K

looking for a prompt for me to write code for aws cdk for creating infrastructure

From a Chatbot Arena battleThe same person sent this prompt to two anonymous models at once. Compare it with Metallama-3.3-70b-instruct’s answer.
  1. User

    looking for a prompt for me to write code for aws cdk for creating infrastructure

  2. Assistant

    Absolutely! Here’s a prompt you can use to guide your code writing for AWS CDK infrastructure:


    Prompt:

    Write an AWS CDK (Cloud Development Kit) script in TypeScript (or Python, if you prefer) that creates the following infrastructure:

    1. A VPC with public and private subnets across two Availability Zones.
    2. An EC2 instance in one of the public subnets, with SSH access restricted to a specific IP address.
    3. An RDS (PostgreSQL) instance in one of the private subnets, with security group rules allowing access only from the EC2 instance.
    4. An S3 bucket with versioning enabled and public access blocked.
    5. Output the public IP address of the EC2 instance and the endpoint of the RDS instance.

    Use best practices for security and resource naming. Add comments explaining each major section.


    You can adjust the resources or language as needed! If you want a more specific or different setup, let me know.

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.