AWS AppConfig BadRequestException (configuration profile) in CI
AWS AppConfig Data rejected the request with BadRequestException. The application, environment, or configuration profile identifier does not exist (or is a name where an ID is required), or the StartConfigurationSession parameters are invalid. The call fails before any configuration is returned.
What this error means
The AppConfig call fails with "BadRequestException" naming an invalid application, environment, or configuration profile identifier, and no configuration data is retrieved.
An error occurred (BadRequestException) when calling the
StartConfigurationSession operation: No configuration profile found for the
application, environment, and configuration profile identifiers provided.Diagnose it: did the report reach the service?
Coverage and quality integrations fail in two distinct places: the report was never produced, or it was produced and the upload was rejected. Establish which before touching tokens.
# 1. does the report exist and is it non-empty?
ls -la coverage/ && head -5 coverage/lcov.info
# 2. does it reference paths the service can map to the repo?
grep "^SF:" coverage/lcov.info | head -5
# 3. did the upload actually succeed, or just not fail the step?
# most uploaders exit 0 on a rejected upload unless told otherwiseCommon causes
An identifier does not exist or is a name, not an ID
The application, environment, or configuration profile ID is wrong for the account and region, so AppConfig cannot locate the profile.
The session parameters are malformed
A missing or invalid parameter to StartConfigurationSession (for example an empty identifier) is rejected as a bad request.
How to fix it
Use the correct identifiers for the region
- List the AppConfig application, environment, and configuration profile IDs.
- Pass those exact IDs to StartConfigurationSession.
- Confirm the CLI or SDK is configured for the right region.
aws appconfig list-configuration-profiles \
--application-id <app-id> --region us-east-1Start a session then get the latest configuration
Use the two-step Data API: start a session to obtain a token, then fetch the latest configuration with that token.
aws appconfigdata start-configuration-session \
--application-identifier <app-id> \
--environment-identifier <env-id> \
--configuration-profile-identifier <profile-id>How to prevent it
- Reference AppConfig applications, environments, and profiles by ID.
- Confirm the AWS region matches where the profile lives.
- Validate identifiers exist before the CI step reads configuration.