Cloud Infrastructure and Environment Configuration
Adobe Commerce Cloud uses a git-driven, read-only filesystem model. Know the environment hierarchy: integration, staging, and production, with branches mapping to environments. The .magento.app.yaml file defines the application (PHP version, relationships to services, hooks, cron, and workers), while .magento/services.yaml defines backing services (MySQL, Redis, Elasticsearch/OpenSearch, RabbitMQ). .magento.env.yaml holds build and deploy variables and environment-specific configuration.
Traps: assuming you can write to the filesystem at runtime (you cannot in staging/production; use the writable mounts declared in mounts), confusing build hooks with deploy hooks, and forgetting that services are referenced by relationship name, not host. Also know the magento-cloud CLI, environment variables for sensitive values, and that production has a three-node architecture with separate database, Redis, and search.
Worked example
Requirement: "Add RabbitMQ for async order export on Cloud." Add a rabbitmq service entry in .magento/services.yaml, declare a relationship in .magento.app.yaml under relationships, and configure the queue connection in app/etc/env.php (or via environment variables) using the relationship's credentials. Commit both files and push; the build provisions the service and the deploy hook applies configuration. Do not hardcode host and port; read them from the relationship.
Rule of thumb: infrastructure is code in YAML, credentials come from relationships or environment variables, and the runtime filesystem is read-only except declared mounts.