Environment variables do not interpolate in OSGi configurations in Adobe Experience Manager
In Adobe Experience Manager as a Cloud Service (AEMaaCS), AEM Managed Services (AMS), and Adobe Developer App Builder, environment variables fail to appear, fail to interpolate into OSGi configurations, or return null values. Placeholder values such as $[ env:VAR] and $[ secret:VAR] appear literally in logs, and Cloud Manager does not allow environment variable configuration in AMS environments. To fix this issue, identify the AEM variant, validate environment variable configuration, and verify OSGi implementation requirements.
Description description
Environment
Adobe Experience Manager as a Cloud Service (AEMaaCS)
Issue/Symptoms
- Environment variable values appear as literal placeholders such as
$[ secret:ACCESS_KEY]or$[ env:AEM_EXTERNALIZER_LIVE]in logs. - Cloud Manager prevents adding or editing environment variables in AMS environments.
- Environment variables do not resolve in OSGi configurations.
- Secret values return null or remain unresolved.
- Boolean environment variable substitution does not work.
Resolution resolution
To fix this issue, follow these steps:
- Identify the AEM variant in Cloud Manager and confirm whether the program is AEM as a Cloud Service (AEMaaCS) or AEM Managed Services (AMS).
- For AEMaaCS environments, open Cloud Manager
>Environments>[Select Environment]>Configuration. - Verify that the required environment variables or secrets exist and match the names used in the OSGi configuration.
- Review the OSGi configuration and confirm that it uses the supported placeholder syntax
$[ env:VAR]or$[ secret:VAR]. - Verify that boolean properties do not use environment variable substitution. Store boolean values in environment-specific configurations or implement customrs
- Confirm that the OSGi configuration uses
@ObjectClassDefinitionand@Designateannotations and that the configuration is correctly mapped to the PID. - For AMS environments, use Pipeline Variables instead of Cloud Manager runtime environment variables and reference them in Maven with
${env.VAR_NAME}. - Trigger the application component that reads the configuration and verify that logs show resolved values or masked secrets instead of literal placeholders.
Related reading
recommendation-more-help
experience-cloud-kcs-help-kbarticles