+44 (0)115 933 8474

Prod.keys Switch Instant

Maya updated the vault with the new toy brand’s key. Then she ran the deployment script:

deploy --service=wishlist --prod-keys-switch=false The switch flipped to OFF . The app instantly fell back to using dev_sk_test_123 —the fake key. The AI calls failed gracefully, and Wishlist displayed a polite message: "Gift ideas temporarily unavailable. Shop our curated collections!"

Maya checked the metrics. The new AI provider was slower—much slower. Worse, it charged per call. With holiday traffic, costs would explode. prod.keys switch

For ten minutes, everything worked. Then the on-call phone buzzed.

This was exactly why the existed separately from the code rollback. Maya updated the vault with the new toy brand’s key

deploy --service=wishlist --prod-keys-switch=true The prod.keys switch flipped to ON .

"Wishlist is timing out," said Jordan, the product manager. "Users see spinning ghosts instead of gift ideas." The AI calls failed gracefully, and Wishlist displayed

{ "environment": "dev", "api_keys": { "ai_provider": "dev_sk_test_123", "payment_gateway": "dev_pk_test_456" } } She knew the routine. Never, ever commit prod keys to code. Instead, the system used a —an environment variable called PROD_KEYS_ENABLED . When set to false , the app used dev keys. When set to true , it reached into a locked, encrypted vault and loaded the real production keys.

Share This