Skip to content
Latchkey

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.

AWS AppConfig
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.

Terminal
# 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 otherwise

Common 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

  1. List the AppConfig application, environment, and configuration profile IDs.
  2. Pass those exact IDs to StartConfigurationSession.
  3. Confirm the CLI or SDK is configured for the right region.
Terminal
aws appconfig list-configuration-profiles \
  --application-id <app-id> --region us-east-1

Start 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.

Terminal
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.

Frequently asked questions

What causes AWS AppConfig BadRequestException (configuration profile) in CI?
There are 2 common causes: an identifier does not exist or is a name, not an id and the session parameters are malformed. The application, environment, or configuration profile ID is wrong for the account and region, so AppConfig cannot locate the profile.
How do I fix AWS AppConfig BadRequestException (configuration profile) in CI?
There are 2 fixes depending on which cause you have: use the correct identifiers for the region and start a session then get the latest configuration. Work through them in order, since the first is the most common.
What does AWS AppConfig BadRequestException (configuration profile) in CI actually mean?
The AppConfig call fails with "BadRequestException" naming an invalid application, environment, or configuration profile identifier, and no configuration data is retrieved.
How do I stop AWS AppConfig BadRequestException (configuration profile) in CI happening again?
Reference AppConfig applications, environments, and profiles by ID. The prevention section lists 3 changes that keep it from recurring.

Related guides

References

Not every red build is your code. Latchkey repairs the ones that are not, on the runner. Start free → 30-day trial · No credit card