Best Practices for AI Prompts
Kyrna’s AI understands natural language, but the more specific you are, the better results you’ll get.Basic Prompt Structure
Good Prompts Include:
- Resource type (EC2, RDS, S3, etc.)
- Configuration details (instance type, storage size)
- Purpose (what it’s for)
- Constraints (budget, region, security requirements)
Examples
❌ Bad Prompt
✅ Good Prompt
⭐ Excellent Prompt
Prompt Patterns
1. Simple Resource Creation
2. Multi-Resource Setup
3. Modification Requests
4. Security-Focused
Tips by Resource Type
EC2 Instances
Include:- Instance type (
t3.micro,m5.large) - AMI or OS (
Amazon Linux 2,Ubuntu 22.04) - Networking (
public IP,private subnet) - Storage (
20GB gp3 volume) - Security groups (which ports to allow)
RDS Databases
Include:- Engine and version (
PostgreSQL 15,MySQL 8.0) - Instance class (
db.t3.micro,db.r6g.large) - Storage size (
20GB,100GB) - Multi-AZ or read replicas
- Backup retention
S3 Buckets
Include:- Versioning (
enabled,disabled) - Encryption (
AES-256,KMS) - Public access (usually
blocked) - Lifecycle policies
- CORS if needed
VPC & Networking
Include:- CIDR block (
10.0.0.0/16) - Number of subnets
- Public vs private subnets
- NAT gateway needs
- Route tables
Advanced Techniques
Iterative Refinement
Start broad, then refine:Cost-Conscious Prompts
Region-Specific
Common Mistakes to Avoid
1. Being Too Vague
❌ “Create a database” ✅ “Create a PostgreSQL 15 RDS instance (db.t3.micro) with 20GB storage”2. Missing Security Requirements
❌ “Create an EC2 instance” ✅ “Create an EC2 instance with security group allowing only SSH from my IP”3. No Resource Sizing
❌ “Create a server” ✅ “Create a t3.medium EC2 instance”4. Forgetting Networking
❌ “Create a web server” ✅ “Create a web server in public subnet with public IP”5. Ignoring Costs
❌ “Create a powerful database” ✅ “Create a db.t3.micro PostgreSQL instance for development”Using Context
Kyrna understands context from previous prompts in the conversation:Testing Your Prompts
Start Simple
- Try basic prompts first
- Review the generated code
- Add more details if needed
Check the Output
- Does it match your intent?
- Are security groups configured properly?
- Are costs reasonable?
- Are resources in correct subnets/regions?
Refine
- Ask for modifications: “Change the instance type to t3.small”
- Add features: “Add monitoring with CloudWatch alarms”
- Fix issues: “Make the S3 bucket private”
Quick Reference
| Goal | Prompt Template |
|---|---|
| Simple resource | Create a [TYPE] [RESOURCE] with [KEY_FEATURE] |
| Complex setup | Create a [ARCHITECTURE] with: - [RESOURCE_1] - [RESOURCE_2] |
| Modify existing | Add [FEATURE] to the [RESOURCE] |
| Security | Create a secure [RESOURCE] with [SECURITY_FEATURES] |
| Cost-optimized | Create a cost-effective [RESOURCE] using [SMALL_SIZE] |
