AEMaaCS Environments: RDE vs Dev, Stage and Production
Every AEM as a Cloud Service program has the same set of environments, but each one answers a different question. Is my change wired correctly? Does it behave on a stage-sized system? Is it safe to send to live traffic? Knowing which environment answers which question saves hours of waiting and avoids surprises that show up only after a production deployment.
In this lesson you will learn what development, stage, production and Rapid Development Environments (RDEs) are for, how an RDE fits into a day of feature work, and how to manage environment variables and secrets so the same build behaves correctly everywhere. The examples use a project called mysite, the package com.mysite.core, program 12345, the development environment 67890 and the RDE 67893.
Most environment problems I see in code reviews come from three habits: a stage URL hardcoded in a bundle, a password stored in an OSGi .cfg.json file in Git, and performance tests run on a development environment. The sections below show how to avoid each one.

Table of contents
- Why this matters
- Who should read this
- Prerequisites
- Environment types and what they are for
- What an RDE is for
- Environment variables, secrets and pipeline variables
- Hands-on: an RDE workflow step by step
- Promoting code from RDE to production
- Common mistakes and troubleshooting
- Hands-on challenge
- Key takeaways
- Knowledge check
- Frequently asked questions
- Continue your learning
Why this matters
Environments are where your configuration meets reality. An OSGi configuration that works on your laptop can fail on stage because an upstream API host differs. Cloud Manager gives you a fixed set of environment types and one supported way to move code between them. Knowing which one to use saves hours.
✅ Test a change in minutes on an RDE instead of waiting for a full pipeline run.
✅ Keep endpoints and credentials out of Git and out of your bundles.
✅ Deploy the same build artifact to stage and production, so what you tested is what ships.
✅ Find performance problems on a stage-sized environment, not on a development one.
Who should read this
This lesson is for developers who deploy to AEM as a Cloud Service, technical leads who decide how the team promotes code, and anyone who has been told to “just add the variable in Cloud Manager” without being shown where it is read.
Prerequisites
- Working knowledge of Maven and the AEM project structure. Read the best practices for OSGi configs and environment variables first, because this lesson builds on it.
- A Cloud Manager user with the Developer product profile. The RDE CLI setup depends on it.
- Node.js 20 and the Adobe I/O CLI (
aio) installed on your machine. - Basic familiarity with run modes, because the OSGi examples use
config.author.dev.
Environment types and what they are for
Cloud Manager environments come in the types below. Two rules shape most decisions. Production and stage are always created as a pair, so you cannot have a stage-only or production-only environment. Development environments are used only with non-production pipelines.
| Environment | Purpose | How code gets there | Sizing and testing |
|---|---|---|---|
| Production (paired with stage) | Serves live traffic | Production pipeline. Code goes to stage first, then to production after approval. | Stage is sized like production. Run performance and security tests on stage. |
| Stage | Pre-production testing and UAT | Production pipeline | Sized like production. This is where performance and security tests belong. |
| Development | Integration testing of feature branches | Non-production pipelines (code quality only, or deployment to dev) | Smaller than stage and production. Do not run performance or security tests here. |
| Rapid Development Environment (RDE) | Fast iteration on code you have already validated locally | aio CLI sync from your machine. No pipeline and no quality gates. | Single developer. Not for load tests or large content sets. |
Pipelines are the only supported way to deploy code to development, stage and production. The RDE is the exception, because you push to it from your machine. Code on an RDE has not passed the Cloud Manager quality gates. Use the RDE to learn, debug and iterate, and finish every change with a pipeline run.
Roles matter as well. Adding or editing an environment needs the Business Owner role. Adding, updating and deleting environment variables needs Deployment Manager. Resetting an RDE needs the Cloud Manager Developer role. If a button is missing in the UI, check your role before you check the product.
Each environment gets its own service URLs, built from the program and environment IDs. Use them in bookmarks and scripts, and read them from the environment page in Cloud Manager rather than guessing:
https://author-p12345-e67890.adobeaemcloud.com # author
https://publish-p12345-e67890.adobeaemcloud.com # publish
https://preview-p12345-e67890.adobeaemcloud.com # preview
The environment ID in the URL is the same ID that the aio CLI and the Developer Console use, so one number identifies the environment everywhere.
What an RDE is for
An RDE is a single-developer environment with its own author and publish tiers. You sync code, content, OSGi configuration and Dispatcher configuration to it from your machine with the aio CLI. It is for fast iteration, so test on stage before you ship.
The RDE covers the loop between a local SDK run and a pipeline run. You validate a feature locally, push it to the RDE, debug against a real author and publish, and only then commit to a feature branch for a pipeline run. Reset the RDE between features rather than mixing them, because a reset removes all custom code and content.
Snapshots save the code and content state of one RDE so you can restore it later. Each RDE can hold up to seven snapshots, and deleted snapshots are retained for seven days. Snapshots are a fast way to try a risky change and roll back, without rebuilding the environment from scratch. A snapshot belongs to one RDE and cannot be restored on another. List the snapshots with aio aem rde snapshot, and check the other commands with aio aem rde snapshot --help.
Environment variables, secrets and pipeline variables
Environment variables let one build behave differently per environment without a code change. Each variable has a name, a value, a Step Applied scope and a type. Names can contain only letters, digits and underscores, can be up to 100 characters long, and each environment holds up to 400 of them. Secret values can be updated but never read back in the UI, so keep the source of truth in your team’s password manager.
| Where the value is read | Regular environment variable | Secret environment variable |
|---|---|---|
| OSGi configuration on author, preview and publish | $[env:NAME] | $[secret:NAME] |
Maven pom.xml and settings.xml | ${env.NAME} | ${env.NAME} |
| Dispatcher configuration | Allowed, but not inside IfDefine directives | Not supported |
Three rules keep these values under control:
- Keep most OSGi values inline in Git. Use
$[env:...]only where a value differs between development environments or for the preview tier. Adobe recommends against using it for stage and production values, so those changes go through source control. - Use
$[secret:...]for every password, token and API key, on every environment, including stage and production. The secret must exist as a secret-type variable on each environment that runs the code. - An OSGi PID is resolved as one unit. If
config.author.devdefines a PID, it replaces theconfig.authorversion of that PID completely, so repeat every property in the more specific file.
The example below sets a shared API key as a secret and a development-only search endpoint as a regular variable. The file for the shared properties lives in config.author, and the dev-only file repeats every property because of the PID rule above.
ui.config/src/main/content/jcr_root/apps/mysite/osgiconfig/config.author/com.mysite.core.impl.SearchClientImpl.cfg.json
ui.config/src/main/content/jcr_root/apps/mysite/osgiconfig/config.author.dev/com.mysite.core.impl.SearchClientImpl.cfg.json
{
"connection.timeout": 1000,
"api-key": "$[secret:SEARCH_API_KEY]",
"url": "$[env:SEARCH_SERVICE_URL]"
}
Build-time values are different. Maven reads ${env.NAME} from the build environment, and the usual source of a build secret is a secret pipeline variable. For example, a password for a private Maven repository is referenced like this:
<server>
<id>myco-repository</id>
<username>cloudmanager</username>
<password>${env.CUSTOM_MYCO_REPOSITORY_PASSWORD}</password>
</server>
Pipeline variables are set per pipeline, not per environment. Use them for values that only one pipeline needs. Check the variable settings in the pipeline’s configuration in Cloud Manager before you rely on a scope or type.
Run the same configuration on the local AEM SDK
The local SDK reads the same placeholders, so you do not need a separate configuration file for your laptop. Give each $[env:...] placeholder a default for local runs, and export the variable when you need a different value:
"url": "$[env:SEARCH_SERVICE_URL;default=https://search-dev.mysite.com/api]"
export SEARCH_SERVICE_URL=http://localhost:9200/api
java -jar aem-author-p4502.jar
Secrets are read from files. Create a file named after the secret, such as SEARCH_API_KEY, containing only the value, keep all secret files in one folder outside Git, and point the framework property org.apache.felix.configadmin.plugin.interpolation.secretsdir at that folder when you start the SDK.
Hands-on: an RDE workflow step by step
The steps below take the mysite project from a local change to a verified RDE deployment. You need the Business Owner role for step 2, Deployment Manager for step 3 and Developer for step 7.
Step 1: Confirm which environments the program has
In Cloud Manager, open the program 12345 and go to the Environments page. Note the type, name and status of each environment. The RDE shows up with its own type, separate from development, stage and production. Write down the environment ID of the RDE, 67893 in this lesson, because the aio CLI needs the ID, not the name.

