

# Adding the AWS AppConfig extension to a profile in AWS Systems Manager Cloud Extensions

Add the AWS AppConfig extension to a profile on the console or with the AWS CLI, and approve its capability.

**Topics**
+ [Viewing the extension on the Systems Manager console](#cloud-extensions-ext-appconfig-add-to-profile-viewing-the-extension-on-the-systems-manager-console)
+ [Adding the extension to a profile](#cloud-extensions-ext-appconfig-add-to-profile-adding-the-extension-to-a-profile)

## Viewing the extension on the Systems Manager console
<a name="cloud-extensions-ext-appconfig-add-to-profile-viewing-the-extension-on-the-systems-manager-console"></a>

**To view the settings, capabilities, and versions of the extension**

1. Open the Systems Manager console at [https://console.aws.amazon.com/systems-manager/](https://console.aws.amazon.com/systems-manager/).

1. In the navigation pane, choose **Cloud Extensions**.

1. On the **Extension catalog** tab, choose **AWS AppConfig**.

The page shows an overview of the extension with its author and its latest version. The page also has a usage guide and three tabs:
+ **Settings** – The settings that you can configure, with the description, type, and default value of each setting.
+ **Capabilities** – What the extension can do in your resources. This extension has one capability, which retrieves deployed configuration data from AWS AppConfig. The capability has the scope `StartConfigurationSession` and `GetLatestConfiguration`, and the extension requires it.
+ **Versions** – The released versions of the extension.

The usage guide recommends the following actions after you add the extension to a profile:
+ Check the logs of the extension in CloudWatch Logs after your next invocation.
+ Review the capabilities that you approve for the extension, and clear the capabilities that you don't need.

## Adding the extension to a profile
<a name="cloud-extensions-ext-appconfig-add-to-profile-adding-the-extension-to-a-profile"></a>

### Adding the extension on the console
<a name="cloud-extensions-ext-appconfig-add-to-profile-adding-the-extension-on-the-console"></a>

**To add the extension to a profile**

1. Open the Systems Manager console at [https://console.aws.amazon.com/systems-manager/](https://console.aws.amazon.com/systems-manager/).

1. In the navigation pane, choose **Cloud Extensions**.

1. On the **Extension catalog** tab, select **AWS AppConfig**, and then choose **Add to profile**.

1. On the **Choose a profile** page, choose **Existing profile** and then choose the profile in **Profile**, or choose **New profile**. Choose **Next**.

1. On the **Configure extension** page, under **Update method**, choose **Latest (recommended)** or **Specific version**.

1. Under **Settings**, enter the **Poll interval**, the **AWS region**, and the **Prefetch list**, or keep the default values.

1. Review the **Capabilities summary**. The summary lists the capability that retrieves configuration data from AWS AppConfig. The console approves the capability when you add the extension. Choose **Next**.

1. On the **Review and add** page, choose **Add to profile**.

For more information about the **Configure extension** page, see [Configuring an extension on the console](cloud-extensions-profiles.md#cloud-extensions-profiles-configuring-an-extension-on-the-console).

### Adding the extension with the AWS CLI
<a name="cloud-extensions-ext-appconfig-add-to-profile-adding-the-extension-with-the-aws-cli"></a>

To add the extension to your Cloud Extensions profile with the AWS CLI, create a profile entry:

```bash
aws cloudextensions create-profile-entry \
  --profile-identifier my-application \
  --extension-identifier aws:appconfig \
  --version-policy updateStrategy=AUTOMATIC,versionSelector=1.x.x \
  --execution-role arn:aws:iam::111122223333:role/AppConfigExtensionRole \
  --approve appconfigdata
```

The version policy tracks new releases within major version 1. The IAM execution role is the role that the extension assumes when it calls AWS AppConfig. You can omit the `--execution-role` option if you set an execution role in the extension defaults of the profile.

### Approving capabilities
<a name="cloud-extensions-ext-appconfig-add-to-profile-approving-capabilities"></a>

An extension can use a capability only after you approve the capability. To list the capabilities that the extension declares, run the following command:

```bash
aws cloudextensions get-extension \
  --identifier aws:appconfig \
  --query 'configuration.capabilities'
```

The extension declares one AWS service capability, `appconfigdata`. To use this extension, you must approve the capability on the profile entry. To approve the capability, pass its ID to the `--approve` option, as the `create-profile-entry` command in [Adding the extension with the AWS CLI](#cloud-extensions-ext-appconfig-add-to-profile-adding-the-extension-with-the-aws-cli) shows. The capability allows the AWS AppConfig Data operations `StartConfigurationSession` and `GetLatestConfiguration`. The extension uses the capability to make HTTPS calls to AWS AppConfig and retrieve deployed configurations.

If you don't approve the capability, the extension can't call AWS AppConfig. Every request for a configuration that isn't cached returns the same error that the extension returns when it can't reach AWS AppConfig. The error looks like the following:

```json
{"__type":"InternalServerException","message":"Unable to call AWS AppConfig"}
```

For more information, see [Approving capabilities](cloud-extensions-profiles.md#cloud-extensions-profiles-approving-capabilities).