

Also from Kynth Studios


Also from Kynth Studios


Also from Kynth Studios
1234567891011121314# AWS Elastic Beanstalk Deployment Best Practices1516Apply these production-tested patterns when working with Elastic Beanstalk deployments, especially with GitHub Actions and Pulumi infrastructure.1718## 🎯 Core Principles19201. **Always verify infrastructure health** before deploying212. **Never assume resources are ready** - implement retry logic223. **Handle terminated environments** gracefully with state cleanup234. **Use concurrency control** to prevent deployment conflicts245. **Pre-install dependencies** for faster, more reliable deploys256. **Implement comprehensive error handling** with fallbacks2627## 🏗️ Infrastructure Health Checks2829**ALWAYS check infrastructure status before deploying:**3031```yaml32- name: Check infrastructure status33 run: |34 echo "🔍 Checking infrastructure status..."3536 # Get environment name from Pulumi state (without deploying)37 EB_ENVIRONMENT_NAME=$(pulumi stack output ebEnvironmentName 2>/dev/null || echo "")3839 if [ -z "$EB_ENVIRONMENT_NAME" ]; then40 echo "🔍 No environment found in Pulumi state. Will deploy infrastructure..."41 else42 echo "🔍 Checking environment status: $EB_ENVIRONMENT_NAME"4344 # Check if environment exists and is healthy45 EB_ENV_STATUS=$(aws elasticbeanstalk describe-environments \46 --environment-names "$EB_ENVIRONMENT_NAME" \47 --query "Environments[0].Status" --output text 2>/dev/null || echo "NOT_FOUND")4849 if [ "$EB_ENV_STATUS" = "Terminated" ] || [ "$EB_ENV_STATUS" = "NOT_FOUND" ]; then50 echo "⚠️ Environment is $EB_ENV_STATUS. Deleting from Pulumi state..."5152 # Delete environment from Pulumi state53 EB_URN=$(pulumi stack --show-urns | awk '/aws:elasticbeanstalk\/environment:Environment/ {print $1; exit}')54 if [ -n "$EB_URN" ]; then55 echo "🔧 Deleting: $EB_URN"56 pulumi state delete "$EB_URN" --force57 fi5859 echo "🔄 Infrastructure will be recreated..."60 else61 echo "✅ Environment exists: $EB_ENV_STATUS"6263 # Check if infrastructure changes needed64 if pulumi preview --diff --expect-no-changes 2>/dev/null; then65 echo "✅ No infrastructure changes needed"66 else67 echo "🔄 Infrastructure changes detected"68 fi69 fi70 fi71```7273**Why**: Prevents deploying to orphaned resources, automatically recovers from terminated environments, saves money on zombie resources.7475## ⏳ Beanstalk Readiness Verification7677**ALWAYS wait for environment to be fully ready:**7879```yaml80- name: Verify Elastic Beanstalk environment exists81 run: |82 echo "🔍 Verifying Elastic Beanstalk environment..."83 EB_ENVIRONMENT_NAME="${{ steps.get-resources.outputs.eb_environment_name }}"8485 # Wait until environment exists86 echo "⏳ Waiting for environment to exist..."87 aws elasticbeanstalk wait environment-exists \88 --environment-names "$EB_ENVIRONMENT_NAME" || true8990 # Wait until environment is Ready (with 30 retries)91 for i in {1..30}; do92 ENV_STATUS=$(aws elasticbeanstalk describe-environments \93 --environment-names "$EB_ENVIRONMENT_NAME" \94 --query "Environments[0].Status" --output text 2>/dev/null || echo "NOT_FOUND")95 ENV_HEALTH=$(aws elasticbeanstalk describe-environments \96 --environment-names "$EB_ENVIRONMENT_NAME" \97 --query "Environments[0].Health" --output text 2>/dev/null || echo "UNKNOWN")9899 echo "⏳ EB Status: $ENV_STATUS, Health: $ENV_HEALTH (attempt $i/30)"100101 if [ "$ENV_STATUS" = "Ready" ]; then102 echo "✅ Environment is Ready"103 break104 fi105 sleep 20 # Wait 20 seconds between checks (10 minutes total)106 done107108 if [ "$ENV_STATUS" != "Ready" ]; then109 echo "⚠️ Environment not Ready after 10 minutes. Continuing with caution..."110 fi111```112113**Why**: Prevents timing-related failures, ensures environment is provisioned before app deployment, provides visibility into provisioning progress.114115## 🔒 HTTPS/SSL Configuration116117**CRITICAL: Classic Load Balancer vs Application Load Balancer**118119Elastic Beanstalk environments can use either Classic Load Balancer (CLB) or Application Load Balancer (ALB). The HTTPS listener configuration is **completely different** between them.120121### Checking Your Load Balancer Type122123```bash124# Check load balancer type125aws elasticbeanstalk describe-configuration-settings \126 --environment-name <env-name> \127 --application-name <app-name> \128 --query 'ConfigurationSettings[0].OptionSettings[?Namespace==`aws:elasticbeanstalk:environment`]' \129 --output json | grep LoadBalancerType130```131132**Outputs:**133- `"Value": "classic"` → Use Classic Load Balancer config134- `"Value": "application"` → Use Application Load Balancer config135136### Classic Load Balancer HTTPS Configuration137138**Use namespace: `aws:elb:listener:443`**139140```typescript141// Pulumi configuration for Classic Load Balancer142...(certificate && certValidationComplete143 ? [144 {145 namespace: "aws:elb:listener:443",146 name: "ListenerProtocol",147 value: "HTTPS",148 },149 {150 namespace: "aws:elb:listener:443",151 name: "InstancePort",152 value: "80",153 },154 {155 namespace: "aws:elb:listener:443",156 name: "InstanceProtocol",157 value: "HTTP",158 },159 {160 namespace: "aws:elb:listener:443",161 name: "SSLCertificateId",162 value: certValidationComplete.certificateArn,163 },164 {165 namespace: "aws:elb:listener:443",166 name: "ListenerEnabled",167 value: "true",168 },169 ]170 : [])171```172173### Application Load Balancer (ALBv2) HTTPS Configuration174175**Use namespace: `aws:elbv2:listener:443`**176177```typescript178// Pulumi configuration for Application Load Balancer179...(certificate && certValidationComplete180 ? [181 {182 namespace: "aws:elbv2:listener:443",183 name: "Protocol",184 value: "HTTPS",185 },186 {187 namespace: "aws:elbv2:listener:443",188 name: "SSLCertificateArns",189 value: certValidationComplete.certificateArn,190 },191 {192 namespace: "aws:elbv2:listener:443",193 name: "SSLPolicy",194 value: "ELBSecurityPolicy-TLS13-1-2-2021-06",195 },196 ]197 : [])198```199200### Common Symptoms of Misconfiguration201202**Problem:** `https://your-domain.com` times out or refuses connection, but `http://` works fine203204**Diagnosis:**205```bash206# 1. Check if HTTPS listener exists207aws elasticbeanstalk describe-configuration-settings \208 --environment-name <env-name> \209 --application-name <app-name> \210 --query 'ConfigurationSettings[0].OptionSettings[?contains(Namespace, `listener`)]'211212# 2. Check certificate status213aws acm list-certificates --region <region> \214 --query 'CertificateSummaryList[?contains(DomainName, `your-domain.com`)]'215216# 3. Verify DNS resolution217nslookup your-domain.com218219# 4. Test load balancer directly220curl -I http://<load-balancer-endpoint>/health221```222223**Root Cause:** Using `aws:elbv2:listener:443` config on a Classic Load Balancer (or vice versa)224225**Fix:** Update Pulumi infrastructure code with correct namespace based on load balancer type, then run:226```bash227cd infrastructure228pulumi up229```230231**Why**: Mixing Classic and ALBv2 configuration namespaces silently fails - the HTTPS listener is never created, leaving port 443 closed while the environment appears healthy.232233See full documentation for complete deployment patterns, Pulumi configuration, monitoring, and production checklist.
One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| pr-pm/prpm.cursor/rules/testing-patterns.mdc · 121 | Cursor rules | testlint-formatstyletesting-strategy | 77/100 | 14 days ago | |
| pr-pm/prpm.cursor/rules/core-principles.mdc · 121 | Cursor rules | testlint-formatstylearch+6 | 69/100 | 14 days ago | |
| pr-pm/prpm.cursor/rules/creating-agents-md.mdc · 121 | Cursor rules | testlint-formatstylearch+7 | 92/100 | 14 days ago | |
| pr-pm/prpm.cursor/rules/creating-cursor-rules.mdc · 121 | Cursor rules | testlint-formatstylearch+5 | 76/100 | 14 days ago | |
| pr-pm/prpm.cursor/rules/creating-skills.mdc · 121 | Cursor rules | stylearchtesting-strategydo-not+1 | 61/100 | 14 days ago | |
| pr-pm/prpm.cursor/rules/github-actions-testing.mdc · 121 | Cursor rules | setupbuildstylearch+4 | 93/100 | 14 days ago | |
| pr-pm/prpm.cursor/rules/karen-repo-reviewer.mdc · 121 | Cursor rules | archgit | 58/100 | 14 days ago | |
| pr-pm/prpm.cursor/rules/prpm-json-best-practices.mdc · 121 | Cursor rules | setuplint-formatstylearch+5 | 73/100 | 14 days ago | |
| pr-pm/prpm.cursor/rules/self-improve-cursor.mdc · 121 | Cursor rules | setuptestarchdependencies+3 | 69/100 | 14 days ago | |
| pr-pm/prpm.cursor/rules/typescript-type-safety.mdc · 121 | Cursor rules | buildstylearchtypes+2 | 89/100 | 14 days ago | |
| pr-pm/prpm.cursor/rules/typescript-type-specialist.mdc · 121 | Cursor rules | styletypesdo-notagent-behaviour | 65/100 | 14 days ago | |
| pr-pm/prpmAGENTS.md · 121 | AGENTS.md | setupbuildtestlint-format+12 | 84/100 | 14 days ago | |
| pr-pm/prpmCLAUDE.md · 121 | CLAUDE.md | teststylegitapi+2 | 69/100 | 14 days ago | |
| pr-pm/prpm.cursor/rules/creating-kiro-agents.mdc · 121 | Cursor rules | setupbuildteststyle+5 | 76/100 | 14 days ago | |
| pr-pm/prpm.cursor/rules/format-conversion.mdc · 121 | Cursor rules | testlint-formatstyledo-not+1 | 63/100 | 14 days ago |
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| hiromaily/go-crypto-wallet.cursor/rules/typescript.mdc · 126 | Cursor rules | setupbuildtestlint-format+6 | 100/100 | 14 days ago | |
| TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 46 | Cursor rules | testlint-formatstylearch+5 | 100/100 | 14 days ago | |
| dodgecfr/combatfilms-webapp.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 14 days ago | |
| deifos/clipmira-subtitles.cursor/rules/frontend.mdc · 1 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 14 days ago | |
| markstev/mark-starter.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+6 | 99/100 | 14 days ago | |
| Allymahmoud/case-intake-platform.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 14 days ago | |
| langflow-ai/langflow.cursor/rules/docs_development.mdc · 153k | Cursor rules | setupbuildtestlint-format+7 | 97/100 | 14 days ago | |
| bybren-llc/safe-agentic-workflow.cursor/rules/10-backend-python.mdc · 399 | Cursor rules | testlint-formatstylegit+4 | 97/100 | today |
A badge carrying the measured quality of the strongest agent config file in this repository, out of 100. It reads from this index every time somebody loads your page, so it changes when the measurement changes and there is nothing to keep up to date. Free, no account, and the value is not something you or we can set by hand.
[](https://rulestack.kynth.studio/configs/pr-pm-prpm-cursor-rules-beanstalk-deploy)Would rather not hotlink us? Every badge is also served in shields.io’s endpoint schema, so shields renders the image and your readers never talk to our domain:
Published by Toolproof, the masthead over this index and eight others. The method behind the number is at toolproof.kynth.studio/methodology, and the whole thing is readable as JSON with no key at /api.