Step 2: Add a development environment
If the program does not have a development environment yet, choose Add Environment and select the development type. Give it a name such as mysite-dev and pick the primary region. The environment name cannot be changed later, and neither can the primary region, so check both before you save.
An RDE is added from the same dialog, with the Rapid Development type. The number in brackets after each type shows how many more your licence allows. If a type is greyed out, the program has used all its environments of that type, or your role cannot add environments.

Step 3: Add the environment variables
Open the development environment, go to the Configuration tab and choose Add / Update. In the Environment Configuration dialog, add two variables. Set SEARCH_SERVICE_URL with Step Applied set to the author service and Type set to normal. Set SEARCH_API_KEY with the same Step Applied and Type set to secret. Save the changes, then check that the secret is listed without a value you can read back.
Repeat the same two variables on the RDE. Each environment has its own variables, and the RDE does not read the ones on the development environment. If $[secret:SEARCH_API_KEY] has no value on the RDE, the component starts without the key.

Step 4: Install and configure the RDE CLI
Install the CLI plugins and sign in. The aio commands below work with the Adobe I/O CLI on Node.js 20.
npm install -g @adobe/aio-cli
aio plugins:install @adobe/aio-cli-plugin-aem-rde
aio plugins:update
aio login
Point the plugin at your program and environment. Replace the organisation ID with the value for your own Adobe organisation. You can also run aio aem:rde:setup and answer the prompts. Check the result with aio aem rde setup --show.
aio config:set cloudmanager_orgid "<your-org-id>@AdobeOrg"
aio config:set cloudmanager_programid 12345
aio config:set cloudmanager_environmentid 67893
aio aem rde setup --show
Step 5: Build the package and install it on the RDE
Build the project locally, then deploy the content package, the OSGi configuration and the Dispatcher configuration. When you change only a configuration, install the .cfg.json file on its own. The CLI deploys it to author and publish, unless you pick one tier with -s. Check the RDE status after each install.
mvn clean install
aio aem:rde:install all/target/mysite.all-1.0.0-SNAPSHOT.zip
aio aem:rde:install -s author ui.config/src/main/content/jcr_root/apps/mysite/osgiconfig/config.author/com.mysite.core.impl.SearchClientImpl.cfg.json
aio aem:rde:install -t dispatcher-config dispatcher/target/mysite.dispatcher.cloud-1.0.0-SNAPSHOT.zip
aio aem rde status
aio aem rde history
Verify the configuration in the Developer Console on the RDE. Open the Status tab, choose Configurations in the Status Dump list, and check that the PID shows the value you expect. A value that resolves to the wrong runmode is usually a config folder naming problem.
The RDE has its own run mode, rde. Use config.rde, config.author.rde or config.publish.rde for RDE-only values. The RDE also inherits the values from the dev run mode, so your config.author.dev file applies there too. Keep -t env-config for the YAML files of the config pipeline, such as CDN rules. It is not for OSGi files.

