

# Troubleshooting the AWS AppConfig extension in AWS Systems Manager Cloud Extensions

Find solutions to common problems with the AWS AppConfig extension, such as stale configurations, missing flags, and access errors.

**Topics**
+ [Your application reads an old configuration](#cloud-extensions-ext-appconfig-troubleshooting-your-application-reads-an-old-configuration)
+ [A configuration isn't found](#cloud-extensions-ext-appconfig-troubleshooting-a-configuration-isnt-found)
+ [A flag isn't found or can't be read](#cloud-extensions-ext-appconfig-troubleshooting-a-flag-isnt-found-or-cant-be-read)
+ [Access denied](#cloud-extensions-ext-appconfig-troubleshooting-access-denied)
+ [The extension can't reach AWS AppConfig](#cloud-extensions-ext-appconfig-troubleshooting-the-extension-cant-reach-aws-appconfig)
+ [The extension doesn't start](#cloud-extensions-ext-appconfig-troubleshooting-the-extension-doesnt-start)
+ [The runtime returns UNKNOWN\_OPERATION](#cloud-extensions-ext-appconfig-troubleshooting-the-runtime-returns-unknown_operation)
+ [The runtime returns ServiceUnavailableException](#cloud-extensions-ext-appconfig-troubleshooting-the-runtime-returns-serviceunavailableexception)

## Your application reads an old configuration
<a name="cloud-extensions-ext-appconfig-troubleshooting-your-application-reads-an-old-configuration"></a>

**Symptom:** You deployed a new configuration version, but your application still reads the old one.

The extension picks up a new deployment at its next poll. Check that the deployment is complete in AWS AppConfig, and check the **Poll interval** setting. Lower the value if your application needs changes sooner:

```bash
aws cloudextensions get-profile-entry \
  --profile-identifier my-application \
  --identifier {{profile-entry-id}} \
  --query 'effectiveSettings'
```

## A configuration isn't found
<a name="cloud-extensions-ext-appconfig-troubleshooting-a-configuration-isnt-found"></a>

**Symptom:** The extension returns `RESOURCE_NOT_FOUND`.

Check the names or IDs of the application, environment, and configuration profile. Check that you deployed a configuration version to the environment in the Region that the extension uses. The extension keeps trying in the background, so it picks up a configuration that you deploy later.

## A flag isn't found or can't be read
<a name="cloud-extensions-ext-appconfig-troubleshooting-a-flag-isnt-found-or-cant-be-read"></a>

**Symptom:** `GetFlag` returns `FLAG_NOT_FOUND` or `FLAG_UNREADABLE`.

For `FLAG_NOT_FOUND`, check the flag key. Keys are case-sensitive. For `FLAG_UNREADABLE`, the configuration profile isn't of type `AWS.AppConfig.FeatureFlags`. Use `GetConfiguration` for a freeform profile.

## Access denied
<a name="cloud-extensions-ext-appconfig-troubleshooting-access-denied"></a>

**Symptom:** The extension returns `AccessDeniedException`.

If the reason is `MISSING_AUTHENTICATION`, `SIGNATURE_EXPIRED`, `UNKNOWN_ACCESS_KEY`, `IAM_CREDENTIAL_USED`, or `SIGNATURE_MISMATCH`, the profile requires signed requests. Sign each request with the credentials of the runtime. If the profile uses an extension key, sign with the access key ID and the secret key of the profile. For more information, see [Authentication](cloud-extensions-security.md#cloud-extensions-security-authentication). Otherwise, check that the IAM execution role allows `appconfig:StartConfigurationSession` and `appconfig:GetLatestConfiguration` on the configuration, in the Region that the extension uses. For the policy, see [Required IAM permissions](cloud-extensions-ext-appconfig-prerequisites.md#cloud-extensions-ext-appconfig-prerequisites-required-iam-permissions).

## The extension can't reach AWS AppConfig
<a name="cloud-extensions-ext-appconfig-troubleshooting-the-extension-cant-reach-aws-appconfig"></a>

**Symptom:** The extension returns `500 InternalServerException` with the message `Unable to call AWS AppConfig`.

Check that you approved the `appconfigdata` capability on the profile entry, and that the runtime has network access to AWS AppConfig. For the steps, see [Approving capabilities](cloud-extensions-ext-appconfig-add-to-profile.md#cloud-extensions-ext-appconfig-add-to-profile-approving-capabilities).

## The extension doesn't start
<a name="cloud-extensions-ext-appconfig-troubleshooting-the-extension-doesnt-start"></a>

**Symptom:** Every request returns `502 BadGatewayException` with `EXTENSION_INITIALIZE_FAILED`.

A setting isn't valid. Check the settings against [Descriptions of settings](cloud-extensions-ext-appconfig-configuration.md#cloud-extensions-ext-appconfig-configuration-descriptions-of-settings), and check the logs of the extension for the setting that failed.

## The runtime returns UNKNOWN\_OPERATION
<a name="cloud-extensions-ext-appconfig-troubleshooting-the-runtime-returns-unknown_operation"></a>

**Symptom:** The runtime returns `400` with the reason `UNKNOWN_OPERATION`.

The profile doesn't include the extension, the path is wrong, the `X-Amz-Target` header names an unknown operation, or the content type isn't `application/x-amz-json-1.1`. The endpoint is `/appconfig/`, and the targets are `AppConfig.GetConfiguration` and `AppConfig.GetFlag`.

## The runtime returns ServiceUnavailableException
<a name="cloud-extensions-ext-appconfig-troubleshooting-the-runtime-returns-serviceunavailableexception"></a>

**Symptom:** The runtime returns `503 ServiceUnavailableException`.

The extension is still loading, or a settings update replaced it during the call. Retry the request. If the error continues, check the log of the runtime.