Step 6: Read the logs while you test
Stream the author logs for the package you are debugging. Limit the output to the bundle that matters so the log stays readable. Stop with Ctrl+C when you are done.
aio aem:rde:logs --target=author --debug=com.mysite.core
aio aem:rde:logs --target=publish
For tailing logs on the cloud environments, the Developer Console and the tail logs tutorial cover the same ground in more depth.
Step 7: Snapshot before a risky change, then reset
Before you try a schema change or a large content import, create a snapshot. Restore it if the experiment goes wrong. When the feature is finished, reset the RDE so the next feature starts clean. A reset removes all custom code and content, so only run it after you have committed your work.
aio aem rde snapshot create baseline-v1 -d "Before search refactor"
aio aem rde snapshot
aio aem rde snapshot restore baseline-v1
aio aem:rde:reset
aio aem rde status

Promoting code from RDE to production
The RDE is a workbench, not a release channel. The path to production looks like this, and every step is a gate you can see in Cloud Manager:
- Validate the feature locally with the AEM SDK and the Dispatcher SDK tools, then sync it to the RDE and test it there.
- Commit the same code to a feature branch in the program’s Git repository.
- Run a non-production pipeline against the development environment. This runs the code quality checks and deploys to dev.
- Merge to the release branch and run the production pipeline. It deploys to stage first, runs the stage tests, then waits for approval before production.
- Confirm the environment variables and secrets exist on stage and production before the run. A missing secret fails the deployment, not the code.
Variables are the most common reason a change passes on the RDE and fails on stage. The RDE has the variables you set there, not the ones on stage. Before the production run, compare the Configuration tab of each environment and make sure the names match exactly.
Common mistakes and troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| OSGi falls back to a default value | Variable name typo, or the variable is set on another environment | Compare the name character by character, then check the Configuration tab of the environment that runs the code. |
| Config is correct on the RDE but wrong on stage | The stage config has a different PID set, or stage was never given the variable | Check the PID in the Developer Console for each environment. Add the variable to stage or move the value inline if it is not environment-specific. |
| Dispatcher does not pick up a value | Dispatcher cannot read secrets, and environment variables cannot appear inside IfDefine | Keep secrets out of Dispatcher. Move the value into an author or publish OSGi config, or use a plain variable outside IfDefine. |
| OSGi value is empty on the RDE but correct on dev | The variable exists only on the development environment | Add the same variable to the RDE. Every environment, including the RDE, has its own set. |
| Variable rejected when saved | Name has a hyphen or dot, or the name is longer than 100 characters | Rename it using underscores only. The OSGi example in this lesson uses SEARCH_API_KEY for this reason. |
| Reset or delete fails with a permissions error | The user lacks the Developer role | Ask your Admin Console product administrator to add you to the Developer – Cloud Service product profile. Do not share a team login. |
Hands-on challenge
Add a third variable, SEARCH_TIMEOUT_MS, to the development environment. Use it in the dev-only OSGi file, not the shared one, so stage keeps its inline timeout. Because of the PID rule, the dev file must repeat api-key and connection.timeout. Deploy to the RDE and confirm the value in the Developer Console.
Key takeaways
- Production and stage come as a pair. Development is for non-production pipelines. The RDE is for fast iteration and skips the quality gates.
- Use
$[env:...]only for values that differ between dev environments and the preview tier. Keep stage and production values inline. - Every secret uses
$[secret:...]on every environment, and it is a secret-type variable. - A more specific runmode file replaces the whole PID, so repeat every property.
- Before a production run, confirm each environment has the variables and secrets the code expects.
Knowledge check
Which environment types can receive code from a production pipeline?
Production and stage. The production pipeline deploys to stage first and then to production after approval. Development is used only with non-production pipelines, and the RDE is synced from the CLI.
What is the correct way to reference a secret in an OSGi configuration file?
Use $[secret:VARIABLE_NAME] in the .cfg.json file, and define a secret-type variable with the same name on each environment that runs the code.
Why does a PID in config.author.dev need to repeat every property?
Within a PID, the configuration with the most matching runmodes is used in full. A more specific file does not merge with the less specific one, so any property you leave out falls back to its default.
Can an RDE be used to prove that a change is ready for production?
No. Code synced to an RDE skips the pipeline and its quality gates. Use the RDE to iterate, then prove the change with a non-production and a production pipeline run.
Frequently asked questions
Can I create only a stage environment?
No. Production and stage are created as a pair, so a program with a stage environment also has a production environment.
Do environment variable changes need a code deployment?
No. Cloud Manager applies the change by updating the environment, without a pipeline run. The variables table shows an Updating status until the change is live. That is also why they should be used sparingly for stage and production values, which belong in Git and go through a pipeline.
Which role is needed to reset an RDE?
The Cloud Manager Developer role. A reset deletes all custom code and content on the RDE, so confirm you have committed your work first.
Continue your learning
- Previous lesson: Lesson 11, Simplified Index Management in AEM as a Cloud Service Using Diff Index.
- Next lesson: Lesson 13, Cloud Manager for AEM Developers, which covers programs, repositories and pipeline types. See the AEM Cloud roadmap for its status.
- Practice: the Cloud Manager practice test.
Leave a Reply