id
stringlengths
8
78
source
stringclasses
743 values
chunk_id
int64
1
5.05k
text
stringlengths
593
49.7k
appconfig-ug-024
appconfig-ug.pdf
24
all of the safety guardrail controls and benefits while still using your legacy data stores. Creating a configuration profile for non-native data sources 77 AWS AppConfig User Guide Deploying feature flags and configuration data in AWS AppConfig After you create required artifacts for working with feature flags and freeform configuration data, you can create a new deployment. When you create a new deployment, you specify the following information: • An application ID • A configuration profile ID • A configuration version • An environment ID where you want to deploy the configuration data • A deployment strategy ID that defines how fast you want the changes to take effect • An AWS Key Management Service (AWS KMS) key ID to encrypt the data using a customer managed key. When you call the StartDeployment API action, AWS AppConfig performs the following tasks: 1. Retrieves the configuration data from the underlying data store by using the location URI in the configuration profile. 2. Verifies the configuration data is syntactically and semantically correct by using the validators you specified when you created your configuration profile. 3. Caches a copy of the data so it is ready to be retrieved by your application. This cached copy is called the deployed data. You can mitigate situations where deploying configuration data causes errors in your application by using a combination of AWS AppConfig deployment strategies and automatic rollbacks based on Amazon CloudWatch alarms. A deployment strategy enables you to slowly release changes to production environments over minutes or hours. Once configured, if one or more CloudWatch alarms go into the alarm state during a deployment, AWS AppConfig automatically rolls back your configuration data to the previous version. For more information about deployment strategies, see Working with deployment strategies. For more information about automatic rollbacks, see Monitoring deployments for automatic rollback. Topics 78 AWS AppConfig User Guide • Working with deployment strategies • Deploying a configuration • Deploying AWS AppConfig configurations using CodePipeline • Reverting a configuration Working with deployment strategies A deployment strategy enables you to slowly release changes to production environments over minutes or hours. An AWS AppConfig deployment strategy defines the following important aspects of a configuration deployment. Setting Deployment type Description Deployment type defines how the configura tion deploys or rolls out. AWS AppConfig supports Linear and Exponential deployment types. • Linear: For this type, AWS AppConfig processes the deployment by increments of the growth factor evenly distributed over the deployment. Here's an example timeline for a 10 hour deployment that uses 20% linear growth: Elapsed time 0 hour 2 hour 4 hour 6 hour 8 hour Deployment progress 0% 20% 40% 60% 80% Working with deployment strategies 79 AWS AppConfig Setting Step percentage (growth factor) User Guide Description Elapsed time Deployment progress 10 hour 100% • Exponential: For this type, AWS AppConfig processes the deployment exponentially using the following formula: G*(2^N). In this formula, G is the step percentage specified by the user and N is the number of steps until the configuration is deployed to all targets. For example, if you specify a growth factor of 2, then the system rolls out the configuration as follows: 2*(2^0) 2*(2^1) 2*(2^2) Expressed numerically, the deployment rolls out as follows: 2% of the targets, 4% of the targets, 8% of the targets, and continues until the configuration has been deployed to all targets. This setting specifies the percentage of callers to target during each step of the deployment. Note In the SDK and the AWS AppConfig API Reference, step percentage is called growth factor. Working with deployment strategies 80 AWS AppConfig Setting Deployment time Bake time User Guide Description This setting specifies an amount of time during which AWS AppConfig deploys to hosts. This is not a timeout value. It is a window of time during which the deployment is processed in intervals. This setting specifies the amount of time AWS AppConfig monitors for Amazon CloudWatc h alarms after the configuration has been deployed to 100% of its targets, before considering the deployment to be complete. If an alarm is triggered during this time, AWS AppConfig rolls back the deploymen t. You must configure permissions for AWS AppConfig to roll back based on CloudWatch alarms. For more information, see (Recommen ded) Configure permissions for automatic rollback. You can choose a predefined strategy included with AWS AppConfig or create your own. Topics • Using predefined deployment strategies • Create a deployment strategy Using predefined deployment strategies AWS AppConfig includes predefined deployment strategies to help you quickly deploy a configuration. Instead of creating your own strategies, you can choose one of the following when you deploy a configuration. Deployment strategy Description AppConfig.Linear20PercentEvery6Minutes AWS recommended: Using predefined deployment strategies 81 AWS AppConfig User Guide Deployment strategy Description This strategy deploys the configuration to 20% of all targets
appconfig-ug-025
appconfig-ug.pdf
25
alarms. For more information, see (Recommen ded) Configure permissions for automatic rollback. You can choose a predefined strategy included with AWS AppConfig or create your own. Topics • Using predefined deployment strategies • Create a deployment strategy Using predefined deployment strategies AWS AppConfig includes predefined deployment strategies to help you quickly deploy a configuration. Instead of creating your own strategies, you can choose one of the following when you deploy a configuration. Deployment strategy Description AppConfig.Linear20PercentEvery6Minutes AWS recommended: Using predefined deployment strategies 81 AWS AppConfig User Guide Deployment strategy Description This strategy deploys the configuration to 20% of all targets every six minutes for a 30 minute deployment. The system monitors for Amazon CloudWatch alarms for 30 minutes. If no alarms are received in this time, the deployment is complete. If an alarm is triggered during this time, AWS AppConfig rolls back the deployment. We recommend using this strategy for production deployments because it aligns with AWS best practices and includes additiona l emphasis on deployment safety due to its long duration and bake time. AppConfig.Canary10Percent20Minutes AWS recommended: This strategy processes the deployment exponentially using a 10% growth factor over 20 minutes. The system monitors for CloudWatch alarms for 10 minutes. If no alarms are received in this time, the deployment is complete. If an alarm is triggered during this time, AWS AppConfig rolls back the deployment. We recommend using this strategy for production deployments because it aligns with AWS best practices for configuration deployments. Using predefined deployment strategies 82 AWS AppConfig Deployment strategy AppConfig.AllAtOnce User Guide Description Quick: This strategy deploys the configuration to all targets immediately. The system monitors for CloudWatch alarms for 10 minutes. If no alarms are received in this time, the deployment is complete. If an alarm is triggered during this time, AWS AppConfig rolls back the deployment. AppConfig.Linear50PercentEvery30Seconds Testing/demonstration: This strategy deploys the configuration to half of all targets every 30 seconds for a one- minute deployment. The system monitors for Amazon CloudWatch alarms for 1 minute. If no alarms are received in this time, the deployment is complete. If an alarm is triggered during this time, AWS AppConfig rolls back the deployment. We recommend using this strategy only for testing or demonstration purposes because it has a short duration and bake time. Create a deployment strategy If you don't want to use one of the predefined deployment strategies, you can create your own. You can create a maximum of 20 deployment strategies. When you deploy a configuration, you can choose the deployment strategy that works best for the application and the environment. Creating an AWS AppConfig deployment strategy (console) Use the following procedure to create an AWS AppConfig deployment strategy by using the AWS Systems Manager console. Create a deployment strategy 83 AWS AppConfig To create a deployment strategy User Guide 1. Open the AWS Systems Manager console at https://console.aws.amazon.com/systems- manager/appconfig/. 2. 3. 4. 5. 6. 7. 8. 9. In the navigation pane, choose Deployment strategies, and then choose Create deployment strategy. For Name, enter a name for the deployment strategy. For Description, enter information about the deployment strategy. For Deployment type, choose a type. For Step percentage, choose the percentage of callers to target during each step of the deployment. For Deployment time, enter the total duration for the deployment in minutes or hours. For Bake time, enter the total time, in minutes or hours, to monitor for Amazon CloudWatch alarms before proceeding to the next step of a deployment or before considering the deployment to be complete. In the Tags section, enter a key and an optional value. You can specify a maximum of 50 tags for a resource. 10. Choose Create deployment strategy. Important If you created a configuration profile for AWS CodePipeline, then you must create a pipeline in CodePipeline that specifies AWS AppConfig as the deploy provider. You don't need to perform Deploying a configuration. However, you must configure a client to receive application configuration updates as described in Retrieving configuration data without AWS AppConfig Agent. For information about creating a pipeline that specifies AWS AppConfig as the deploy provider, see Tutorial: Create a Pipeline that Uses AWS AppConfig as a Deployment Provider in the AWS CodePipeline User Guide. Proceed to Deploying a configuration. Creating an AWS AppConfig deployment strategy (command line) The following procedure describes how to use the AWS CLI (on Linux or Windows) or AWS Tools for PowerShell to create an AWS AppConfig deployment strategy. Create a deployment strategy 84 AWS AppConfig User Guide To create a deployment strategy step by step 1. Open the AWS CLI. 2. Run the following command to create a deployment strategy. Linux aws appconfig create-deployment-strategy \ --name A_name_for_the_deployment_strategy \ --description A_description_of_the_deployment_strategy \ --deployment-duration-in-minutes Total_amount_of_time_for_a_deployment_to_last \ --final-bake-time-in-minutes Amount_of_time_AWS AppConfig_monitors_for_alarms_before_considering_the_deployment_to_be_complete \ --growth- factor The_percentage_of_targets_to_receive_a_deployed_configuration_during_each_interval \ --growth- type The_linear_or_exponential_algorithm_used_to_define_how_percentage_grows_over_time \ --replicate- to
appconfig-ug-026
appconfig-ug.pdf
26
Guide. Proceed to Deploying a configuration. Creating an AWS AppConfig deployment strategy (command line) The following procedure describes how to use the AWS CLI (on Linux or Windows) or AWS Tools for PowerShell to create an AWS AppConfig deployment strategy. Create a deployment strategy 84 AWS AppConfig User Guide To create a deployment strategy step by step 1. Open the AWS CLI. 2. Run the following command to create a deployment strategy. Linux aws appconfig create-deployment-strategy \ --name A_name_for_the_deployment_strategy \ --description A_description_of_the_deployment_strategy \ --deployment-duration-in-minutes Total_amount_of_time_for_a_deployment_to_last \ --final-bake-time-in-minutes Amount_of_time_AWS AppConfig_monitors_for_alarms_before_considering_the_deployment_to_be_complete \ --growth- factor The_percentage_of_targets_to_receive_a_deployed_configuration_during_each_interval \ --growth- type The_linear_or_exponential_algorithm_used_to_define_how_percentage_grows_over_time \ --replicate- to To_save_the_deployment_strategy_to_a_Systems_Manager_(SSM)_document \ --tags User_defined_key_value_pair_metadata_of_the_deployment_strategy Windows aws appconfig create-deployment-strategy ^ --name A_name_for_the_deployment_strategy ^ --description A_description_of_the_deployment_strategy ^ --deployment-duration-in-minutes Total_amount_of_time_for_a_deployment_to_last ^ --final-bake-time-in-minutes Amount_of_time_AWS AppConfig_monitors_for_alarms_before_considering_the_deployment_to_be_complete ^ --growth- factor The_percentage_of_targets_to_receive_a_deployed_configuration_during_each_interval ^ --growth- type The_linear_or_exponential_algorithm_used_to_define_how_percentage_grows_over_time ^ --name A_name_for_the_deployment_strategy ^ Create a deployment strategy 85 AWS AppConfig --replicate- User Guide to To_save_the_deployment_strategy_to_a_Systems_Manager_(SSM)_document ^ --tags User_defined_key_value_pair_metadata_of_the_deployment_strategy PowerShell New-APPCDeploymentStrategy ` --Name A_name_for_the_deployment_strategy ` --Description A_description_of_the_deployment_strategy ` --DeploymentDurationInMinutes Total_amount_of_time_for_a_deployment_to_last ` --FinalBakeTimeInMinutes Amount_of_time_AWS AppConfig_monitors_for_alarms_before_considering_the_deployment_to_be_complete ` -- GrowthFactor The_percentage_of_targets_to_receive_a_deployed_configuration_during_each_interval ` -- GrowthType The_linear_or_exponential_algorithm_used_to_define_how_percentage_grows_over_time ` -- ReplicateTo To_save_the_deployment_strategy_to_a_Systems_Manager_(SSM)_document ` -- Tag Hashtable_type_User_defined_key_value_pair_metadata_of_the_deployment_strategy The system returns information like the following. Linux { "Id": "Id of the deployment strategy", "Name": "Name of the deployment strategy", "Description": "Description of the deployment strategy", "DeploymentDurationInMinutes": "Total amount of time the deployment lasted", "GrowthType": "The linear or exponential algorithm used to define how percentage grew over time", "GrowthFactor": "The percentage of targets that received a deployed configuration during each interval", "FinalBakeTimeInMinutes": "The amount of time AWS AppConfig monitored for alarms before considering the deployment to be complete", "ReplicateTo": "The Systems Manager (SSM) document where the deployment strategy is saved" Create a deployment strategy 86 AWS AppConfig } Windows { User Guide "Id": "Id of the deployment strategy", "Name": "Name of the deployment strategy", "Description": "Description of the deployment strategy", "DeploymentDurationInMinutes": "Total amount of time the deployment lasted", "GrowthType": "The linear or exponential algorithm used to define how percentage grew over time", "GrowthFactor": "The percentage of targets that received a deployed configuration during each interval", "FinalBakeTimeInMinutes": "The amount of time AWS AppConfig monitored for alarms before considering the deployment to be complete", "ReplicateTo": "The Systems Manager (SSM) document where the deployment strategy is saved" } PowerShell ContentLength : Runtime of the command DeploymentDurationInMinutes : Total amount of time the deployment lasted Description : Description of the deployment strategy FinalBakeTimeInMinutes : The amount of time AWS AppConfig monitored for alarms before considering the deployment to be complete GrowthFactor : The percentage of targets that received a deployed configuration during each interval GrowthType : The linear or exponential algorithm used to define how percentage grew over time HttpStatusCode : HTTP Status of the runtime Id : The deployment strategy ID Name : Name of the deployment strategy ReplicateTo : The Systems Manager (SSM) document where the deployment strategy is saved ResponseMetadata : Runtime Metadata Deploying a configuration After you create required artifacts for working with feature flags and freeform configuration data, you can create a new deployment by using the AWS Management Console, the AWS CLI, or the Deploying a configuration 87 AWS AppConfig User Guide SDK. Starting a deployment in AWS AppConfig calls the StartDeployment API operation. This call includes the IDs of the AWS AppConfig application, the environment, the configuration profile, and (optionally) the configuration data version to deploy. The call also includes the ID of the deployment strategy to use, which determines how the configuration data is deployed. If you deploy secrets stored in AWS Secrets Manager, Amazon Simple Storage Service (Amazon S3) objects encrypted with a customer managed key, or secure string parameters stored in AWS Systems Manager Parameter Store encrypted with a customer managed key, you must specify a value for the KmsKeyIdentifier parameter. If your configuration is not encrypted or is encrypted with an AWS managed key, specifying a value for the KmsKeyIdentifier parameter is not required. Note The value you specify for KmsKeyIdentifier must be a customer managed key. This doesn't have to be the same key you used to encrypt your configuration. When you start a deployment with a KmsKeyIdentifier, the permission policy attached to your AWS Identity and Access Management (IAM) principal must allow the kms:GenerateDataKey operation. AWS AppConfig monitors the distribution to all hosts and reports status. If a distribution fails, then AWS AppConfig rolls back the configuration. Note You can only deploy one configuration at a time to an environment. However, you can deploy one configuration each to different environments at the same time. Deploy a configuration (console) Use the following procedure to deploy an AWS AppConfig configuration by using the AWS Systems Manager console. To deploy a configuration by using the console 1. Open the AWS Systems Manager console at https://console.aws.amazon.com/systems- manager/appconfig/. Deploy a configuration (console) 88 AWS AppConfig User Guide 2. In the navigation pane, choose Applications, and then
appconfig-ug-027
appconfig-ug.pdf
27
all hosts and reports status. If a distribution fails, then AWS AppConfig rolls back the configuration. Note You can only deploy one configuration at a time to an environment. However, you can deploy one configuration each to different environments at the same time. Deploy a configuration (console) Use the following procedure to deploy an AWS AppConfig configuration by using the AWS Systems Manager console. To deploy a configuration by using the console 1. Open the AWS Systems Manager console at https://console.aws.amazon.com/systems- manager/appconfig/. Deploy a configuration (console) 88 AWS AppConfig User Guide 2. In the navigation pane, choose Applications, and then choose an application you created in Creating a namespace for your application in AWS AppConfig. 3. On the Environments tab, fill the radio button for an environment, and then choose View details. 4. Choose Start deployment. 5. For Configuration, choose a configuration from the list. 6. Depending on the source of your configuration, use the version list to choose the version you want to deploy. For Deployment strategy, choose a strategy from the list. (Optional) For Deployment description, enter a description. For Additional encryption options, choose a AWS Key Management Service key from the list. 7. 8. 9. 10. (Optional) In the Tags section, choose Add new tag and enter a key and an optional value. You can specify a maximum of 50 tags for a resource. 11. Choose Start deployment. Deploy a configuration (commandline) The following procedure describes how to use the AWS CLI (on Linux or Windows) or AWS Tools for PowerShell to deploy an AWS AppConfig configuration. To deploy a configuration step by step 1. Open the AWS CLI. 2. Run the following command to deploy a configuration. Linux aws appconfig start-deployment \ --application-id The_application_ID \ --environment-id The_environment_ID \ --deployment-strategy-id The_deployment_strategy_ID \ --configuration-profile-id The_configuration_profile_ID \ --configuration-version The_configuration_version_to_deploy \ --description A_description_of_the_deployment \ --tags User_defined_key_value_pair_metadata_of_the_deployment Deploy a configuration (commandline) 89 AWS AppConfig Windows User Guide aws appconfig start-deployment ^ --application-id The_application_ID ^ --environment-id The_environment_ID ^ --deployment-strategy-id The_deployment_strategy_ID ^ --configuration-profile-id The_configuration_profile_ID ^ --configuration-version The_configuration_version_to_deploy ^ --description A_description_of_the_deployment ^ --tags User_defined_key_value_pair_metadata_of_the_deployment PowerShell Start-APPCDeployment ` -ApplicationId The_application_ID ` -ConfigurationProfileId The_configuration_profile_ID ` -ConfigurationVersion The_configuration_version_to_deploy ` -DeploymentStrategyId The_deployment_strategy_ID ` -Description A_description_of_the_deployment ` -EnvironmentId The_environment_ID ` -Tag Hashtable_type_user_defined_key_value_pair_metadata_of_the_deployment The system returns information like the following. Linux { "ApplicationId": "The ID of the application that was deployed", "EnvironmentId" : "The ID of the environment", "DeploymentStrategyId": "The ID of the deployment strategy that was deployed", "ConfigurationProfileId": "The ID of the configuration profile that was deployed", "DeploymentNumber": The sequence number of the deployment, "ConfigurationName": "The name of the configuration", "ConfigurationLocationUri": "Information about the source location of the configuration", "ConfigurationVersion": "The configuration version that was deployed", "Description": "The description of the deployment", "DeploymentDurationInMinutes": Total amount of time the deployment lasted, Deploy a configuration (commandline) 90 AWS AppConfig User Guide "GrowthType": "The linear or exponential algorithm used to define how percentage grew over time", "GrowthFactor": The percentage of targets to receive a deployed configuration during each interval, "FinalBakeTimeInMinutes": Time AWS AppConfig monitored for alarms before considering the deployment to be complete, "State": "The state of the deployment", "EventLog": [ { "Description": "A description of the deployment event", "EventType": "The type of deployment event", "OccurredAt": The date and time the event occurred, "TriggeredBy": "The entity that triggered the deployment event" } ], "PercentageComplete": The percentage of targets for which the deployment is available, "StartedAt": The time the deployment started, "CompletedAt": The time the deployment completed } Windows { "ApplicationId": "The ID of the application that was deployed", "EnvironmentId" : "The ID of the environment", "DeploymentStrategyId": "The ID of the deployment strategy that was deployed", "ConfigurationProfileId": "The ID of the configuration profile that was deployed", "DeploymentNumber": The sequence number of the deployment, "ConfigurationName": "The name of the configuration", "ConfigurationLocationUri": "Information about the source location of the configuration", "ConfigurationVersion": "The configuration version that was deployed", "Description": "The description of the deployment", "DeploymentDurationInMinutes": Total amount of time the deployment lasted, "GrowthType": "The linear or exponential algorithm used to define how percentage grew over time", "GrowthFactor": The percentage of targets to receive a deployed configuration during each interval, Deploy a configuration (commandline) 91 AWS AppConfig User Guide "FinalBakeTimeInMinutes": Time AWS AppConfig monitored for alarms before considering the deployment to be complete, "State": "The state of the deployment", "EventLog": [ { "Description": "A description of the deployment event", "EventType": "The type of deployment event", "OccurredAt": The date and time the event occurred, "TriggeredBy": "The entity that triggered the deployment event" } ], "PercentageComplete": The percentage of targets for which the deployment is available, "StartedAt": The time the deployment started, "CompletedAt": The time the deployment completed } PowerShell ApplicationId : The ID of the application that was deployed CompletedAt : The time the deployment completed ConfigurationLocationUri : Information about the source location of the configuration ConfigurationName : The name of the configuration ConfigurationProfileId : The ID of
appconfig-ug-028
appconfig-ug.pdf
28
the deployment", "EventLog": [ { "Description": "A description of the deployment event", "EventType": "The type of deployment event", "OccurredAt": The date and time the event occurred, "TriggeredBy": "The entity that triggered the deployment event" } ], "PercentageComplete": The percentage of targets for which the deployment is available, "StartedAt": The time the deployment started, "CompletedAt": The time the deployment completed } PowerShell ApplicationId : The ID of the application that was deployed CompletedAt : The time the deployment completed ConfigurationLocationUri : Information about the source location of the configuration ConfigurationName : The name of the configuration ConfigurationProfileId : The ID of the configuration profile that was deployed ConfigurationVersion : The configuration version that was deployed ContentLength : Runtime of the deployment DeploymentDurationInMinutes : Total amount of time the deployment lasted DeploymentNumber : The sequence number of the deployment DeploymentStrategyId : The ID of the deployment strategy that was deployed Description : The description of the deployment EnvironmentId : The ID of the environment that was deployed EventLog : {Description : A description of the deployment event, EventType : The type of deployment event, OccurredAt : The date and time the event occurred, TriggeredBy : The entity that triggered the deployment event} FinalBakeTimeInMinutes : Time AWS AppConfig monitored for alarms before considering the deployment to be complete Deploy a configuration (commandline) 92 AWS AppConfig User Guide GrowthFactor : The percentage of targets to receive a deployed configuration during each interval GrowthType : The linear or exponential algorithm used to define how percentage grew over time HttpStatusCode : HTTP Status of the runtime PercentageComplete : The percentage of targets for which the deployment is available ResponseMetadata : Runtime Metadata StartedAt : The time the deployment started State : The state of the deployment Deploying AWS AppConfig configurations using CodePipeline AWS AppConfig is an integrated deploy action for AWS CodePipeline (CodePipeline). CodePipeline is a fully managed continuous delivery service that helps you automate your release pipelines for fast and reliable application and infrastructure updates. CodePipeline automates the build, test, and deploy phases of your release process every time there is a code change, based on the release model you define. For more information, see What is AWS CodePipeline? The integration of AWS AppConfig with CodePipeline offers the following benefits: • Customers who use CodePipeline to manage orchestration now have a lightweight means of deploying configuration changes to their applications without having to deploy their entire code base. • Customers who want to use AWS AppConfig to manage configuration deployments but are limited because AWS AppConfig does not support their current code or configuration store, now have additional options. CodePipeline supports AWS CodeCommit, GitHub, and BitBucket (to name a few). Note AWS AppConfig integration with CodePipeline is only supported in AWS Regions where CodePipeline is available. Deploying with CodePipeline 93 AWS AppConfig How integration works User Guide You start by setting up and configuring CodePipeline. This includes adding your configuration to a CodePipeline-supported code store. Next, you set up your AWS AppConfig environment by performing the following tasks: • Create a namespace and a configuration profile • Choose a predefined deployment strategy or create your own After you complete these tasks, you create a pipeline in CodePipeline that specifies AWS AppConfig as the deploy provider. You can then make a change to your configuration and upload it to your CodePipeline code store. Uploading the new configuration automatically starts a new deployment in CodePipeline. After the deployment completes, you can verify your changes. For information about creating a pipeline that specifies AWS AppConfig as the deploy provider, see Tutorial: Create a Pipeline That Uses AWS AppConfig as a Deployment Provider in the AWS CodePipeline User Guide. Reverting a configuration During a deployment, you can mitigate situations where malformed or incorrect configuration data causes errors in your application by using automatic rollbacks (if an alarm triggers during a deployment) or by reverting the configuration data to the previous version (if a deployment successfully completed). For automatic rollbacks, you can use a combination of AWS AppConfig deployment strategies and Amazon CloudWatch alarms. Once configured, if one or more CloudWatch alarms go into the ALARM state during a deployment, AWS AppConfig automatically rolls back your configuration data to the previous version, thereby preventing application outages or errors. To get started, see (Recommended) Configure permissions for automatic rollback. Note You can also roll back a configuration by calling the StopDeployment API operation while a deployment is still in progress. For deployments that successfully complete, AWS AppConfig also supports reverting configuration data to a previous version by using the AllowRevert parameter with the StopDeployment API How integration works 94 AWS AppConfig User Guide operation. For some customers, reverting to a previous configuration after a successful deployment guarantees the data will be the same as it was before the deployment. Reverting also
appconfig-ug-029
appconfig-ug.pdf
29
previous version, thereby preventing application outages or errors. To get started, see (Recommended) Configure permissions for automatic rollback. Note You can also roll back a configuration by calling the StopDeployment API operation while a deployment is still in progress. For deployments that successfully complete, AWS AppConfig also supports reverting configuration data to a previous version by using the AllowRevert parameter with the StopDeployment API How integration works 94 AWS AppConfig User Guide operation. For some customers, reverting to a previous configuration after a successful deployment guarantees the data will be the same as it was before the deployment. Reverting also ignores alarm monitors, which may prevent a roll forward from progressing during an application emergency. Important If you call StopDeployment with the AllowRevert parameter enabled, AWS AppConfig will revert the deployment only if the deployment succeeded within the last 72 hours. After 72 hours, the deployment can no longer be reverted. You must create a new deployment. Here's a breakdown of the StopDeployment functionality based on different situations. 1. If StopDeployment is called on an in-progress deployment, the resulting deployment state will be ROLLED_BACK. 2. If StopDeployment (with AllowRevert) is called on an in-progress deployment, the resulting deployment state will be ROLLED_BACK. 3. If StopDeployment is called on a completed deployment, a BadRequestException will be thrown. 4. If StopDeployment (with AllowRevert) is called on a completed deployment, the resulting deployment state will be REVERTED. 5. If StopDeployment (with AllowRevert) is called on a completed deployment after 72 hours, a BadRequestException will be thrown. You can use the AWS CLI to call the StopDeployment operation with the AllowRevert parameter. Here's an example AWS CLI command that includes the AllowRevert parameter. aws appconfig stop-deployment \ --application-id 339ohji \ --environment-id 54j1r29 \ --deployment-number 2 \ --allow-revert Reverting a configuration 95 AWS AppConfig User Guide Retrieving feature flags and configuration data in AWS AppConfig Your application retrieves feature flags and free form configuration data by establishing a configuration session using the AWS AppConfig Data service. We recommended you use AWS AppConfig Agent to retrieve configuration data. The agent (or the AWS AppConfig Agent Lambda extension for Lambda compute environments) manages a series of API calls and session tokens on your behalf. From a high level, the process works as follows: 1. You configure AWS AppConfig Agent as a local host and have the agent poll AWS AppConfig for configuration updates. 2. The agent calls the StartConfigurationSession and GetLatestConfiguration API actions and caches your configuration data locally. 3. To retrieve the data, your application makes an HTTP call to the localhost server. AWS AppConfig Agent supports several use cases, as described in How to use AWS AppConfig Agent to retrieve configuration data. If you prefer, you can manually call these API actions to retrieve a configuration. The API process works as follows: 1. Your application establishes a configuration session using the StartConfigurationSession API action. Your session's client then makes periodic calls to GetLatestConfiguration to check for and retrieve the latest data available. 2. When calling StartConfigurationSession, your code sends identifiers (ID or name) of an AWS AppConfig application, environment, and configuration profile that the session tracks. 3. In response, AWS AppConfig provides an InitialConfigurationToken to be given to the session's client and used the first time it calls GetLatestConfiguration for that session. 4. When calling GetLatestConfiguration, your client code sends the most recent ConfigurationToken value it has and receives in response: • NextPollConfigurationToken: the ConfigurationToken value to use on the next call to GetLatestConfiguration. • The configuration: the latest data intended for the session. This may be empty if the client already has the latest version of the configuration. 96 AWS AppConfig Contents • What is AWS AppConfig Agent? • How to use AWS AppConfig Agent to retrieve configuration data • AWS AppConfig browser and mobile use considerations • Retrieving configuration data without AWS AppConfig Agent What is AWS AppConfig Agent? User Guide AWS AppConfig Agent is an Amazon-developed and managed process for retrieving configuration data from AWS AppConfig. With the agent, you can cache configuration data locally and asynchronously poll the AWS AppConfig data plane service for updates. This caching/polling process ensures that your configuration data is always available for your application while minimizing latency and cost. The agent is not the only way to retrieve configuration data from AWS AppConfig, but it is the recommended way. The agent enhances application processing and management in the following ways: • The agent calls AWS AppConfig on your behalf by using an AWS Identity and Access Management (IAM) principal and managing a local cache of configuration data. By retrieving configuration data from the local cache, your application requires fewer code updates to manage configuration data, retrieves configuration data in milliseconds, and isn't affected by network issues that can disrupt calls for such data. • The agent
appconfig-ug-030
appconfig-ug.pdf
30
latency and cost. The agent is not the only way to retrieve configuration data from AWS AppConfig, but it is the recommended way. The agent enhances application processing and management in the following ways: • The agent calls AWS AppConfig on your behalf by using an AWS Identity and Access Management (IAM) principal and managing a local cache of configuration data. By retrieving configuration data from the local cache, your application requires fewer code updates to manage configuration data, retrieves configuration data in milliseconds, and isn't affected by network issues that can disrupt calls for such data. • The agent offers a native experience for retrieving and resolving AWS AppConfig feature flags. • Out of the box, the agent provides best practices for caching strategies, polling intervals, and availability of local configuration data while tracking the configuration tokens needed for subsequent service calls. • While running in the background, the agent periodically polls the AWS AppConfig data plane service for configuration data updates. Your application can retrieve the data by connecting to localhost on port 2772 (a customizable default port value) and calling HTTP GET to retrieve the data. Note AWS AppConfig Agent caches data the first time the service retrieves your configuration data. For this reason, the first call to retrieve data is slower than subsequent calls. What is AWS AppConfig Agent? 97 AWS AppConfig User Guide The following diagram shows how AWS AppConfig Agent works. 1. Your application requests configuration data from the agent. 2. The agent returns data from an in-memory cache. 3. The agent asynchronously polls the AWS AppConfig service for the latest configuration data on a predefined cadence. The latest configuration data is always stored in a cache in memory. How to use AWS AppConfig Agent to retrieve configuration data The AWS AppConfig Agent is the recommended method for retrieving AWS AppConfig feature flags or free form configuration data. The agent is supported on all forms of AWS Compute including Amazon EC2, Amazon ECS, Amazon EKS, and Lambda. After you complete the initial agent set up, using the agent to retrieve configuration data is simpler than directly calling AWS How to use AWS AppConfig Agent to retrieve configuration data 98 AWS AppConfig User Guide AppConfig APIs. The agent automatically implements best practices and may lower your cost of using AWS AppConfig as a result of fewer API calls to retrieve configurations. Topics • Using AWS AppConfig Agent with AWS Lambda • Using AWS AppConfig Agent with Amazon EC2 and on-premises machines • Using AWS AppConfig Agent with Amazon ECS and Amazon EKS • Retrieving basic and multi-variant feature flags • Using a manifest to enable additional retrieval features • Configuring AWS AppConfig Agent to retrieve configurations from multiple accounts • Configuring AWS AppConfig Agent to write configuration copies to disk • Generating a client using the OpenAPI specification • Working with AWS AppConfig Agent local development mode Using AWS AppConfig Agent with AWS Lambda An AWS Lambda extension is a companion process that augments the capabilities of a Lambda function. An extension can start before a function is invoked, run in parallel with a function, and continue to run after a function invocation is processed. In essence, a Lambda extension is like a client that runs in parallel to a Lambda invocation. This parallel client can interface with your function at any point during its lifecycle. If you use AWS AppConfig feature flags or other dynamic configuration data in a Lambda function, then we recommend that you add the AWS AppConfig Agent Lambda extension as a layer to your Lambda function. This makes calling feature flags simpler, and the extension itself includes best practices that simplify using AWS AppConfig while reducing costs. Reduced costs result from fewer API calls to the AWS AppConfig service and shorter Lambda function processing times. For more information about Lambda extensions, see Lambda extensions in the AWS Lambda Developer Guide. Note AWS AppConfig pricing is based on the number of times a configuration is called and received. Your costs increase if your Lambda performs multiple cold starts and retrieves new configuration data frequently. Using AWS AppConfig Agent with AWS Lambda 99 AWS AppConfig Topics User Guide • Understanding how the AWS AppConfig Agent Lambda extension works • Adding the AWS AppConfig Agent Lambda extension • Configuring the AWS AppConfig Agent Lambda extension • Understanding available versions of the AWS AppConfig Agent Lambda extension Understanding how the AWS AppConfig Agent Lambda extension works If you use AWS AppConfig to manage configurations for a Lambda function without Lambda extensions, then you must configure your Lambda function to receive configuration updates by integrating with the StartConfigurationSession and GetLatestConfiguration API actions. Integrating the AWS AppConfig Agent Lambda extension with your Lambda function simplifies this process. The extension takes care of calling the AWS AppConfig
appconfig-ug-031
appconfig-ug.pdf
31
AWS AppConfig Agent Lambda extension works • Adding the AWS AppConfig Agent Lambda extension • Configuring the AWS AppConfig Agent Lambda extension • Understanding available versions of the AWS AppConfig Agent Lambda extension Understanding how the AWS AppConfig Agent Lambda extension works If you use AWS AppConfig to manage configurations for a Lambda function without Lambda extensions, then you must configure your Lambda function to receive configuration updates by integrating with the StartConfigurationSession and GetLatestConfiguration API actions. Integrating the AWS AppConfig Agent Lambda extension with your Lambda function simplifies this process. The extension takes care of calling the AWS AppConfig service, managing a local cache of retrieved data, tracking the configuration tokens needed for the next service calls, and periodically checking for configuration updates in the background. The following diagram shows how it works. Using AWS AppConfig Agent with AWS Lambda 100 AWS AppConfig User Guide 1. You configure the AWS AppConfig Agent Lambda extension as a layer of your Lambda function. 2. To access its configuration data, your function calls the AWS AppConfig extension at an HTTP endpoint running on localhost:2772. 3. The extension maintains a local cache of the configuration data. If the data isn't in the cache, the extension calls AWS AppConfig to get the configuration data. 4. Upon receiving the configuration from the service, the extension stores it in the local cache and passes it to the Lambda function. 5. AWS AppConfig Agent Lambda extension periodically checks for updates to your configuration data in the background. Each time your Lambda function is invoked, the extension checks the elapsed time since it retrieved a configuration. If the elapsed time is greater than the configured poll interval, the extension calls AWS AppConfig to check for newly deployed data, updates the local cache if there has been a change, and resets the elapsed time. Using AWS AppConfig Agent with AWS Lambda 101 AWS AppConfig Note User Guide • Lambda instantiates separate instances corresponding to the concurrency level that your function requires. Each instance is isolated and maintains its own local cache of your configuration data. For more information about Lambda instances and concurrency, see Managing concurrency for a Lambda function. • The amount of time it takes for a configuration change to appear in a Lambda function, after you deploy an updated configuration from AWS AppConfig, depends on the deployment strategy you used for the deployment and the polling interval you configured for the extension. Adding the AWS AppConfig Agent Lambda extension To use the AWS AppConfig Agent Lambda extension, you need to add the extension to your Lambda. This can be done by adding the AWS AppConfig Agent Lambda extension to your Lambda function as a layer or by enabling the extension on a Lambda function as a container image. Note The AWS AppConfig extension is runtime agnostic and supports all runtimes. Before you begin Before you enable the AWS AppConfig Agent Lambda extension, do the following: • Organize the configurations in your Lambda function so that you can externalize them into AWS AppConfig. • Create AWS AppConfig artifacts and configuration data, including feature flags or freeform configuration data. For more information, see Creating feature flags and free form configuration data in AWS AppConfig. • Add appconfig:StartConfigurationSession and appconfig:GetLatestConfiguration to the AWS Identity and Access Management (IAM) policy used by the Lambda function execution role. For more information, see AWS Lambda execution role in the AWS Lambda Developer Guide. For more information about AWS AppConfig Using AWS AppConfig Agent with AWS Lambda 102 AWS AppConfig User Guide permissions, see Actions, resources, and condition keys for AWS AppConfig in the Service Authorization Reference. Adding the AWS AppConfig Agent Lambda extension by using a layer and an ARN To use the AWS AppConfig Agent Lambda extension, you add the extension to your Lambda function as a layer. For information about how to add a layer to your function, see Configuring extensions in the AWS Lambda Developer Guide. The name of the extension in the AWS Lambda console is AWS-AppConfig-Extension. Also note that when you add the extension as a layer to your Lambda, you must specify an Amazon Resource Name (ARN). Choose an ARN from one of the following lists that corresponds with the platform and AWS Region where you created the Lambda. • x86-64 platform • ARM64 platform If you want to test the extension before you add it to your function, you can verify that it works by using the following code example. import urllib.request def lambda_handler(event, context): url = f'http://localhost:2772/applications/application_name/ environments/environment_name/configurations/configuration_name' config = urllib.request.urlopen(url).read() return config To test it, create a new Lambda function for Python, add the extension, and then run the Lambda function. After you run the Lambda function, the AWS AppConfig Lambda function returns the configuration you specified for the http://localhost:2772 path. For information
appconfig-ug-032
appconfig-ug.pdf
32
that corresponds with the platform and AWS Region where you created the Lambda. • x86-64 platform • ARM64 platform If you want to test the extension before you add it to your function, you can verify that it works by using the following code example. import urllib.request def lambda_handler(event, context): url = f'http://localhost:2772/applications/application_name/ environments/environment_name/configurations/configuration_name' config = urllib.request.urlopen(url).read() return config To test it, create a new Lambda function for Python, add the extension, and then run the Lambda function. After you run the Lambda function, the AWS AppConfig Lambda function returns the configuration you specified for the http://localhost:2772 path. For information about creating a Lambda function, see Create a Lambda function with the console in the AWS Lambda Developer Guide. Important You can view log data for the AWS AppConfig Agent Lambda extension in the AWS Lambda logs. Log entries are prefaced with appconfig agent. Here's an example. Using AWS AppConfig Agent with AWS Lambda 103 AWS AppConfig User Guide [appconfig agent] 2024/05/07 04:19:01 ERROR retrieve failure for 'SourceEventConfig:SourceEventConfigEnvironment:SourceEventConfigProfile': StartConfigurationSession: api error AccessDenied: User: arn:aws:sts::0123456789:assumed-role/us-east-1-LambdaRole/ extension1 is not authorized to perform: sts:AssumeRole on resource: arn:aws:iam::0123456789:role/test1 (retry in 60s) Configuring the AWS AppConfig Agent Lambda extension You can configure the extension by changing the following AWS Lambda environment variables. For more information, see Using AWS Lambda environment variables in the AWS Lambda Developer Guide. Prefetching configuration data The environment variable AWS_APPCONFIG_EXTENSION_PREFETCH_LIST can improve the start- up time of your function. When the AWS AppConfig Agent Lambda extension is initialized, it retrieves the specified configuration from AWS AppConfig before Lambda starts to initialize your function and invoke your handler. In some cases, the configuration data is already available in the local cache before your function requests it. To use the prefetch capability, set the value of the environment variable to the path corresponding to your configuration data. For example, if your configuration corresponds to an application, environment, and configuration profile respectively named "my_application", "my_environment", and "my_configuration_data", the path would be /applications/my_application/ environments/my_environment/configurations/my_configuration_data. You can specify multiple configuration items by listing them as a comma-separated list (If you have a resource name that includes a comma, use the resource’s ID value instead of its name). Accessing configuration data from another account The AWS AppConfig Agent Lambda extension can retrieve configuration data from another account by specifying an IAM role that grants permissions to the data. To set this up, follow these steps: 1. In the account where AWS AppConfig is used to manage the configuration data, create a role with a trust policy that grants the account running the Lambda function access to the appconfig:StartConfigurationSession and appconfig:GetLatestConfiguration Using AWS AppConfig Agent with AWS Lambda 104 AWS AppConfig User Guide actions, along with the partial or complete ARNs corresponding to the AWS AppConfig configuration resources. 2. In the account running the Lambda function, add the AWS_APPCONFIG_EXTENSION_ROLE_ARN environment variable to the Lambda function with the ARN of the role created in step 1. 3. (Optional) If needed, an external ID can be specified using the AWS_APPCONFIG_EXTENSION_ROLE_EXTERNAL_ID environment variable. Similarly, a session name can be configured using the AWS_APPCONFIG_EXTENSION_ROLE_SESSION_NAME environment variable. Note Note the following information. • The AWS AppConfig Agent Lambda extension can only retrieve data from one account. If you specify an IAM role, the extension will not be able to retrieve configuration data from the account in which the Lambda function is running. • AWS Lambda logs information about the AWS AppConfig Agent Lambda extension and the Lambda function by using Amazon CloudWatch Logs. • The following table includes a Sample values column. Depending on your monitor resolution, you might need to scroll to the bottom of the table and then scroll to the right to view the column. Environment variable AWS_APPCO NFIG_EXTE NSION_HTT P_PORT AWS_APPCO NFIG_EXTE Details Default value Sample values 2772 2772 This environment variable specifies the port on which the local HTTP server that hosts the extension runs. This environment variable specifies the level of detail that info trace debug Using AWS AppConfig Agent with AWS Lambda 105 AWS AppConfig Environment variable NSION_LOG _LEVEL AWS_APPCO NFIG_EXTE NSION_MAX _CONNECTIONS Details Default value Sample values User Guide info warn error fatal none 3 3 the agent logs. Each level includes the current level and all higher levels. The value is case insensiti ve. From most to least detailed, the log levels are: trace, debug, info, warn, error, fatal, and none. The trace log includes detailed informati on, including timing information, about the agent. This environment variable configure s the maximum number of connectio ns the extension uses to retrieve configura tions from AWS AppConfig. Using AWS AppConfig Agent with AWS Lambda 106 AWS AppConfig Environment variable AWS_APPCO NFIG_EXTE NSION_POL L_INTERVA L_SECONDS Details Default value Sample values User Guide 45 45s 5m 1h This environment variable controls how 45 often the agent polls AWS
appconfig-ug-033
appconfig-ug.pdf
33
and all higher levels. The value is case insensiti ve. From most to least detailed, the log levels are: trace, debug, info, warn, error, fatal, and none. The trace log includes detailed informati on, including timing information, about the agent. This environment variable configure s the maximum number of connectio ns the extension uses to retrieve configura tions from AWS AppConfig. Using AWS AppConfig Agent with AWS Lambda 106 AWS AppConfig Environment variable AWS_APPCO NFIG_EXTE NSION_POL L_INTERVA L_SECONDS Details Default value Sample values User Guide 45 45s 5m 1h This environment variable controls how 45 often the agent polls AWS AppConfig for updated configura tion data. You can specify a number of seconds for the interval. You can also specify a number with a time unit: s for seconds, m for minutes, and h for hours. If a unit isn't specified, the agent defaults to seconds. For example, 60, 60s, and 1m result in the same poll interval. Using AWS AppConfig Agent with AWS Lambda 107 AWS AppConfig Environment variable AWS_APPCO NFIG_EXTE NSION_POL L_TIMEOUT _MILLIS Details Default value Sample values User Guide 3000ms 3000 300ms 5s This environment variable controls the maximum amount of time, in milliseco nds, the extension waits for a response from AWS AppConfig when refreshing data in the cache. If AWS AppConfig does not respond in the specified amount of time, the extension skips this poll interval and returns the previously updated cached data. Using AWS AppConfig Agent with AWS Lambda 108 AWS AppConfig Environment variable AWS_APPCO NFIG_EXTE NSION_PRE FETCH_LIST AWS_APPCO NFIG_EXTE NSION_PRO XY_HEADERS Details Default value Sample values User Guide None MyApp:MyE nv:MyConfig abcd123:efgh456:ij kl789 MyApp:MyEnv:Config 1,MyApp:MyEnv:Conf ig2 None header: value h1: v1, h2: v2 This environment variable specifies the configuration data the agent requests from AWS AppConfig as soon as it starts. Multiple configura tion identifiers may be provided in a comma-separated list. Prefetching configuration data from AWS AppConfig can reduce the cold start time of your function significantly. This environment variable specifies headers required by the proxy reference d in the AWS_APPCO NFIG_EXTE NSION_PRO XY_URL environme nt variable. The value is a comma-separated list of headers. Using AWS AppConfig Agent with AWS Lambda 109 AWS AppConfig Environment variable AWS_APPCO NFIG_EXTE NSION_PRO XY_URL AWS_APPCO NFIG_EXTE NSION_ROLE_ARN AWS_APPCO NFIG_EXTE NSION_ROL E_EXTERNAL_ID AWS_APPCO NFIG_EXTE NSION_ROL E_SESSION_NAME Details Default value Sample values User Guide None http://localhost:7474 https://my-proxy.e xample.com None arn:aws:iam::12345 6789012:role/MyRole None MyExternalId None AWSAppCon figAgentSession This environment variable specifies the proxy URL to use for connections from the AWS AppConfig extension to AWS services. HTTPS and HTTP URLs are supported. This environment variable specifies the IAM role ARN corresponding to a role that should be assumed by the AWS AppConfig extension to retrieve configura tion. This environment variable specifies the external id to use in conjunction with the assumed role ARN. This environment variable specifies the session name to be associated with the credentials for the assumed IAM role. Using AWS AppConfig Agent with AWS Lambda 110 AWS AppConfig Environment variable AWS_APPCO NFIG_EXTE NSION_SER VICE_REGION Details Default value Sample values User Guide None us-east-1 eu-west-1 This environment variable specifies an alternative Region the extension should use to call the AWS AppConfig service. When undefined, the extension uses the endpoint in the current Region. When using AWS AppConfig configura tion as manifest: MyApp:MyE nv:MyMani festConfig . When loading manifest from disk: file:/path/to/ manifest.json AWS_APPCO NFIG_EXTE This environment variable configure None NSION_MANIFEST s AWS AppConfig Agent to take advantage of additional per-confi guration features like multi-account retrievals and save configuration to disk. For more information about these features, see Using a manifest to enable additional retrieval features. This environment variable configure s AWS AppConfig Agent to wait until the manifest is processed before completing startup. AWS_APPCO NFIG_EXTE NSION_WAI T_ON_MANIFEST true true false Using AWS AppConfig Agent with AWS Lambda 111 AWS AppConfig User Guide Understanding available versions of the AWS AppConfig Agent Lambda extension This topic includes information about AWS AppConfig Agent Lambda extension versions. The AWS AppConfig Agent Lambda extension supports Lambda functions developed for the x86-64 and ARM64 (Graviton2) platforms. To work properly, your Lambda function must be configured to use the specific Amazon Resource Name (ARN) for the AWS Region where it is currently hosted. You can view AWS Region and ARN details later in this section. Important Note the following important details about the AWS AppConfig Agent Lambda extension. • The GetConfiguration API action was deprecated on January 28, 2022. Calls to receive configuration data should use the StartConfigurationSession and GetLatestConfiguration APIs instead. If you are using a version of the AWS AppConfig Agent Lambda extension created before January 28, 2022, you might have to configure permission to the new APIs. For more information, see Retrieving configuration data without AWS AppConfig Agent. • AWS AppConfig supports all of the versions listed in Older extension
appconfig-ug-034
appconfig-ug.pdf
34
You can view AWS Region and ARN details later in this section. Important Note the following important details about the AWS AppConfig Agent Lambda extension. • The GetConfiguration API action was deprecated on January 28, 2022. Calls to receive configuration data should use the StartConfigurationSession and GetLatestConfiguration APIs instead. If you are using a version of the AWS AppConfig Agent Lambda extension created before January 28, 2022, you might have to configure permission to the new APIs. For more information, see Retrieving configuration data without AWS AppConfig Agent. • AWS AppConfig supports all of the versions listed in Older extension versions. We recommend that you periodically update to the latest version to take advantage of extension enhancements. Topics • AWS AppConfig Agent Lambda Extension release notes • Finding your Lambda extension version number • x86-64 platform • ARM64 platform • Older extension versions AWS AppConfig Agent Lambda Extension release notes The following table describes changes made to recent versions of the AWS AppConfig Lambda extension. Using AWS AppConfig Agent with AWS Lambda 112 AWS AppConfig Version 2.0.1079 2.0.719 2.0.678 2.0.501 2.0.358 Launch date 12/12/2024 08/08/2024 07/23/2024 07/01/2024 12/01/2023 User Guide Notes Minor enhancements and bug fixes. Minor enhancements and bug fixes. Enhancements to support feature flag targets, variants, and splits. For more informati on, see Creating multi-variant feature flags. Minor enhancements and bug fixes. Added support for the following retrieval features: • Multi-account retrieval: Use AWS AppConfig Agent from a primary or retrieval AWS account to retrieve configuration data from multiple vendor accounts. • Write configuration copy to disk: Use AWS AppConfig Agent to write configura tion data to disk. This feature enables customers with applications that read configuration data from disk to integrate with AWS AppConfig. Using AWS AppConfig Agent with AWS Lambda 113 AWS AppConfig Version 2.0.181 Launch date 08/14/2023 2.0.165 02/21/2023 User Guide Notes Added support for the Israel (Tel Aviv) il-central-1 AWS Region. Minor bug fixes. No longer restricting extension use to specific runtime versions via the AWS Lambda console. Added support for the following AWS Regions: • Middle East (UAE), me- central-1 • Asia Pacific (Hyderabad), ap-south-2 • Asia Pacific (Melbourne), ap-southeast-4 • Europe (Spain), eu-south-2 • Europe (Zurich), eu-centra l-2 Using AWS AppConfig Agent with AWS Lambda 114 AWS AppConfig Version 2.0.122 Launch date 08/23/2022 2.0.58 05/03/2022 2.0.45 03/15/2022 User Guide Notes Added support for a tunneling proxy, which can be configured with the AWS_APPCONFIG_EXTE NSION_PROXY_URL and AWS_APPCONFIG_EXTE NSION_PROXY_HEADER S environment variables. Added .NET 6 as a runtime. For more information about environment variables, see Configuring the AWS AppConfig Agent Lambda extension. Improved support for Graviton2 (ARM64) processors in Lambda. Added support for calling a single feature flag. Previousl y, customers called feature flags grouped into a configura tion profile and had to parse the response client-side. With this release, customers can use a flag=<flag-name> parameter when calling the HTTP localhost endpoint to get the value of a single flag. Also added initial support for Graviton2 (ARM64) processor s. Using AWS AppConfig Agent with AWS Lambda 115 AWS AppConfig User Guide Finding your Lambda extension version number Use the following procedure to locate the version number of your currently configured AWS AppConfig Agent Lambda extension. To work properly, your Lambda function must be configured to use the specific Amazon Resource Name (ARN) for the AWS Region where it is currently hosted. 1. Sign in to the AWS Management Console and open the AWS Lambda console at https:// console.aws.amazon.com/lambda/. 2. Choose the Lambda function where you want to add the AWS-AppConfig-Extension layer. 3. 4. In the Layers section, choose Add a layer. In the Choose a layer section, choose AWS-AppConfig-Extension from the AWS layers list. 5. Use the Version list to choose a version number. 6. Choose Add. 7. Use the Test tab to test the function. 8. After the test completes, view the log output. Locate the AWS AppConfig Agent Lambda extension version in the Details of the Execution section. This version must match the required URLs for that version. x86-64 platform When you add the extension as a layer to your Lambda, you must specify an ARN. Choose an ARN from the following table that corresponds with the AWS Region where you created the Lambda. These ARNs are for Lambda functions developed for the x86-64 platform. Version 2.0.1079 Region US East (N. Virginia) US East (Ohio) ARN arn:aws:lambda:us-east-1:02 7255383542:layer:AWS-AppConfig- Extension:174 arn:aws:lambda:us-east-2:72 8743619870:layer:AWS-AppConfig- Extension:133 Using AWS AppConfig Agent with AWS Lambda 116 AWS AppConfig Region US West (N. California) US West (Oregon) Canada (Central) Canada West (Calgary) Europe (Frankfurt) Europe (Zurich) Europe (Ireland) Europe (London) Europe (Paris) User Guide ARN arn:aws:lambda:us-west-1:95 8113053741:layer:AWS-AppConfig- Extension:223 arn:aws:lambda:us-west-2:35 9756378197:layer:AWS-AppConfig- Extension:230 arn:aws:lambda:ca-central-1 :039592058896:layer:AWS-App Config-Extension:123 arn:aws:lambda:ca-west-1:43 6199621743:layer:AWS-AppConfig- Extension:27 arn:aws:lambda:eu-central-1 :066940009817:layer:AWS-App Config-Extension:159 arn:aws:lambda:eu-central-2 :758369105281:layer:AWS-App Config-Extension:77 arn:aws:lambda:eu-west-1:43 4848589818:layer:AWS-AppConfig- Extension:160 arn:aws:lambda:eu-west-2:28 2860088358:layer:AWS-AppConfig- Extension:121 arn:aws:lambda:eu-west-3:49 3207061005:layer:AWS-AppConfig- Extension:133 Using AWS AppConfig Agent with AWS Lambda
appconfig-ug-035
appconfig-ug.pdf
35
the Lambda. These ARNs are for Lambda functions developed for the x86-64 platform. Version 2.0.1079 Region US East (N. Virginia) US East (Ohio) ARN arn:aws:lambda:us-east-1:02 7255383542:layer:AWS-AppConfig- Extension:174 arn:aws:lambda:us-east-2:72 8743619870:layer:AWS-AppConfig- Extension:133 Using AWS AppConfig Agent with AWS Lambda 116 AWS AppConfig Region US West (N. California) US West (Oregon) Canada (Central) Canada West (Calgary) Europe (Frankfurt) Europe (Zurich) Europe (Ireland) Europe (London) Europe (Paris) User Guide ARN arn:aws:lambda:us-west-1:95 8113053741:layer:AWS-AppConfig- Extension:223 arn:aws:lambda:us-west-2:35 9756378197:layer:AWS-AppConfig- Extension:230 arn:aws:lambda:ca-central-1 :039592058896:layer:AWS-App Config-Extension:123 arn:aws:lambda:ca-west-1:43 6199621743:layer:AWS-AppConfig- Extension:27 arn:aws:lambda:eu-central-1 :066940009817:layer:AWS-App Config-Extension:159 arn:aws:lambda:eu-central-2 :758369105281:layer:AWS-App Config-Extension:77 arn:aws:lambda:eu-west-1:43 4848589818:layer:AWS-AppConfig- Extension:160 arn:aws:lambda:eu-west-2:28 2860088358:layer:AWS-AppConfig- Extension:121 arn:aws:lambda:eu-west-3:49 3207061005:layer:AWS-AppConfig- Extension:133 Using AWS AppConfig Agent with AWS Lambda 117 AWS AppConfig Region Europe (Stockholm) Europe (Milan) Europe (Spain) China (Beijing) China (Ningxia) Asia Pacific (Hong Kong) Asia Pacific (Tokyo) Asia Pacific (Seoul) Asia Pacific (Osaka) User Guide ARN arn:aws:lambda:eu-north-1:6 46970417810:layer:AWS-AppCo nfig-Extension:225 arn:aws:lambda:eu-south-1:2 03683718741:layer:AWS-AppCo nfig-Extension:111 arn:aws:lambda:eu-south-2:5 86093569114:layer:AWS-AppCo nfig-Extension:74 arn:aws-cn:lambda:cn-north- 1:615057806174:layer:AWS-Ap pConfig-Extension:106 arn:aws-cn:lambda:cn-northw est-1:615084187847:layer:AWS- AppConfig-Extension:104 arn:aws:lambda:ap-east-1:63 0222743974:layer:AWS-AppConfig- Extension:113 arn:aws:lambda:ap-northeast -1:980059726660:layer:AWS-A ppConfig-Extension:126 arn:aws:lambda:ap-northeast -2:826293736237:layer:AWS-A ppConfig-Extension:136 arn:aws:lambda:ap-northeast -3:706869817123:layer:AWS-A ppConfig-Extension:130 Using AWS AppConfig Agent with AWS Lambda 118 AWS AppConfig Region Asia Pacific (Singapore) Asia Pacific (Sydney) Asia Pacific (Jakarta) Asia Pacific (Melbourne) Asia Pacific (Malaysia) Asia Pacific (Mumbai) Asia Pacific (Hyderabad) South America (São Paulo) Africa (Cape Town) User Guide ARN arn:aws:lambda:ap-southeast -1:421114256042:layer:AWS-A ppConfig-Extension:134 arn:aws:lambda:ap-southeast -2:080788657173:layer:AWS-A ppConfig-Extension:165 arn:aws:lambda:ap-southeast -3:418787028745:layer:AWS-A ppConfig-Extension:121 arn:aws:lambda:ap-southeast -4:307021474294:layer:AWS-A ppConfig-Extension:49 arn:aws:lambda:ap-southeast -5:631746059939:layer:AWS-A ppConfig-Extension:26 arn:aws:lambda:ap-south-1:5 54480029851:layer:AWS-AppCo nfig-Extension:146 arn:aws:lambda:ap-south-2:4 89524808438:layer:AWS-AppCo nfig-Extension:75 arn:aws:lambda:sa-east-1:00 0010852771:layer:AWS-AppConfig- Extension:179 arn:aws:lambda:af-south-1:5 74348263942:layer:AWS-AppCo nfig-Extension:123 Using AWS AppConfig Agent with AWS Lambda 119 AWS AppConfig Region Israel (Tel Aviv) Middle East (UAE) Middle East (Bahrain) AWS GovCloud (US-East) AWS GovCloud (US-West) ARM64 platform User Guide ARN arn:aws:lambda:il-central-1 :895787185223:layer:AWS-App Config-Extension:52 arn:aws:lambda:me-central-1 :662846165436:layer:AWS-App Config-Extension:91 arn:aws:lambda:me-south-1:5 59955524753:layer:AWS-AppCo nfig-Extension:125 arn:aws-us-gov:lambda:us-gov- east-1:946561847325:layer:AWS- AppConfig-Extension:80 arn:aws-us-gov:lambda:us-gov- west-1:946746059096:layer:AWS- AppConfig-Extension:80 When you add the extension as a layer to your Lambda, you must specify an ARN. Choose an ARN from the following table that corresponds with the AWS Region where you created the Lambda. These ARNs are for Lambda functions developed for the ARM64 platform. Version 2.0.1079 Region US East (N. Virginia) ARN arn:aws:lambda:us-east-1:02 7255383542:layer:AWS-AppConfig- Extension-Arm64:107 Using AWS AppConfig Agent with AWS Lambda 120 AWS AppConfig Region US East (Ohio) US West (N. California) US West (Oregon) Canada (Central) Canada West (Calgary) Europe (Frankfurt) Europe (Zurich) Europe (Ireland) Europe (London) User Guide ARN arn:aws:lambda:us-east-2:72 8743619870:layer:AWS-AppConfig- Extension-Arm64:85 arn:aws:lambda:us-west-1:95 8113053741:layer:AWS-AppConfig- Extension-Arm64:100 arn:aws:lambda:us-west-2:35 9756378197:layer:AWS-AppConfig- Extension-Arm64:132 arn:aws:lambda:ca-central-1 :039592058896:layer:AWS-App Config-Extension-Arm64:43 arn:aws:lambda:ca-west-1:43 6199621743:layer:AWS-AppConfig- Extension-Arm64:18 arn:aws:lambda:eu-central-1 :066940009817:layer:AWS-App Config-Extension-Arm64:102 arn:aws:lambda:eu-central-2 :758369105281:layer:AWS-App Config-Extension-Arm64:35 arn:aws:lambda:eu-west-1:43 4848589818:layer:AWS-AppConfig- Extension-Arm64:98 arn:aws:lambda:eu-west-2:28 2860088358:layer:AWS-AppConfig- Extension-Arm64:73 Using AWS AppConfig Agent with AWS Lambda 121 AWS AppConfig Region Europe (Paris) Europe (Stockholm) Europe (Milan) Europe (Spain) Asia Pacific (Hong Kong) Asia Pacific (Tokyo) Asia Pacific (Seoul) Asia Pacific (Osaka) Asia Pacific (Singapore) User Guide ARN arn:aws:lambda:eu-west-3:49 3207061005:layer:AWS-AppConfig- Extension-Arm64:52 arn:aws:lambda:eu-north-1:6 46970417810:layer:AWS-AppCo nfig-Extension-Arm64:84 arn:aws:lambda:eu-south-1:2 03683718741:layer:AWS-AppCo nfig-Extension-Arm64:39 arn:aws:lambda:eu-south-2:5 86093569114:layer:AWS-AppCo nfig-Extension-Arm64:35 arn:aws:lambda:ap-east-1:63 0222743974:layer:AWS-AppConfig- Extension-Arm64:41 arn:aws:lambda:ap-northeast -1:980059726660:layer:AWS-A ppConfig-Extension-Arm64:79 arn:aws:lambda:ap-northeast -2:826293736237:layer:AWS-A ppConfig-Extension-Arm64:44 arn:aws:lambda:ap-northeast -3:706869817123:layer:AWS-A ppConfig-Extension-Arm64:45 arn:aws:lambda:ap-southeast -1:421114256042:layer:AWS-A ppConfig-Extension-Arm64:86 Using AWS AppConfig Agent with AWS Lambda 122 AWS AppConfig Region Asia Pacific (Sydney) Asia Pacific (Jakarta) Asia Pacific (Melbourne) Asia Pacific (Malaysia) Asia Pacific (Mumbai) Asia Pacific (Hyderabad) South America (São Paulo) Africa (Cape Town) Middle East (UAE) User Guide ARN arn:aws:lambda:ap-southeast -2:080788657173:layer:AWS-A ppConfig-Extension-Arm64:108 arn:aws:lambda:ap-southeast -3:418787028745:layer:AWS-A ppConfig-Extension-Arm64:58 arn:aws:lambda:ap-southeast -4:307021474294:layer:AWS-A ppConfig-Extension-Arm64:34 arn:aws:lambda:ap-southeast -5:631746059939:layer:AWS-A ppConfig-Extension-Arm64:1 arn:aws:lambda:ap-south-1:5 54480029851:layer:AWS-AppCo nfig-Extension-Arm64:88 arn:aws:lambda:ap-south-2:4 89524808438:layer:AWS-AppCo nfig-Extension-Arm64:33 arn:aws:lambda:sa-east-1:00 0010852771:layer:AWS-AppConfig- Extension-Arm64:67 arn:aws:lambda:af-south-1:5 74348263942:layer:AWS-AppCo nfig-Extension-Arm64:51 arn:aws:lambda:me-central-1 :662846165436:layer:AWS-App Config-Extension-Arm64:47 Using AWS AppConfig Agent with AWS Lambda 123 AWS AppConfig Region Middle East (Bahrain) Israel (Tel Aviv) China (Beijing) China (Ningxia) AWS GovCloud (US-East) AWS GovCloud (US-West) Older extension versions User Guide ARN arn:aws:lambda:me-south-1:5 59955524753:layer:AWS-AppCo nfig-Extension-Arm64:53 arn:aws:lambda:il-central-1 :895787185223:layer:AWS-App Config-Extension-Arm64:35 arn:aws-cn:lambda:cn-north- 1:615057806174:layer:AWS-Ap pConfig-Extension-Arm64:28 arn:aws-cn:lambda:cn-northw est-1:615084187847:layer:AWS- AppConfig-Extension-Arm64:26 arn:aws-us-gov:lambda:us-gov- east-1:946561847325:layer:AWS- AppConfig-Extension-Arm64:26 arn:aws-us-gov:lambda:us-gov- west-1:946746059096:layer:AWS- AppConfig-Extension-Arm64:26 This section lists the ARNs and AWS Regions for older versions of the AWS AppConfig Lambda extension. This list doesn't contain information for all previous versions of the AWS AppConfig Agent Lambda extension, but it will be updated when new versions are released. Topics • Older extension versions (x86-64 platform) • Older extension versions (ARM64 platform) Using AWS AppConfig Agent with AWS Lambda 124 AWS AppConfig User Guide Older extension versions (x86-64 platform) The following tables list ARNs and the AWS Regions for older versions of the AWS AppConfig Agent Lambda extension developed for the x86-64 platform. Date replaced by newer extension: 12/12/2024 Version 2.0.719 Region US East (N. Virginia) US East (Ohio) US West (N. California) US West (Oregon) Canada (Central) Canada West (Calgary) Europe (Frankfurt) ARN arn:aws:lambda:us-east-1:02 7255383542:layer:AWS-AppConfig- Extension:173 arn:aws:lambda:us-east-2:72 8743619870:layer:AWS-AppConfig- Extension:132 arn:aws:lambda:us-west-1:95 8113053741:layer:AWS-AppConfig- Extension:221 arn:aws:lambda:us-west-2:35 9756378197:layer:AWS-AppConfig- Extension:229 arn:aws:lambda:ca-central-1 :039592058896:layer:AWS-App Config-Extension:121 arn:aws:lambda:ca-west-1:43 6199621743:layer:AWS-AppConfig- Extension:27 arn:aws:lambda:eu-central-1 :066940009817:layer:AWS-App Config-Extension:158 Using AWS AppConfig Agent with AWS Lambda 125 AWS AppConfig Region Europe (Zurich) Europe (Ireland) Europe (London) Europe (Paris) Europe (Stockholm) Europe (Milan) Europe (Spain) China (Beijing) China (Ningxia) User Guide ARN arn:aws:lambda:eu-central-2 :758369105281:layer:AWS-App Config-Extension:75 arn:aws:lambda:eu-west-1:43 4848589818:layer:AWS-AppConfig- Extension:159 arn:aws:lambda:eu-west-2:28 2860088358:layer:AWS-AppConfig- Extension:120 arn:aws:lambda:eu-west-3:49 3207061005:layer:AWS-AppConfig- Extension:132 arn:aws:lambda:eu-north-1:6 46970417810:layer:AWS-AppCo nfig-Extension:224 arn:aws:lambda:eu-south-1:2 03683718741:layer:AWS-AppCo nfig-Extension:110 arn:aws:lambda:eu-south-2:5 86093569114:layer:AWS-AppCo nfig-Extension:72 arn:aws-cn:lambda:cn-north- 1:615057806174:layer:AWS-Ap pConfig-Extension:104 arn:aws-cn:lambda:cn-northw est-1:615084187847:layer:AWS- AppConfig-Extension:102 Using AWS AppConfig Agent with AWS Lambda 126 AWS AppConfig Region Asia Pacific (Hong Kong)
appconfig-ug-036
appconfig-ug.pdf
36
West (Calgary) Europe (Frankfurt) ARN arn:aws:lambda:us-east-1:02 7255383542:layer:AWS-AppConfig- Extension:173 arn:aws:lambda:us-east-2:72 8743619870:layer:AWS-AppConfig- Extension:132 arn:aws:lambda:us-west-1:95 8113053741:layer:AWS-AppConfig- Extension:221 arn:aws:lambda:us-west-2:35 9756378197:layer:AWS-AppConfig- Extension:229 arn:aws:lambda:ca-central-1 :039592058896:layer:AWS-App Config-Extension:121 arn:aws:lambda:ca-west-1:43 6199621743:layer:AWS-AppConfig- Extension:27 arn:aws:lambda:eu-central-1 :066940009817:layer:AWS-App Config-Extension:158 Using AWS AppConfig Agent with AWS Lambda 125 AWS AppConfig Region Europe (Zurich) Europe (Ireland) Europe (London) Europe (Paris) Europe (Stockholm) Europe (Milan) Europe (Spain) China (Beijing) China (Ningxia) User Guide ARN arn:aws:lambda:eu-central-2 :758369105281:layer:AWS-App Config-Extension:75 arn:aws:lambda:eu-west-1:43 4848589818:layer:AWS-AppConfig- Extension:159 arn:aws:lambda:eu-west-2:28 2860088358:layer:AWS-AppConfig- Extension:120 arn:aws:lambda:eu-west-3:49 3207061005:layer:AWS-AppConfig- Extension:132 arn:aws:lambda:eu-north-1:6 46970417810:layer:AWS-AppCo nfig-Extension:224 arn:aws:lambda:eu-south-1:2 03683718741:layer:AWS-AppCo nfig-Extension:110 arn:aws:lambda:eu-south-2:5 86093569114:layer:AWS-AppCo nfig-Extension:72 arn:aws-cn:lambda:cn-north- 1:615057806174:layer:AWS-Ap pConfig-Extension:104 arn:aws-cn:lambda:cn-northw est-1:615084187847:layer:AWS- AppConfig-Extension:102 Using AWS AppConfig Agent with AWS Lambda 126 AWS AppConfig Region Asia Pacific (Hong Kong) Asia Pacific (Tokyo) Asia Pacific (Seoul) Asia Pacific (Osaka) Asia Pacific (Singapore) Asia Pacific (Sydney) Asia Pacific (Jakarta) Asia Pacific (Melbourne) Asia Pacific (Malaysia) User Guide ARN arn:aws:lambda:ap-east-1:63 0222743974:layer:AWS-AppConfig- Extension:112 arn:aws:lambda:ap-northeast -1:980059726660:layer:AWS-A ppConfig-Extension:125 arn:aws:lambda:ap-northeast -2:826293736237:layer:AWS-A ppConfig-Extension:135 arn:aws:lambda:ap-northeast -3:706869817123:layer:AWS-A ppConfig-Extension:129 arn:aws:lambda:ap-southeast -1:421114256042:layer:AWS-A ppConfig-Extension:132 arn:aws:lambda:ap-southeast -2:080788657173:layer:AWS-A ppConfig-Extension:164 arn:aws:lambda:ap-southeast -3:418787028745:layer:AWS-A ppConfig-Extension:120 arn:aws:lambda:ap-southeast -4:307021474294:layer:AWS-A ppConfig-Extension:48 arn:aws:lambda:ap-southeast -5:631746059939:layer:AWS-A ppConfig-Extension:25 Using AWS AppConfig Agent with AWS Lambda 127 AWS AppConfig Region Asia Pacific (Mumbai) Asia Pacific (Hyderabad) South America (São Paulo) Africa (Cape Town) Israel (Tel Aviv) Middle East (UAE) Middle East (Bahrain) AWS GovCloud (US-East) AWS GovCloud (US-West) User Guide ARN arn:aws:lambda:ap-south-1:5 54480029851:layer:AWS-AppCo nfig-Extension:145 arn:aws:lambda:ap-south-2:4 89524808438:layer:AWS-AppCo nfig-Extension:74 arn:aws:lambda:sa-east-1:00 0010852771:layer:AWS-AppConfig- Extension:178 arn:aws:lambda:af-south-1:5 74348263942:layer:AWS-AppCo nfig-Extension:122 arn:aws:lambda:il-central-1 :895787185223:layer:AWS-App Config-Extension:50 arn:aws:lambda:me-central-1 :662846165436:layer:AWS-App Config-Extension:90 arn:aws:lambda:me-south-1:5 59955524753:layer:AWS-AppCo nfig-Extension:124 arn:aws-us-gov:lambda:us-gov- east-1:946561847325:layer:AWS- AppConfig-Extension:79 arn:aws-us-gov:lambda:us-gov- west-1:946746059096:layer:AWS- AppConfig-Extension:79 Using AWS AppConfig Agent with AWS Lambda 128 AWS AppConfig User Guide Date replaced by newer extension: 08/08/2024 Version 2.0.678 Region US East (N. Virginia) US East (Ohio) US West (N. California) US West (Oregon) Canada (Central) Canada West (Calgary) Europe (Frankfurt) Europe (Zurich) ARN arn:aws:lambda:us-east-1:02 7255383542:layer:AWS-AppConfig- Extension:167 arn:aws:lambda:us-east-2:72 8743619870:layer:AWS-AppConfig- Extension:126 arn:aws:lambda:us-west-1:95 8113053741:layer:AWS-AppConfig- Extension:213 arn:aws:lambda:us-west-2:35 9756378197:layer:AWS-AppConfig- Extension:223 arn:aws:lambda:ca-central-1 :039592058896:layer:AWS-App Config-Extension:116 arn:aws:lambda:ca-west-1:43 6199621743:layer:AWS-AppConfig- Extension:21 arn:aws:lambda:eu-central-1 :066940009817:layer:AWS-App Config-Extension:152 arn:aws:lambda:eu-central-2 :758369105281:layer:AWS-App Config-Extension:70 Using AWS AppConfig Agent with AWS Lambda 129 AWS AppConfig Region Europe (Ireland) Europe (London) Europe (Paris) Europe (Stockholm) Europe (Milan) Europe (Spain) China (Beijing) China (Ningxia) Asia Pacific (Hong Kong) User Guide ARN arn:aws:lambda:eu-west-1:43 4848589818:layer:AWS-AppConfig- Extension:153 arn:aws:lambda:eu-west-2:28 2860088358:layer:AWS-AppConfig- Extension:114 arn:aws:lambda:eu-west-3:49 3207061005:layer:AWS-AppConfig- Extension:126 arn:aws:lambda:eu-north-1:6 46970417810:layer:AWS-AppCo nfig-Extension:218 arn:aws:lambda:eu-south-1:2 03683718741:layer:AWS-AppCo nfig-Extension:104 arn:aws:lambda:eu-south-2:5 86093569114:layer:AWS-AppCo nfig-Extension:67 arn:aws-cn:lambda:cn-north- 1:615057806174:layer:AWS-Ap pConfig-Extension:99 arn:aws-cn:lambda:cn-northw est-1:615084187847:layer:AWS- AppConfig-Extension:97 arn:aws:lambda:ap-east-1:63 0222743974:layer:AWS-AppConfig- Extension:106 Using AWS AppConfig Agent with AWS Lambda 130 AWS AppConfig Region Asia Pacific (Tokyo) Asia Pacific (Seoul) Asia Pacific (Osaka) Asia Pacific (Singapore) Asia Pacific (Sydney) Asia Pacific (Jakarta) Asia Pacific (Melbourne) Asia Pacific (Mumbai) Asia Pacific (Hyderabad) User Guide ARN arn:aws:lambda:ap-northeast -1:980059726660:layer:AWS-A ppConfig-Extension:119 arn:aws:lambda:ap-northeast -2:826293736237:layer:AWS-A ppConfig-Extension:129 arn:aws:lambda:ap-northeast -3:706869817123:layer:AWS-A ppConfig-Extension:123 arn:aws:lambda:ap-southeast -1:421114256042:layer:AWS-A ppConfig-Extension:127 arn:aws:lambda:ap-southeast -2:080788657173:layer:AWS-A ppConfig-Extension:158 arn:aws:lambda:ap-southeast -3:418787028745:layer:AWS-A ppConfig-Extension:114 arn:aws:lambda:ap-southeast -4:307021474294:layer:AWS-A ppConfig-Extension:42 arn:aws:lambda:ap-south-1:5 54480029851:layer:AWS-AppCo nfig-Extension:139 arn:aws:lambda:ap-south-2:4 89524808438:layer:AWS-AppCo nfig-Extension:68 Using AWS AppConfig Agent with AWS Lambda 131 AWS AppConfig Region South America (São Paulo) Africa (Cape Town) Israel (Tel Aviv) Middle East (UAE) Middle East (Bahrain) AWS GovCloud (US-East) AWS GovCloud (US-West) Date replaced by newer extension: 07/23/2024 User Guide ARN arn:aws:lambda:sa-east-1:00 0010852771:layer:AWS-AppConfig- Extension:172 arn:aws:lambda:af-south-1:5 74348263942:layer:AWS-AppCo nfig-Extension:116 arn:aws:lambda:il-central-1 :895787185223:layer:AWS-App Config-Extension:45 arn:aws:lambda:me-central-1 :662846165436:layer:AWS-App Config-Extension:84 arn:aws:lambda:me-south-1:5 59955524753:layer:AWS-AppCo nfig-Extension:118 arn:aws-us-gov:lambda:us-gov- east-1:946561847325:layer:AWS- AppConfig-Extension:73 arn:aws-us-gov:lambda:us-gov- west-1:946746059096:layer:AWS- AppConfig-Extension:73 Using AWS AppConfig Agent with AWS Lambda 132 AWS AppConfig Version 2.0.501 Region US East (N. Virginia) US East (Ohio) US West (N. California) US West (Oregon) Canada (Central) Europe (Frankfurt) Europe (Zurich) Europe (Ireland) Europe (London) User Guide ARN arn:aws:lambda:us-east-1:02 7255383542:layer:AWS-AppConfig- Extension:153 arn:aws:lambda:us-east-2:72 8743619870:layer:AWS-AppConfig- Extension:112 arn:aws:lambda:us-west-1:95 8113053741:layer:AWS-AppConfig- Extension:195 arn:aws:lambda:us-west-2:35 9756378197:layer:AWS-AppConfig- Extension:210 arn:aws:lambda:ca-central-1 :039592058896:layer:AWS-App Config-Extension:101 arn:aws:lambda:eu-central-1 :066940009817:layer:AWS-App Config-Extension:136 arn:aws:lambda:eu-central-2 :758369105281:layer:AWS-App Config-Extension:53 arn:aws:lambda:eu-west-1:43 4848589818:layer:AWS-AppConfig- Extension:144 arn:aws:lambda:eu-west-2:28 2860088358:layer:AWS-AppConfig- Extension:99 Using AWS AppConfig Agent with AWS Lambda 133 AWS AppConfig Region Europe (Paris) Europe (Stockholm) Europe (Milan) Europe (Spain) China (Beijing) China (Ningxia) Asia Pacific (Hong Kong) Asia Pacific (Tokyo) Asia Pacific (Seoul) User Guide ARN arn:aws:lambda:eu-west-3:49 3207061005:layer:AWS-AppConfig- Extension:111 arn:aws:lambda:eu-north-1:6 46970417810:layer:AWS-AppCo nfig-Extension:201 arn:aws:lambda:eu-south-1:2 03683718741:layer:AWS-AppCo nfig-Extension:89 arn:aws:lambda:eu-south-2:5 86093569114:layer:AWS-AppCo nfig-Extension:50 arn:aws-cn:lambda:cn-north- 1:615057806174:layer:AWS-Ap pConfig-Extension:85 arn:aws-cn:lambda:cn-northw est-1:615084187847:layer:AWS- AppConfig-Extension:83 arn:aws:lambda:ap-east-1:63 0222743974:layer:AWS-AppConfig- Extension:91 arn:aws:lambda:ap-northeast -1:980059726660:layer:AWS-A ppConfig-Extension:104 arn:aws:lambda:ap-northeast -2:826293736237:layer:AWS-A ppConfig-Extension:114 Using AWS AppConfig Agent with AWS Lambda 134 AWS AppConfig Region Asia Pacific (Osaka) Asia Pacific (Singapore) Asia Pacific (Sydney) Asia Pacific (Jakarta) Asia Pacific (Melbourne) Asia Pacific (Mumbai) Asia Pacific (Hyderabad) South America (São Paulo) Africa (Cape Town) User Guide ARN arn:aws:lambda:ap-northeast -3:706869817123:layer:AWS-A ppConfig-Extension:107 arn:aws:lambda:ap-southeast -1:421114256042:layer:AWS-A ppConfig-Extension:112 arn:aws:lambda:ap-southeast -2:080788657173:layer:AWS-A ppConfig-Extension:142 arn:aws:lambda:ap-southeast -3:418787028745:layer:AWS-A ppConfig-Extension:98 arn:aws:lambda:ap-southeast -4:307021474294:layer:AWS-A ppConfig-Extension:26 arn:aws:lambda:ap-south-1:5 54480029851:layer:AWS-AppCo nfig-Extension:125 arn:aws:lambda:ap-south-2:4 89524808438:layer:AWS-AppCo nfig-Extension:53 arn:aws:lambda:sa-east-1:00 0010852771:layer:AWS-AppConfig- Extension:155 arn:aws:lambda:af-south-1:5 74348263942:layer:AWS-AppCo nfig-Extension:102 Using AWS AppConfig Agent with AWS Lambda 135 AWS AppConfig Region Israel (Tel Aviv) Middle East (UAE) Middle East (Bahrain) AWS GovCloud (US-East) AWS GovCloud (US-West) User Guide ARN arn:aws:lambda:il-central-1 :895787185223:layer:AWS-App Config-Extension:28 arn:aws:lambda:me-central-1 :662846165436:layer:AWS-App Config-Extension:68 arn:aws:lambda:me-south-1:5 59955524753:layer:AWS-AppCo nfig-Extension:103 arn:aws-us-gov:lambda:us-gov- east-1:946561847325:layer:AWS- AppConfig-Extension:59 arn:aws-us-gov:lambda:us-gov- west-1:946746059096:layer:AWS- AppConfig-Extension:59 Date replaced by newer extension: 07/01/2024 Version 2.0.358 Region US East (N. Virginia) US East (Ohio) ARN arn:aws:lambda:us-east-1:02 7255383542:layer:AWS-AppConfig- Extension:128 arn:aws:lambda:us-east-2:72 8743619870:layer:AWS-AppConfig- Extension:93 Using AWS AppConfig Agent with AWS Lambda 136 AWS AppConfig Region US West (N. California) US West (Oregon) Canada (Central) Europe (Frankfurt) Europe (Zurich) Europe (Ireland) Europe (London) Europe (Paris) Europe (Stockholm) User Guide ARN arn:aws:lambda:us-west-1:95 8113053741:layer:AWS-AppConfig- Extension:141 arn:aws:lambda:us-west-2:35 9756378197:layer:AWS-AppConfig- Extension:161 arn:aws:lambda:ca-central-1 :039592058896:layer:AWS-App Config-Extension:93 arn:aws:lambda:eu-central-1 :066940009817:layer:AWS-App Config-Extension:106 arn:aws:lambda:eu-central-2 :758369105281:layer:AWS-App Config-Extension:47
appconfig-ug-037
appconfig-ug.pdf
37
Middle East (Bahrain) AWS GovCloud (US-East) AWS GovCloud (US-West) User Guide ARN arn:aws:lambda:il-central-1 :895787185223:layer:AWS-App Config-Extension:28 arn:aws:lambda:me-central-1 :662846165436:layer:AWS-App Config-Extension:68 arn:aws:lambda:me-south-1:5 59955524753:layer:AWS-AppCo nfig-Extension:103 arn:aws-us-gov:lambda:us-gov- east-1:946561847325:layer:AWS- AppConfig-Extension:59 arn:aws-us-gov:lambda:us-gov- west-1:946746059096:layer:AWS- AppConfig-Extension:59 Date replaced by newer extension: 07/01/2024 Version 2.0.358 Region US East (N. Virginia) US East (Ohio) ARN arn:aws:lambda:us-east-1:02 7255383542:layer:AWS-AppConfig- Extension:128 arn:aws:lambda:us-east-2:72 8743619870:layer:AWS-AppConfig- Extension:93 Using AWS AppConfig Agent with AWS Lambda 136 AWS AppConfig Region US West (N. California) US West (Oregon) Canada (Central) Europe (Frankfurt) Europe (Zurich) Europe (Ireland) Europe (London) Europe (Paris) Europe (Stockholm) User Guide ARN arn:aws:lambda:us-west-1:95 8113053741:layer:AWS-AppConfig- Extension:141 arn:aws:lambda:us-west-2:35 9756378197:layer:AWS-AppConfig- Extension:161 arn:aws:lambda:ca-central-1 :039592058896:layer:AWS-App Config-Extension:93 arn:aws:lambda:eu-central-1 :066940009817:layer:AWS-App Config-Extension:106 arn:aws:lambda:eu-central-2 :758369105281:layer:AWS-App Config-Extension:47 arn:aws:lambda:eu-west-1:43 4848589818:layer:AWS-AppConfig- Extension:125 arn:aws:lambda:eu-west-2:28 2860088358:layer:AWS-AppConfig- Extension:93 arn:aws:lambda:eu-west-3:49 3207061005:layer:AWS-AppConfig- Extension:98 arn:aws:lambda:eu-north-1:6 46970417810:layer:AWS-AppCo nfig-Extension:159 Using AWS AppConfig Agent with AWS Lambda 137 AWS AppConfig Region Europe (Milan) Europe (Spain) China (Beijing) China (Ningxia) Asia Pacific (Hong Kong) Asia Pacific (Tokyo) Asia Pacific (Seoul) Asia Pacific (Osaka) Asia Pacific (Singapore) User Guide ARN arn:aws:lambda:eu-south-1:2 03683718741:layer:AWS-AppCo nfig-Extension:83 arn:aws:lambda:eu-south-2:5 86093569114:layer:AWS-AppCo nfig-Extension:44 arn:aws-cn:lambda:cn-north- 1:615057806174:layer:AWS-Ap pConfig-Extension:76 arn:aws-cn:lambda:cn-northw est-1:615084187847:layer:AWS- AppConfig-Extension:76 arn:aws:lambda:ap-east-1:63 0222743974:layer:AWS-AppConfig- Extension:83 arn:aws:lambda:ap-northeast -1:980059726660:layer:AWS-A ppConfig-Extension:98 arn:aws:lambda:ap-northeast -2:826293736237:layer:AWS-A ppConfig-Extension:108 arn:aws:lambda:ap-northeast -3:706869817123:layer:AWS-A ppConfig-Extension:101 arn:aws:lambda:ap-southeast -1:421114256042:layer:AWS-A ppConfig-Extension:106 Using AWS AppConfig Agent with AWS Lambda 138 AWS AppConfig Region Asia Pacific (Sydney) Asia Pacific (Jakarta) Asia Pacific (Melbourne) Asia Pacific (Mumbai) Asia Pacific (Hyderabad) South America (São Paulo) Africa (Cape Town) Israel (Tel Aviv) Middle East (UAE) User Guide ARN arn:aws:lambda:ap-southeast -2:080788657173:layer:AWS-A ppConfig-Extension:106 arn:aws:lambda:ap-southeast -3:418787028745:layer:AWS-A ppConfig-Extension:79 arn:aws:lambda:ap-southeast -4:307021474294:layer:AWS-A ppConfig-Extension:20 arn:aws:lambda:ap-south-1:5 54480029851:layer:AWS-AppCo nfig-Extension:107 arn:aws:lambda:ap-south-2:4 89524808438:layer:AWS-AppCo nfig-Extension:47 arn:aws:lambda:sa-east-1:00 0010852771:layer:AWS-AppConfig- Extension:128 arn:aws:lambda:af-south-1:5 74348263942:layer:AWS-AppCo nfig-Extension:83 arn:aws:lambda:il-central-1 :895787185223:layer:AWS-App Config-Extension:22 arn:aws:lambda:me-central-1 :662846165436:layer:AWS-App Config-Extension:49 Using AWS AppConfig Agent with AWS Lambda 139 AWS AppConfig Region Middle East (Bahrain) AWS GovCloud (US-East) AWS GovCloud (US-West) User Guide ARN arn:aws:lambda:me-south-1:5 59955524753:layer:AWS-AppCo nfig-Extension:85 arn:aws-us-gov:lambda:us-gov- east-1:946561847325:layer:AWS- AppConfig-Extension:54 arn:aws-us-gov:lambda:us-gov- west-1:946746059096:layer:AWS- AppConfig-Extension:54 Date replaced by newer extension: 12/01/2023 Version 2.0.181 Region US East (N. Virginia) US East (Ohio) US West (N. California) US West (Oregon) ARN arn:aws:lambda:us-east-1:02 7255383542:layer:AWS-AppConfig- Extension:113 arn:aws:lambda:us-east-2:72 8743619870:layer:AWS-AppConfig- Extension:81 arn:aws:lambda:us-west-1:95 8113053741:layer:AWS-AppConfig- Extension:124 arn:aws:lambda:us-west-2:35 9756378197:layer:AWS-AppConfig- Extension:146 Using AWS AppConfig Agent with AWS Lambda 140 AWS AppConfig Region Canada (Central) Europe (Frankfurt) Europe (Zurich) Europe (Ireland) Europe (London) Europe (Paris) Europe (Stockholm) Europe (Milan) Europe (Spain) User Guide ARN arn:aws:lambda:ca-central-1 :039592058896:layer:AWS-App Config-Extension:81 arn:aws:lambda:eu-central-1 :066940009817:layer:AWS-App Config-Extension:93 arn:aws:lambda:eu-central-2 :758369105281:layer:AWS-App Config-Extension:32 arn:aws:lambda:eu-west-1:43 4848589818:layer:AWS-AppConfig- Extension:110 arn:aws:lambda:eu-west-2:28 2860088358:layer:AWS-AppConfig- Extension:81 arn:aws:lambda:eu-west-3:49 3207061005:layer:AWS-AppConfig- Extension:82 arn:aws:lambda:eu-north-1:6 46970417810:layer:AWS-AppCo nfig-Extension:142 arn:aws:lambda:eu-south-1:2 03683718741:layer:AWS-AppCo nfig-Extension:73 arn:aws:lambda:eu-south-2:5 86093569114:layer:AWS-AppCo nfig-Extension:29 Using AWS AppConfig Agent with AWS Lambda 141 AWS AppConfig Region China (Beijing) China (Ningxia) Asia Pacific (Hong Kong) Asia Pacific (Tokyo) Asia Pacific (Seoul) Asia Pacific (Osaka) Asia Pacific (Singapore) Asia Pacific (Sydney) Asia Pacific (Jakarta) User Guide ARN arn:aws-cn:lambda:cn-north- 1:615057806174:layer:AWS-Ap pConfig-Extension:68 arn:aws-cn:lambda:cn-northw est-1:615084187847:layer:AWS- AppConfig-Extension:68 arn:aws:lambda:ap-east-1:63 0222743974:layer:AWS-AppConfig- Extension:73 arn:aws:lambda:ap-northeast -1:980059726660:layer:AWS-A ppConfig-Extension:84 arn:aws:lambda:ap-northeast -2:826293736237:layer:AWS-A ppConfig-Extension:93 arn:aws:lambda:ap-northeast -3:706869817123:layer:AWS-A ppConfig-Extension:86 arn:aws:lambda:ap-southeast -1:421114256042:layer:AWS-A ppConfig-Extension:91 arn:aws:lambda:ap-southeast -2:080788657173:layer:AWS-A ppConfig-Extension:93 arn:aws:lambda:ap-southeast -3:418787028745:layer:AWS-A ppConfig-Extension:64 Using AWS AppConfig Agent with AWS Lambda 142 AWS AppConfig Region Asia Pacific (Melbourne) Asia Pacific (Mumbai) Asia Pacific (Hyderabad) South America (São Paulo) Africa (Cape Town) Israel (Tel Aviv) Middle East (UAE) Middle East (Bahrain) AWS GovCloud (US-East) User Guide ARN arn:aws:lambda:ap-southeast -4:307021474294:layer:AWS-A ppConfig-Extension:5 arn:aws:lambda:ap-south-1:5 54480029851:layer:AWS-AppCo nfig-Extension:94 arn:aws:lambda:ap-south-2:4 89524808438:layer:AWS-AppCo nfig-Extension:32 arn:aws:lambda:sa-east-1:00 0010852771:layer:AWS-AppConfig- Extension:113 arn:aws:lambda:af-south-1:5 74348263942:layer:AWS-AppCo nfig-Extension:73 arn:aws:lambda:il-central-1 :895787185223:layer:AWS-App Config-Extension:7 arn:aws:lambda:me-central-1 :662846165436:layer:AWS-App Config-Extension:34 arn:aws:lambda:me-south-1:5 59955524753:layer:AWS-AppCo nfig-Extension:73 arn:aws-us-gov:lambda:us-gov- east-1:946561847325:layer:AWS- AppConfig-Extension:46 Using AWS AppConfig Agent with AWS Lambda 143 AWS AppConfig Region AWS GovCloud (US-West) User Guide ARN arn:aws-us-gov:lambda:us-gov- west-1:946746059096:layer:AWS- AppConfig-Extension:46 Date replaced by newer extension: 08/14/2023 Version 2.0.165 Region US East (N. Virginia) US East (Ohio) US West (N. California) US West (Oregon) Canada (Central) Europe (Frankfurt) ARN arn:aws:lambda:us-east-1:02 7255383542:layer:AWS-AppConfig- Extension:110 arn:aws:lambda:us-east-2:72 8743619870:layer:AWS-AppConfig- Extension:79 arn:aws:lambda:us-west-1:95 8113053741:layer:AWS-AppConfig- Extension:121 arn:aws:lambda:us-west-2:35 9756378197:layer:AWS-AppConfig- Extension:143 arn:aws:lambda:ca-central-1 :039592058896:layer:AWS-App Config-Extension:79 arn:aws:lambda:eu-central-1 :066940009817:layer:AWS-App Config-Extension:91 Using AWS AppConfig Agent with AWS Lambda 144 AWS AppConfig Region Europe (Zurich) Europe (Ireland) Europe (London) Europe (Paris) Europe (Stockholm) Europe (Milan) Europe (Spain) China (Beijing) China (Ningxia) User Guide ARN arn:aws:lambda:eu-central-2 :758369105281:layer:AWS-App Config-Extension:29 arn:aws:lambda:eu-west-1:43 4848589818:layer:AWS-AppConfig- Extension:108 arn:aws:lambda:eu-west-2:28 2860088358:layer:AWS-AppConfig- Extension:79 arn:aws:lambda:eu-west-3:49 3207061005:layer:AWS-AppConfig- Extension:80 arn:aws:lambda:eu-north-1:6 46970417810:layer:AWS-AppCo nfig-Extension:139 arn:aws:lambda:eu-south-1:2 03683718741:layer:AWS-AppCo nfig-Extension:71 arn:aws:lambda:eu-south-2:5 86093569114:layer:AWS-AppCo nfig-Extension:26 arn:aws-cn:lambda:cn-north- 1:615057806174:layer:AWS-Ap pConfig-Extension:66 arn:aws-cn:lambda:cn-northw est-1:615084187847:layer:AWS- AppConfig-Extension:66 Using AWS AppConfig Agent with AWS Lambda 145 AWS AppConfig Region Asia Pacific (Hong Kong) Asia Pacific (Tokyo) Asia Pacific (Seoul) Asia Pacific (Osaka) Asia Pacific (Singapore) Asia Pacific (Sydney) Asia Pacific (Jakarta) Asia Pacific (Melbourne) Asia Pacific (Mumbai) User Guide ARN arn:aws:lambda:ap-east-1:63 0222743974:layer:AWS-AppConfig- Extension:71 arn:aws:lambda:ap-northeast -1:980059726660:layer:AWS-A ppConfig-Extension:82 arn:aws:lambda:ap-northeast -2:826293736237:layer:AWS-A ppConfig-Extension:91 arn:aws:lambda:ap-northeast -3:706869817123:layer:AWS-A ppConfig-Extension:84 arn:aws:lambda:ap-southeast -1:421114256042:layer:AWS-A ppConfig-Extension:89 arn:aws:lambda:ap-southeast -2:080788657173:layer:AWS-A ppConfig-Extension:91 arn:aws:lambda:ap-southeast -3:418787028745:layer:AWS-A ppConfig-Extension:60 arn:aws:lambda:ap-southeast -4:307021474294:layer:AWS-A ppConfig-Extension:2 arn:aws:lambda:ap-south-1:5 54480029851:layer:AWS-AppCo nfig-Extension:92 Using AWS AppConfig Agent with AWS Lambda 146 AWS AppConfig Region Asia Pacific (Hyderabad) South America (São Paulo) Africa (Cape Town) Middle East (UAE) Middle East (Bahrain) AWS GovCloud (US-East) AWS GovCloud (US-West) Date replaced by newer extension: 02/21/2023 User Guide ARN arn:aws:lambda:ap-south-2:4 89524808438:layer:AWS-AppCo nfig-Extension:29 arn:aws:lambda:sa-east-1:00 0010852771:layer:AWS-AppConfig- Extension:110 arn:aws:lambda:af-south-1:5 74348263942:layer:AWS-AppCo nfig-Extension:71 arn:aws:lambda:me-central-1 :662846165436:layer:AWS-App Config-Extension:31 arn:aws:lambda:me-south-1:5 59955524753:layer:AWS-AppCo nfig-Extension:71 arn:aws-us-gov:lambda:us-gov- east-1:946561847325:layer:AWS- AppConfig-Extension:44 arn:aws-us-gov:lambda:us-gov- west-1:946746059096:layer:AWS- AppConfig-Extension:44 Using AWS AppConfig Agent with AWS Lambda 147 AWS AppConfig Version 2.0.122 Region US East (N. Virginia) US East (Ohio) US West (N. California) US West (Oregon) Canada (Central) Europe (Frankfurt) Europe (Ireland) Europe
appconfig-ug-038
appconfig-ug.pdf
38
arn:aws:lambda:ap-south-1:5 54480029851:layer:AWS-AppCo nfig-Extension:92 Using AWS AppConfig Agent with AWS Lambda 146 AWS AppConfig Region Asia Pacific (Hyderabad) South America (São Paulo) Africa (Cape Town) Middle East (UAE) Middle East (Bahrain) AWS GovCloud (US-East) AWS GovCloud (US-West) Date replaced by newer extension: 02/21/2023 User Guide ARN arn:aws:lambda:ap-south-2:4 89524808438:layer:AWS-AppCo nfig-Extension:29 arn:aws:lambda:sa-east-1:00 0010852771:layer:AWS-AppConfig- Extension:110 arn:aws:lambda:af-south-1:5 74348263942:layer:AWS-AppCo nfig-Extension:71 arn:aws:lambda:me-central-1 :662846165436:layer:AWS-App Config-Extension:31 arn:aws:lambda:me-south-1:5 59955524753:layer:AWS-AppCo nfig-Extension:71 arn:aws-us-gov:lambda:us-gov- east-1:946561847325:layer:AWS- AppConfig-Extension:44 arn:aws-us-gov:lambda:us-gov- west-1:946746059096:layer:AWS- AppConfig-Extension:44 Using AWS AppConfig Agent with AWS Lambda 147 AWS AppConfig Version 2.0.122 Region US East (N. Virginia) US East (Ohio) US West (N. California) US West (Oregon) Canada (Central) Europe (Frankfurt) Europe (Ireland) Europe (London) Europe (Paris) User Guide ARN arn:aws:lambda:us-east-1:02 7255383542:layer:AWS-AppConfig- Extension:82 arn:aws:lambda:us-east-2:72 8743619870:layer:AWS-AppConfig- Extension:59 arn:aws:lambda:us-west-1:95 8113053741:layer:AWS-AppConfig- Extension:93 arn:aws:lambda:us-west-2:35 9756378197:layer:AWS-AppConfig- Extension:114 arn:aws:lambda:ca-central-1 :039592058896:layer:AWS-App Config-Extension:59 arn:aws:lambda:eu-central-1 :066940009817:layer:AWS-App Config-Extension:70 arn:aws:lambda:eu-west-1:43 4848589818:layer:AWS-AppConfig- Extension:82 arn:aws:lambda:eu-west-2:28 2860088358:layer:AWS-AppConfig- Extension:59 arn:aws:lambda:eu-west-3:49 3207061005:layer:AWS-AppConfig- Extension:60 Using AWS AppConfig Agent with AWS Lambda 148 AWS AppConfig Region Europe (Stockholm) Europe (Milan) China (Beijing) China (Ningxia) Asia Pacific (Hong Kong) Asia Pacific (Tokyo) Asia Pacific (Seoul) Asia Pacific (Osaka) Asia Pacific (Singapore) User Guide ARN arn:aws:lambda:eu-north-1:6 46970417810:layer:AWS-AppCo nfig-Extension:111 arn:aws:lambda:eu-south-1:2 03683718741:layer:AWS-AppCo nfig-Extension:54 arn:aws-cn:lambda:cn-north- 1:615057806174:layer:AWS-Ap pConfig-Extension:52 arn:aws-cn:lambda:cn-northw est-1:615084187847:layer:AWS- AppConfig-Extension:52 arn:aws:lambda:ap-east-1:63 0222743974:layer:AWS-AppConfig- Extension:54 arn:aws:lambda:ap-northeast -1:980059726660:layer:AWS-A ppConfig-Extension:62 arn:aws:lambda:ap-northeast -2:826293736237:layer:AWS-A ppConfig-Extension:70 arn:aws:lambda:ap-northeast -3:706869817123:layer:AWS-A ppConfig-Extension:59 arn:aws:lambda:ap-southeast -1:421114256042:layer:AWS-A ppConfig-Extension:64 Using AWS AppConfig Agent with AWS Lambda 149 AWS AppConfig Region Asia Pacific (Sydney) Asia Pacific (Jakarta) Asia Pacific (Mumbai) South America (São Paulo) Africa (Cape Town) Middle East (Bahrain) AWS GovCloud (US-East) AWS GovCloud (US-West) User Guide ARN arn:aws:lambda:ap-southeast -2:080788657173:layer:AWS-A ppConfig-Extension:70 arn:aws:lambda:ap-southeast -3:418787028745:layer:AWS-A ppConfig-Extension:37 arn:aws:lambda:ap-south-1:5 54480029851:layer:AWS-AppCo nfig-Extension:71 arn:aws:lambda:sa-east-1:00 0010852771:layer:AWS-AppConfig- Extension:82 arn:aws:lambda:af-south-1:5 74348263942:layer:AWS-AppCo nfig-Extension:54 arn:aws:lambda:me-south-1:5 59955524753:layer:AWS-AppCo nfig-Extension:54 arn:aws-us-gov:lambda:us-gov- east-1:946561847325:layer:AWS- AppConfig-Extension:29 arn:aws-us-gov:lambda:us-gov- west-1:946746059096:layer:AWS- AppConfig-Extension:29 Date replaced by newer extension: 08/23/2022 Using AWS AppConfig Agent with AWS Lambda 150 AWS AppConfig Version 2.0.58 Region US East (N. Virginia) US East (Ohio) US West (N. California) US West (Oregon) Canada (Central) Europe (Frankfurt) Europe (Ireland) Europe (London) Europe (Paris) User Guide ARN arn:aws:lambda:us-east-1:02 7255383542:layer:AWS-AppConfig- Extension:69 arn:aws:lambda:us-east-2:72 8743619870:layer:AWS-AppConfig- Extension:50 arn:aws:lambda:us-west-1:95 8113053741:layer:AWS-AppConfig- Extension:78 arn:aws:lambda:us-west-2:35 9756378197:layer:AWS-AppConfig- Extension:101 arn:aws:lambda:ca-central-1 :039592058896:layer:AWS-App Config-Extension:50 arn:aws:lambda:eu-central-1 :066940009817:layer:AWS-App Config-Extension:59 arn:aws:lambda:eu-west-1:43 4848589818:layer:AWS-AppConfig- Extension:69 arn:aws:lambda:eu-west-2:28 2860088358:layer:AWS-AppConfig- Extension:50 arn:aws:lambda:eu-west-3:49 3207061005:layer:AWS-AppConfig- Extension:51 Using AWS AppConfig Agent with AWS Lambda 151 AWS AppConfig Region Europe (Stockholm) Europe (Milan) China (Beijing) China (Ningxia) Asia Pacific (Hong Kong) Asia Pacific (Tokyo) Asia Pacific (Seoul) Asia Pacific (Osaka) Asia Pacific (Singapore) User Guide ARN arn:aws:lambda:eu-north-1:6 46970417810:layer:AWS-AppCo nfig-Extension:98 arn:aws:lambda:eu-south-1:2 03683718741:layer:AWS-AppCo nfig-Extension:47 arn:aws-cn:lambda:cn-north- 1:615057806174:layer:AWS-Ap pConfig-Extension:46 arn:aws-cn:lambda:cn-northw est-1:615084187847:layer:AWS- AppConfig-Extension:46 arn:aws:lambda:ap-east-1:63 0222743974:layer:AWS-AppConfig- Extension:47 arn:aws:lambda:ap-northeast -1:980059726660:layer:AWS-A ppConfig-Extension:49 arn:aws:lambda:ap-northeast -2:826293736237:layer:AWS-A ppConfig-Extension:59 arn:aws:lambda:ap-northeast -3:706869817123:layer:AWS-A ppConfig-Extension:46 arn:aws:lambda:ap-southeast -1:421114256042:layer:AWS-A ppConfig-Extension:51 Using AWS AppConfig Agent with AWS Lambda 152 AWS AppConfig Region Asia Pacific (Sydney) Asia Pacific (Jakarta) Asia Pacific (Mumbai) South America (São Paulo) Africa (Cape Town) Middle East (Bahrain) AWS GovCloud (US-East) AWS GovCloud (US-West) User Guide ARN arn:aws:lambda:ap-southeast -2:080788657173:layer:AWS-A ppConfig-Extension:59 arn:aws:lambda:ap-southeast -3:418787028745:layer:AWS-A ppConfig-Extension:24 arn:aws:lambda:ap-south-1:5 54480029851:layer:AWS-AppCo nfig-Extension:60 arn:aws:lambda:sa-east-1:00 0010852771:layer:AWS-AppConfig- Extension:69 arn:aws:lambda:af-south-1:5 74348263942:layer:AWS-AppCo nfig-Extension:47 arn:aws:lambda:me-south-1:5 59955524753:layer:AWS-AppCo nfig-Extension:47 arn:aws-us-gov:lambda:us-gov- east-1:946561847325:layer:AWS- AppConfig-Extension:23 arn:aws-us-gov:lambda:us-gov- west-1:946746059096:layer:AWS- AppConfig-Extension:23 Date replaced by newer extension: 04/21/2022 Using AWS AppConfig Agent with AWS Lambda 153 AWS AppConfig Version 2.0.45 Region US East (N. Virginia) US East (Ohio) US West (N. California) US West (Oregon) Canada (Central) Europe (Frankfurt) Europe (Ireland) Europe (London) Europe (Paris) User Guide ARN arn:aws:lambda:us-east-1:02 7255383542:layer:AWS-AppConfig- Extension:68 arn:aws:lambda:us-east-2:72 8743619870:layer:AWS-AppConfig- Extension:49 arn:aws:lambda:us-west-1:95 8113053741:layer:AWS-AppConfig- Extension:77 arn:aws:lambda:us-west-2:35 9756378197:layer:AWS-AppConfig- Extension:100 arn:aws:lambda:ca-central-1 :039592058896:layer:AWS-App Config-Extension:49 arn:aws:lambda:eu-central-1 :066940009817:layer:AWS-App Config-Extension:58 arn:aws:lambda:eu-west-1:43 4848589818:layer:AWS-AppConfig- Extension:68 arn:aws:lambda:eu-west-2:28 2860088358:layer:AWS-AppConfig- Extension:49 arn:aws:lambda:eu-west-3:49 3207061005:layer:AWS-AppConfig- Extension:50 Using AWS AppConfig Agent with AWS Lambda 154 AWS AppConfig Region Europe (Stockholm) Europe (Milan) China (Beijing) China (Ningxia) Asia Pacific (Hong Kong) Asia Pacific (Tokyo) Asia Pacific (Seoul) Asia Pacific (Osaka) Asia Pacific (Singapore) User Guide ARN arn:aws:lambda:eu-north-1:6 46970417810:layer:AWS-AppCo nfig-Extension:97 arn:aws:lambda:eu-south-1:2 03683718741:layer:AWS-AppCo nfig-Extension:46 arn:aws-cn:lambda:cn-north- 1:615057806174:layer:AWS-Ap pConfig-Extension:45 arn:aws-cn:lambda:cn-northw est-1:615084187847:layer:AWS- AppConfig-Extension:45 arn:aws:lambda:ap-east-1:63 0222743974:layer:AWS-AppConfig- Extension:46 arn:aws:lambda:ap-northeast -1:980059726660:layer:AWS-A ppConfig-Extension:48 arn:aws:lambda:ap-northeast -2:826293736237:layer:AWS-A ppConfig-Extension:58 arn:aws:lambda:ap-northeast -3:706869817123:layer:AWS-A ppConfig-Extension:45 arn:aws:lambda:ap-southeast -1:421114256042:layer:AWS-A ppConfig-Extension:50 Using AWS AppConfig Agent with AWS Lambda 155 AWS AppConfig Region Asia Pacific (Sydney) Asia Pacific (Jakarta) Asia Pacific (Mumbai) South America (São Paulo) Africa (Cape Town) Middle East (Bahrain) AWS GovCloud (US-East) AWS GovCloud (US-West) User Guide ARN arn:aws:lambda:ap-southeast -2:080788657173:layer:AWS-A ppConfig-Extension:58 arn:aws:lambda:ap-southeast -3:418787028745:layer:AWS-A ppConfig-Extension:23 arn:aws:lambda:ap-south-1:5 54480029851:layer:AWS-AppCo nfig-Extension:59 arn:aws:lambda:sa-east-1:00 0010852771:layer:AWS-AppConfig- Extension:68 arn:aws:lambda:af-south-1:5 74348263942:layer:AWS-AppCo nfig-Extension:46 arn:aws:lambda:me-south-1:5 59955524753:layer:AWS-AppCo nfig-Extension:46 arn:aws-us-gov:lambda:us-gov- east-1:946561847325:layer:AWS- AppConfig-Extension:22 arn:aws-us-gov:lambda:us-gov- west-1:946746059096:layer:AWS- AppConfig-Extension:22 Date replaced by newer extension: 03/15/2022 Using AWS AppConfig Agent with AWS Lambda 156 AWS AppConfig Version 2.0.30 Region US East (N. Virginia) US East (Ohio) US West (N. California) US West (Oregon) Canada (Central) Europe (Frankfurt) Europe (Ireland) Europe (London) Europe (Paris) User Guide ARN arn:aws:lambda:us-east-1:02 7255383542:layer:AWS-AppConfig- Extension:61 arn:aws:lambda:us-east-2:72 8743619870:layer:AWS-AppConfig- Extension:47 arn:aws:lambda:us-west-1:95 8113053741:layer:AWS-AppConfig- Extension:61 arn:aws:lambda:us-west-2:35 9756378197:layer:AWS-AppConfig- Extension:89 arn:aws:lambda:ca-central-1 :039592058896:layer:AWS-App Config-Extension:47 arn:aws:lambda:eu-central-1 :066940009817:layer:AWS-App Config-Extension:54 arn:aws:lambda:eu-west-1:43 4848589818:layer:AWS-AppConfig- Extension:59 arn:aws:lambda:eu-west-2:28 2860088358:layer:AWS-AppConfig- Extension:47 arn:aws:lambda:eu-west-3:49 3207061005:layer:AWS-AppConfig- Extension:48 Using AWS AppConfig Agent with AWS Lambda 157 AWS AppConfig Region Europe (Stockholm) Europe (Milan) China (Beijing) China (Ningxia) Asia Pacific (Hong Kong) Asia Pacific (Tokyo) Asia Pacific (Osaka) Asia Pacific (Seoul) Asia Pacific (Singapore) User Guide ARN arn:aws:lambda:eu-north-1:6 46970417810:layer:AWS-AppCo nfig-Extension:86 arn:aws:lambda:eu-south-1:2 03683718741:layer:AWS-AppCo nfig-Extension:44 arn:aws-cn:lambda:cn-north- 1:615057806174:layer:AWS-Ap pConfig-Extension:43 arn:aws-cn:lambda:cn-northw est-1:615084187847:layer:AWS- AppConfig-Extension:43 arn:aws:lambda:ap-east-1:63 0222743974:layer:AWS-AppConfig- Extension:44 arn:aws:lambda:ap-northeast -1:980059726660:layer:AWS-A ppConfig-Extension:45 arn:aws:lambda:ap-northeast -3:706869817123:layer:AWS-A ppConfig-Extension:42 arn:aws:lambda:ap-northeast -2:826293736237:layer:AWS-A ppConfig-Extension:54 arn:aws:lambda:ap-southeast -1:421114256042:layer:AWS-A
appconfig-ug-039
appconfig-ug.pdf
39
Europe (Ireland) Europe (London) Europe (Paris) User Guide ARN arn:aws:lambda:us-east-1:02 7255383542:layer:AWS-AppConfig- Extension:61 arn:aws:lambda:us-east-2:72 8743619870:layer:AWS-AppConfig- Extension:47 arn:aws:lambda:us-west-1:95 8113053741:layer:AWS-AppConfig- Extension:61 arn:aws:lambda:us-west-2:35 9756378197:layer:AWS-AppConfig- Extension:89 arn:aws:lambda:ca-central-1 :039592058896:layer:AWS-App Config-Extension:47 arn:aws:lambda:eu-central-1 :066940009817:layer:AWS-App Config-Extension:54 arn:aws:lambda:eu-west-1:43 4848589818:layer:AWS-AppConfig- Extension:59 arn:aws:lambda:eu-west-2:28 2860088358:layer:AWS-AppConfig- Extension:47 arn:aws:lambda:eu-west-3:49 3207061005:layer:AWS-AppConfig- Extension:48 Using AWS AppConfig Agent with AWS Lambda 157 AWS AppConfig Region Europe (Stockholm) Europe (Milan) China (Beijing) China (Ningxia) Asia Pacific (Hong Kong) Asia Pacific (Tokyo) Asia Pacific (Osaka) Asia Pacific (Seoul) Asia Pacific (Singapore) User Guide ARN arn:aws:lambda:eu-north-1:6 46970417810:layer:AWS-AppCo nfig-Extension:86 arn:aws:lambda:eu-south-1:2 03683718741:layer:AWS-AppCo nfig-Extension:44 arn:aws-cn:lambda:cn-north- 1:615057806174:layer:AWS-Ap pConfig-Extension:43 arn:aws-cn:lambda:cn-northw est-1:615084187847:layer:AWS- AppConfig-Extension:43 arn:aws:lambda:ap-east-1:63 0222743974:layer:AWS-AppConfig- Extension:44 arn:aws:lambda:ap-northeast -1:980059726660:layer:AWS-A ppConfig-Extension:45 arn:aws:lambda:ap-northeast -3:706869817123:layer:AWS-A ppConfig-Extension:42 arn:aws:lambda:ap-northeast -2:826293736237:layer:AWS-A ppConfig-Extension:54 arn:aws:lambda:ap-southeast -1:421114256042:layer:AWS-A ppConfig-Extension:45 Using AWS AppConfig Agent with AWS Lambda 158 AWS AppConfig Region Asia Pacific (Sydney) Asia Pacific (Jakarta) Asia Pacific (Mumbai) South America (São Paulo) Africa (Cape Town) Middle East (Bahrain) AWS GovCloud (US-East) AWS GovCloud (US-West) User Guide ARN arn:aws:lambda:ap-southeast -2:080788657173:layer:AWS-A ppConfig-Extension:54 arn:aws:lambda:ap-southeast -3:418787028745:layer:AWS-A ppConfig-Extension:13 arn:aws:lambda:ap-south-1:5 54480029851:layer:AWS-AppCo nfig-Extension:55 arn:aws:lambda:sa-east-1:00 0010852771:layer:AWS-AppConfig- Extension:61 arn:aws:lambda:af-south-1:5 74348263942:layer:AWS-AppCo nfig-Extension:44 arn:aws:lambda:me-south-1:5 59955524753:layer:AWS-AppCo nfig-Extension:44 arn:aws-us-gov:lambda:us-gov- east-1:946561847325:layer:AWS- AppConfig-Extension:20 arn:aws-us-gov:lambda:us-gov- west-1:946746059096:layer:AWS- AppConfig-Extension:20 Older extension versions (ARM64 platform) The following tables list ARNs and the AWS Regions for older versions of the AWS AppConfig Agent Lambda extension developed for the ARM64 platform. Using AWS AppConfig Agent with AWS Lambda 159 AWS AppConfig User Guide Date replaced by newer extension: 12/12/2024 Version 2.0.678 Region US East (N. Virginia) US East (Ohio) US West (N. California) US West (Oregon) Canada (Central) Canada West (Calgary) Europe (Frankfurt) Europe (Zurich) ARN arn:aws:lambda:us-east-1:02 7255383542:layer:AWS-AppConfig- Extension-Arm64:106 arn:aws:lambda:us-east-2:72 8743619870:layer:AWS-AppConfig- Extension-Arm64:84 arn:aws:lambda:us-west-1:95 8113053741:layer:AWS-AppConfig- Extension-Arm64:98 arn:aws:lambda:us-west-2:35 9756378197:layer:AWS-AppConfig- Extension-Arm64:131 arn:aws:lambda:ca-central-1 :039592058896:layer:AWS-App Config-Extension-Arm64:41 arn:aws:lambda:ca-west-1:43 6199621743:layer:AWS-AppConfig- Extension-Arm64:17 arn:aws:lambda:eu-central-1 :066940009817:layer:AWS-App Config-Extension-Arm64:101 arn:aws:lambda:eu-central-2 :758369105281:layer:AWS-App Config-Extension-Arm64:33 Using AWS AppConfig Agent with AWS Lambda 160 AWS AppConfig Region Europe (Ireland) Europe (London) Europe (Paris) Europe (Stockholm) Europe (Milan) Europe (Spain) Asia Pacific (Hong Kong) Asia Pacific (Tokyo) Asia Pacific (Seoul) User Guide ARN arn:aws:lambda:eu-west-1:43 4848589818:layer:AWS-AppConfig- Extension-Arm64:97 arn:aws:lambda:eu-west-2:28 2860088358:layer:AWS-AppConfig- Extension-Arm64:72 arn:aws:lambda:eu-west-3:49 3207061005:layer:AWS-AppConfig- Extension-Arm64:51 arn:aws:lambda:eu-north-1:6 46970417810:layer:AWS-AppCo nfig-Extension-Arm64:83 arn:aws:lambda:eu-south-1:2 03683718741:layer:AWS-AppCo nfig-Extension-Arm64:38 arn:aws:lambda:eu-south-2:5 86093569114:layer:AWS-AppCo nfig-Extension-Arm64:33 arn:aws:lambda:ap-east-1:63 0222743974:layer:AWS-AppConfig- Extension-Arm64:40 arn:aws:lambda:ap-northeast -1:980059726660:layer:AWS-A ppConfig-Extension-Arm64:78 arn:aws:lambda:ap-northeast -2:826293736237:layer:AWS-A ppConfig-Extension-Arm64:43 Using AWS AppConfig Agent with AWS Lambda 161 AWS AppConfig Region Asia Pacific (Osaka) Asia Pacific (Singapore) Asia Pacific (Sydney) Asia Pacific (Jakarta) Asia Pacific (Melbourne) Asia Pacific (Malaysia) Asia Pacific (Mumbai) Asia Pacific (Hyderabad) User Guide ARN arn:aws:lambda:ap-northeast -3:706869817123:layer:AWS-A ppConfig-Extension-Arm64:44 arn:aws:lambda:ap-southeast -1:421114256042:layer:AWS-A ppConfig-Extension-Arm64:84 arn:aws:lambda:ap-southeast -2:080788657173:layer:AWS-A ppConfig-Extension-Arm64:107 arn:aws:lambda:ap-southeast -3:418787028745:layer:AWS-A ppConfig-Extension-Arm64:57 arn:aws:lambda:ap-southeast -4:307021474294:layer:AWS-A ppConfig-Extension-Arm64:33 arn:aws:lambda:ap-southeast -5:631746059939:layer:AWS-A ppConfig-Extension-Arm64:1 arn:aws:lambda:ap-south-1:5 54480029851:layer:AWS-AppCo nfig-Extension-Arm64:87 arn:aws:lambda:ap-south-2:4 89524808438:layer:AWS-AppCo nfig-Extension-Arm64:32 South America (São Paulo) arn:aws:lambda:sa-east-1:00 0010852771:layer:AWS-AppConfig- Extension-Arm64:66 Using AWS AppConfig Agent with AWS Lambda 162 AWS AppConfig Region Africa (Cape Town) Middle East (UAE) Middle East (Bahrain) Israel (Tel Aviv) China (Beijing) China (Ningxia) AWS GovCloud (US-East) AWS GovCloud (US-West) User Guide ARN arn:aws:lambda:af-south-1:5 74348263942:layer:AWS-AppCo nfig-Extension-Arm64:50 arn:aws:lambda:me-central-1 :662846165436:layer:AWS-App Config-Extension-Arm64:46 arn:aws:lambda:me-south-1:5 59955524753:layer:AWS-AppCo nfig-Extension-Arm64:52 arn:aws:lambda:il-central-1 :895787185223:layer:AWS-App Config-Extension-Arm64:33 arn:aws-cn:lambda:cn-north- 1:615057806174:layer:AWS-Ap pConfig-Extension-Arm64:26 arn:aws-cn:lambda:cn-northw est-1:615084187847:layer:AWS- AppConfig-Extension-Arm64:24 arn:aws-us-gov:lambda:us-gov- east-1:946561847325:layer:AWS- AppConfig-Extension-Arm64:25 arn:aws-us-gov:lambda:us-gov- west-1:946746059096:layer:AWS- AppConfig-Extension-Arm64:25 Date replaced by newer extension: 08/08/2024 Using AWS AppConfig Agent with AWS Lambda 163 AWS AppConfig Version 2.0.678 Region US East (N. Virginia) US East (Ohio) US West (N. California) US West (Oregon) Canada West (Calgary) Canada (Central) Europe (Frankfurt) Europe (Zurich) Europe (Ireland) User Guide ARN arn:aws:lambda:us-east-1:02 7255383542:layer:AWS-AppConfig- Extension-Arm64:100 arn:aws:lambda:us-east-2:72 8743619870:layer:AWS-AppConfig- Extension-Arm64:78 arn:aws:lambda:us-west-1:95 8113053741:layer:AWS-AppConfig- Extension-Arm64:90 arn:aws:lambda:us-west-2:35 9756378197:layer:AWS-AppConfig- Extension-Arm64:125 arn:aws:lambda:ca-west-1:43 6199621743:layer:AWS-AppConfig- Extension:11 arn:aws:lambda:ca-central-1 :039592058896:layer:AWS-App Config-Extension-Arm64:36 arn:aws:lambda:eu-central-1 :066940009817:layer:AWS-App Config-Extension-Arm64:95 arn:aws:lambda:eu-central-2 :758369105281:layer:AWS-App Config-Extension-Arm64:28 arn:aws:lambda:eu-west-1:43 4848589818:layer:AWS-AppConfig- Extension-Arm64:91 Using AWS AppConfig Agent with AWS Lambda 164 AWS AppConfig Region Europe (London) Europe (Paris) Europe (Stockholm) Europe (Milan) Europe (Spain) Asia Pacific (Hong Kong) Asia Pacific (Tokyo) Asia Pacific (Seoul) Asia Pacific (Osaka) User Guide ARN arn:aws:lambda:eu-west-2:28 2860088358:layer:AWS-AppConfig- Extension-Arm64:66 arn:aws:lambda:eu-west-3:49 3207061005:layer:AWS-AppConfig- Extension-Arm64:45 arn:aws:lambda:eu-north-1:6 46970417810:layer:AWS-AppCo nfig-Extension-Arm64:77 arn:aws:lambda:eu-south-1:2 03683718741:layer:AWS-AppCo nfig-Extension-Arm64:32 arn:aws:lambda:eu-south-2:5 86093569114:layer:AWS-AppCo nfig-Extension-Arm64:28 arn:aws:lambda:ap-east-1:63 0222743974:layer:AWS-AppConfig- Extension-Arm64:34 arn:aws:lambda:ap-northeast -1:980059726660:layer:AWS-A ppConfig-Extension-Arm64:72 arn:aws:lambda:ap-northeast -2:826293736237:layer:AWS-A ppConfig-Extension-Arm64:37 arn:aws:lambda:ap-northeast -3:706869817123:layer:AWS-A ppConfig-Extension-Arm64:38 Using AWS AppConfig Agent with AWS Lambda 165 AWS AppConfig Region Asia Pacific (Singapore) Asia Pacific (Sydney) Asia Pacific (Jakarta) Asia Pacific (Melbourne) Asia Pacific (Mumbai) Asia Pacific (Hyderabad) South America (São Paulo) Africa (Cape Town) Middle East (UAE) User Guide ARN arn:aws:lambda:ap-southeast -1:421114256042:layer:AWS-A ppConfig-Extension-Arm64:79 arn:aws:lambda:ap-southeast -2:080788657173:layer:AWS-A ppConfig-Extension-Arm64:101 arn:aws:lambda:ap-southeast -3:418787028745:layer:AWS-A ppConfig-Extension-Arm64:51 arn:aws:lambda:ap-southeast -4:307021474294:layer:AWS-A ppConfig-Extension-Arm64:27 arn:aws:lambda:ap-south-1:5 54480029851:layer:AWS-AppCo nfig-Extension-Arm64:81 arn:aws:lambda:ap-south-2:4 89524808438:layer:AWS-AppCo nfig-Extension-Arm64:26 arn:aws:lambda:sa-east-1:00 0010852771:layer:AWS-AppConfig- Extension-Arm64:60 arn:aws:lambda:af-south-1:5 74348263942:layer:AWS-AppCo nfig-Extension-Arm64:44 arn:aws:lambda:me-central-1 :662846165436:layer:AWS-App Config-Extension-Arm64:40 Using AWS AppConfig Agent with AWS Lambda 166 AWS AppConfig Region Middle East (Bahrain) Israel (Tel Aviv) China (Beijing) China (Ningxia) AWS GovCloud (US-East) AWS GovCloud (US-West) Date replaced by newer extension: 07/23/2024 Version 2.0.501 Region US East (N. Virginia) User Guide ARN arn:aws:lambda:me-south-1:5 59955524753:layer:AWS-AppCo nfig-Extension-Arm64:46 arn:aws:lambda:il-central-1 :895787185223:layer:AWS-App Config-Extension-Arm64:28 arn:aws-cn:lambda:cn-north- 1:615057806174:layer:AWS-Ap pConfig-Extension-Arm64:21 arn:aws-cn:lambda:cn-northw est-1:615084187847:layer:AWS- AppConfig-Extension-Arm64:19 arn:aws-us-gov:lambda:us-gov- east-1:946561847325:layer:AWS- AppConfig-Extension-Arm64:19 arn:aws-us-gov:lambda:us-gov- west-1:946746059096:layer:AWS- AppConfig-Extension-Arm64:19 ARN arn:aws:lambda:us-east-1:02 7255383542:layer:AWS-AppConfig- Extension-Arm64:86 Using AWS AppConfig Agent with AWS Lambda 167 AWS AppConfig Region US East (Ohio) US West (N. California) US West (Oregon) Canada West (Calgary) Canada (Central) Europe (Frankfurt) Europe (Zurich) Europe (Ireland) Europe (London) User Guide ARN arn:aws:lambda:us-east-2:72 8743619870:layer:AWS-AppConfig- Extension-Arm64:64 arn:aws:lambda:us-west-1:95 8113053741:layer:AWS-AppConfig- Extension-Arm64:72 arn:aws:lambda:us-west-2:35 9756378197:layer:AWS-AppConfig- Extension-Arm64:112 arn:aws:lambda:ca-west-1:43 6199621743:layer:AWS-AppConfig- Extension:1 arn:aws:lambda:ca-central-1 :039592058896:layer:AWS-App Config-Extension-Arm64:21 arn:aws:lambda:eu-central-1 :066940009817:layer:AWS-App Config-Extension-Arm64:79 arn:aws:lambda:eu-central-2 :758369105281:layer:AWS-App Config-Extension-Arm64:11 arn:aws:lambda:eu-west-1:43 4848589818:layer:AWS-AppConfig- Extension-Arm64:82 arn:aws:lambda:eu-west-2:28 2860088358:layer:AWS-AppConfig- Extension-Arm64:51 Using AWS AppConfig Agent with AWS Lambda 168 AWS AppConfig
appconfig-ug-040
appconfig-ug.pdf
40
Virginia) User Guide ARN arn:aws:lambda:me-south-1:5 59955524753:layer:AWS-AppCo nfig-Extension-Arm64:46 arn:aws:lambda:il-central-1 :895787185223:layer:AWS-App Config-Extension-Arm64:28 arn:aws-cn:lambda:cn-north- 1:615057806174:layer:AWS-Ap pConfig-Extension-Arm64:21 arn:aws-cn:lambda:cn-northw est-1:615084187847:layer:AWS- AppConfig-Extension-Arm64:19 arn:aws-us-gov:lambda:us-gov- east-1:946561847325:layer:AWS- AppConfig-Extension-Arm64:19 arn:aws-us-gov:lambda:us-gov- west-1:946746059096:layer:AWS- AppConfig-Extension-Arm64:19 ARN arn:aws:lambda:us-east-1:02 7255383542:layer:AWS-AppConfig- Extension-Arm64:86 Using AWS AppConfig Agent with AWS Lambda 167 AWS AppConfig Region US East (Ohio) US West (N. California) US West (Oregon) Canada West (Calgary) Canada (Central) Europe (Frankfurt) Europe (Zurich) Europe (Ireland) Europe (London) User Guide ARN arn:aws:lambda:us-east-2:72 8743619870:layer:AWS-AppConfig- Extension-Arm64:64 arn:aws:lambda:us-west-1:95 8113053741:layer:AWS-AppConfig- Extension-Arm64:72 arn:aws:lambda:us-west-2:35 9756378197:layer:AWS-AppConfig- Extension-Arm64:112 arn:aws:lambda:ca-west-1:43 6199621743:layer:AWS-AppConfig- Extension:1 arn:aws:lambda:ca-central-1 :039592058896:layer:AWS-App Config-Extension-Arm64:21 arn:aws:lambda:eu-central-1 :066940009817:layer:AWS-App Config-Extension-Arm64:79 arn:aws:lambda:eu-central-2 :758369105281:layer:AWS-App Config-Extension-Arm64:11 arn:aws:lambda:eu-west-1:43 4848589818:layer:AWS-AppConfig- Extension-Arm64:82 arn:aws:lambda:eu-west-2:28 2860088358:layer:AWS-AppConfig- Extension-Arm64:51 Using AWS AppConfig Agent with AWS Lambda 168 AWS AppConfig Region Europe (Paris) Europe (Stockholm) Europe (Milan) Europe (Spain) Asia Pacific (Hong Kong) Asia Pacific (Tokyo) Asia Pacific (Seoul) Asia Pacific (Osaka) Asia Pacific (Singapore) User Guide ARN arn:aws:lambda:eu-west-3:49 3207061005:layer:AWS-AppConfig- Extension-Arm64:30 arn:aws:lambda:eu-north-1:6 46970417810:layer:AWS-AppCo nfig-Extension-Arm64:60 arn:aws:lambda:eu-south-1:2 03683718741:layer:AWS-AppCo nfig-Extension-Arm64:17 arn:aws:lambda:eu-south-2:5 86093569114:layer:AWS-AppCo nfig-Extension-Arm64:11 arn:aws:lambda:ap-east-1:63 0222743974:layer:AWS-AppConfig- Extension-Arm64:19 arn:aws:lambda:ap-northeast -1:980059726660:layer:AWS-A ppConfig-Extension-Arm64:57 arn:aws:lambda:ap-northeast -2:826293736237:layer:AWS-A ppConfig-Extension-Arm64:22 arn:aws:lambda:ap-northeast -3:706869817123:layer:AWS-A ppConfig-Extension-Arm64:22 arn:aws:lambda:ap-southeast -1:421114256042:layer:AWS-A ppConfig-Extension-Arm64:64 Using AWS AppConfig Agent with AWS Lambda 169 AWS AppConfig Region Asia Pacific (Sydney) Asia Pacific (Jakarta) Asia Pacific (Melbourne) Asia Pacific (Mumbai) Asia Pacific (Hyderabad) South America (São Paulo) Africa (Cape Town) Middle East (UAE) Middle East (Bahrain) User Guide ARN arn:aws:lambda:ap-southeast -2:080788657173:layer:AWS-A ppConfig-Extension-Arm64:85 arn:aws:lambda:ap-southeast -3:418787028745:layer:AWS-A ppConfig-Extension-Arm64:35 arn:aws:lambda:ap-southeast -4:307021474294:layer:AWS-A ppConfig-Extension-Arm64:11 arn:aws:lambda:ap-south-1:5 54480029851:layer:AWS-AppCo nfig-Extension-Arm64:67 arn:aws:lambda:ap-south-2:4 89524808438:layer:AWS-AppCo nfig-Extension-Arm64:11 arn:aws:lambda:sa-east-1:00 0010852771:layer:AWS-AppConfig- Extension-Arm64:43 arn:aws:lambda:af-south-1:5 74348263942:layer:AWS-AppCo nfig-Extension-Arm64:30 arn:aws:lambda:me-central-1 :662846165436:layer:AWS-App Config-Extension-Arm64:24 arn:aws:lambda:me-south-1:5 59955524753:layer:AWS-AppCo nfig-Extension-Arm64:31 Using AWS AppConfig Agent with AWS Lambda 170 AWS AppConfig Region Israel (Tel Aviv) China (Beijing) China (Ningxia) AWS GovCloud (US-East) AWS GovCloud (US-West) User Guide ARN arn:aws:lambda:il-central-1 :895787185223:layer:AWS-App Config-Extension-Arm64:11 arn:aws-cn:lambda:cn-north- 1:615057806174:layer:AWS-Ap pConfig-Extension-Arm64:7 arn:aws-cn:lambda:cn-northw est-1:615084187847:layer:AWS- AppConfig-Extension-Arm64:5 arn:aws-us-gov:lambda:us-gov- east-1:946561847325:layer:AWS- AppConfig-Extension-Arm64:5 arn:aws-us-gov:lambda:us-gov- west-1:946746059096:layer:AWS- AppConfig-Extension-Arm64:5 Date replaced by newer extension: 07/01/2024 Version 2.0.358 Region US East (N. Virginia) US East (Ohio) ARN arn:aws:lambda:us-east-1:02 7255383542:layer:AWS-AppConfig- Extension-Arm64:61 arn:aws:lambda:us-east-2:72 8743619870:layer:AWS-AppConfig- Extension-Arm64:45 Using AWS AppConfig Agent with AWS Lambda 171 AWS AppConfig Region US West (N. California) US West (Oregon) Canada (Central) Europe (Frankfurt) Europe (Zurich) Europe (Ireland) Europe (London) Europe (Paris) Europe (Stockholm) User Guide ARN arn:aws:lambda:us-west-1:95 8113053741:layer:AWS-AppConfig- Extension-Arm64:18 arn:aws:lambda:us-west-2:35 9756378197:layer:AWS-AppConfig- Extension-Arm64:63 arn:aws:lambda:ca-central-1 :039592058896:layer:AWS-App Config-Extension-Arm64:13 arn:aws:lambda:eu-central-1 :066940009817:layer:AWS-App Config-Extension-Arm64:49 arn:aws:lambda:eu-central-2 :758369105281:layer:AWS-App Config-Extension-Arm64:5 arn:aws:lambda:eu-west-1:43 4848589818:layer:AWS-AppConfig- Extension-Arm64:63 arn:aws:lambda:eu-west-2:28 2860088358:layer:AWS-AppConfig- Extension-Arm64:45 arn:aws:lambda:eu-west-3:49 3207061005:layer:AWS-AppConfig- Extension-Arm64:17 arn:aws:lambda:eu-north-1:6 46970417810:layer:AWS-AppCo nfig-Extension-Arm64:18 Using AWS AppConfig Agent with AWS Lambda 172 AWS AppConfig Region Europe (Milan) Europe (Spain) Asia Pacific (Hong Kong) Asia Pacific (Tokyo) Asia Pacific (Seoul) Asia Pacific (Osaka) Asia Pacific (Singapore) Asia Pacific (Sydney) Asia Pacific (Jakarta) User Guide ARN arn:aws:lambda:eu-south-1:2 03683718741:layer:AWS-AppCo nfig-Extension-Arm64:11 arn:aws:lambda:eu-south-2:5 86093569114:layer:AWS-AppCo nfig-Extension-Arm64:5 arn:aws:lambda:ap-east-1:63 0222743974:layer:AWS-AppConfig- Extension-Arm64:11 arn:aws:lambda:ap-northeast -1:980059726660:layer:AWS-A ppConfig-Extension-Arm64:51 arn:aws:lambda:ap-northeast -2:826293736237:layer:AWS-A ppConfig-Extension-Arm64:16 arn:aws:lambda:ap-northeast -3:706869817123:layer:AWS-A ppConfig-Extension-Arm64:16 arn:aws:lambda:ap-southeast -1:421114256042:layer:AWS-A ppConfig-Extension-Arm64:58 arn:aws:lambda:ap-southeast -2:080788657173:layer:AWS-A ppConfig-Extension-Arm64:49 arn:aws:lambda:ap-southeast -3:418787028745:layer:AWS-A ppConfig-Extension-Arm64:16 Using AWS AppConfig Agent with AWS Lambda 173 AWS AppConfig Region Asia Pacific (Melbourne) Asia Pacific (Mumbai) Asia Pacific (Hyderabad) South America (São Paulo) Africa (Cape Town) Middle East (UAE) Middle East (Bahrain) Israel (Tel Aviv) User Guide ARN arn:aws:lambda:ap-southeast -4:307021474294:layer:AWS-A ppConfig-Extension-Arm64:5 arn:aws:lambda:ap-south-1:5 54480029851:layer:AWS-AppCo nfig-Extension-Arm64:49 arn:aws:lambda:ap-south-2:4 89524808438:layer:AWS-AppCo nfig-Extension-Arm64:5 arn:aws:lambda:sa-east-1:00 0010852771:layer:AWS-AppConfig- Extension-Arm64:16 arn:aws:lambda:af-south-1:5 74348263942:layer:AWS-AppCo nfig-Extension-Arm64:11 arn:aws:lambda:me-central-1 :662846165436:layer:AWS-App Config-Extension-Arm64:5 arn:aws:lambda:me-south-1:5 59955524753:layer:AWS-AppCo nfig-Extension-Arm64:13 arn:aws:lambda:il-central-1 :895787185223:layer:AWS-App Config-Extension-Arm64:5 Date replaced by newer extension: 12/01/2023 Using AWS AppConfig Agent with AWS Lambda 174 AWS AppConfig Version 2.0.181 Region US East (N. Virginia) US East (Ohio) US West (N. California) US West (Oregon) Canada (Central) Europe (Frankfurt) Europe (Ireland) Europe (London) Europe (Paris) User Guide ARN arn:aws:lambda:us-east-1:02 7255383542:layer:AWS-AppConfig- Extension-Arm64:46 arn:aws:lambda:us-east-2:72 8743619870:layer:AWS-AppConfig- Extension-Arm64:33 arn:aws:lambda:us-west-1:95 8113053741:layer:AWS-AppConfig- Extension-Arm64:1 arn:aws:lambda:us-west-2:35 9756378197:layer:AWS-AppConfig- Extension-Arm64:48 arn:aws:lambda:ca-central-1 :039592058896:layer:AWS-App Config-Extension-Arm64:1 arn:aws:lambda:eu-central-1 :066940009817:layer:AWS-App Config-Extension-Arm64:36 arn:aws:lambda:eu-west-1:43 4848589818:layer:AWS-AppConfig- Extension-Arm64:48 arn:aws:lambda:eu-west-2:28 2860088358:layer:AWS-AppConfig- Extension-Arm64:33 arn:aws:lambda:eu-west-3:49 3207061005:layer:AWS-AppConfig- Extension-Arm64:1 Using AWS AppConfig Agent with AWS Lambda 175 AWS AppConfig Region Europe (Stockholm) Europe (Milan) Asia Pacific (Hong Kong) Asia Pacific (Tokyo) Asia Pacific (Seoul) Asia Pacific (Osaka) Asia Pacific (Singapore) Asia Pacific (Sydney) Asia Pacific (Jakarta) User Guide ARN arn:aws:lambda:eu-north-1:6 46970417810:layer:AWS-AppCo nfig-Extension-Arm64:1 arn:aws:lambda:eu-south-1:2 03683718741:layer:AWS-AppCo nfig-Extension-Arm64:1 arn:aws:lambda:ap-east-1:63 0222743974:layer:AWS-AppConfig- Extension-Arm64:1 arn:aws:lambda:ap-northeast -1:980059726660:layer:AWS-A ppConfig-Extension-Arm64:37 arn:aws:lambda:ap-northeast -2:826293736237:layer:AWS-A ppConfig-Extension-Arm64:1 arn:aws:lambda:ap-northeast -3:706869817123:layer:AWS-A ppConfig-Extension-Arm64:1 arn:aws:lambda:ap-southeast -1:421114256042:layer:AWS-A ppConfig-Extension-Arm64:43 arn:aws:lambda:ap-southeast -2:080788657173:layer:AWS-A ppConfig-Extension-Arm64:36 arn:aws:lambda:ap-southeast -3:418787028745:layer:AWS-A ppConfig-Extension-Arm64:1 Using AWS AppConfig Agent with AWS Lambda 176 AWS AppConfig Region Asia Pacific (Mumbai) South America (São Paulo) Africa (Cape Town) Middle East (Bahrain) User Guide ARN arn:aws:lambda:ap-south-1:5 54480029851:layer:AWS-AppCo nfig-Extension-Arm64:36 arn:aws:lambda:sa-east-1:00 0010852771:layer:AWS-AppConfig- Extension-Arm64:1 arn:aws:lambda:af-south-1:5 74348263942:layer:AWS-AppCo nfig-Extension-Arm64:1 arn:aws:lambda:me-south-1:5 59955524753:layer:AWS-AppCo nfig-Extension-Arm64:1 Date replaced by newer extension: 03/30/2023 Version 2.0.165 Region US East (N. Virginia) US East (Ohio) US West (Oregon) ARN arn:aws:lambda:us-east-1:02 7255383542:layer:AWS-AppConfig- Extension-Arm64:43 arn:aws:lambda:us-east-2:72 8743619870:layer:AWS-AppConfig- Extension-Arm64:31 arn:aws:lambda:us-west-2:35 9756378197:layer:AWS-AppConfig- Extension-Arm64:45 Using AWS AppConfig Agent with AWS Lambda 177 AWS AppConfig Region Europe (Frankfurt) Europe (Ireland) Europe (London) Asia Pacific (Tokyo) Asia Pacific (Singapore) Asia Pacific (Sydney) Asia Pacific (Mumbai) Date replaced by newer extension: 02/21/2023 User Guide ARN arn:aws:lambda:eu-central-1 :066940009817:layer:AWS-App Config-Extension-Arm64:34 arn:aws:lambda:eu-west-1:43 4848589818:layer:AWS-AppConfig- Extension-Arm64:46 arn:aws:lambda:eu-west-2:28 2860088358:layer:AWS-AppConfig- Extension-Arm64:31 arn:aws:lambda:ap-northeast -1:980059726660:layer:AWS-A ppConfig-Extension-Arm64:35 arn:aws:lambda:ap-southeast -1:421114256042:layer:AWS-A ppConfig-Extension-Arm64:41 arn:aws:lambda:ap-southeast -2:080788657173:layer:AWS-A ppConfig-Extension-Arm64:34 arn:aws:lambda:ap-south-1:5 54480029851:layer:AWS-AppCo nfig-Extension-Arm64:34 Using AWS AppConfig Agent with AWS Lambda 178 AWS AppConfig Version 2.0.122 Region US East (N. Virginia) US East (Ohio) US West (Oregon) Europe (Frankfurt) Europe (Ireland) Europe (London) Asia Pacific (Tokyo) Asia Pacific (Singapore) Asia Pacific (Sydney) User Guide ARN arn:aws:lambda:us-east-1:02 7255383542:layer:AWS-AppConfig- Extension-Arm64:15 arn:aws:lambda:us-east-2:72 8743619870:layer:AWS-AppConfig- Extension-Arm64:11 arn:aws:lambda:us-west-2:35 9756378197:layer:AWS-AppConfig- Extension-Arm64:16 arn:aws:lambda:eu-central-1 :066940009817:layer:AWS-App
appconfig-ug-041
appconfig-ug.pdf
41
Europe (Frankfurt) Europe (Ireland) Europe (London) Asia Pacific (Tokyo) Asia Pacific (Singapore) Asia Pacific (Sydney) Asia Pacific (Mumbai) Date replaced by newer extension: 02/21/2023 User Guide ARN arn:aws:lambda:eu-central-1 :066940009817:layer:AWS-App Config-Extension-Arm64:34 arn:aws:lambda:eu-west-1:43 4848589818:layer:AWS-AppConfig- Extension-Arm64:46 arn:aws:lambda:eu-west-2:28 2860088358:layer:AWS-AppConfig- Extension-Arm64:31 arn:aws:lambda:ap-northeast -1:980059726660:layer:AWS-A ppConfig-Extension-Arm64:35 arn:aws:lambda:ap-southeast -1:421114256042:layer:AWS-A ppConfig-Extension-Arm64:41 arn:aws:lambda:ap-southeast -2:080788657173:layer:AWS-A ppConfig-Extension-Arm64:34 arn:aws:lambda:ap-south-1:5 54480029851:layer:AWS-AppCo nfig-Extension-Arm64:34 Using AWS AppConfig Agent with AWS Lambda 178 AWS AppConfig Version 2.0.122 Region US East (N. Virginia) US East (Ohio) US West (Oregon) Europe (Frankfurt) Europe (Ireland) Europe (London) Asia Pacific (Tokyo) Asia Pacific (Singapore) Asia Pacific (Sydney) User Guide ARN arn:aws:lambda:us-east-1:02 7255383542:layer:AWS-AppConfig- Extension-Arm64:15 arn:aws:lambda:us-east-2:72 8743619870:layer:AWS-AppConfig- Extension-Arm64:11 arn:aws:lambda:us-west-2:35 9756378197:layer:AWS-AppConfig- Extension-Arm64:16 arn:aws:lambda:eu-central-1 :066940009817:layer:AWS-App Config-Extension-Arm64:13 arn:aws:lambda:eu-west-1:43 4848589818:layer:AWS-AppConfig- Extension-Arm64:20 arn:aws:lambda:eu-west-2:28 2860088358:layer:AWS-AppConfig- Extension-Arm64:11 arn:aws:lambda:ap-northeast -1:980059726660:layer:AWS-A ppConfig-Extension-Arm64:15 arn:aws:lambda:ap-southeast -1:421114256042:layer:AWS-A ppConfig-Extension-Arm64:16 arn:aws:lambda:ap-southeast -2:080788657173:layer:AWS-A ppConfig-Extension-Arm64:13 Using AWS AppConfig Agent with AWS Lambda 179 AWS AppConfig Region Asia Pacific (Mumbai) User Guide ARN arn:aws:lambda:ap-south-1:5 54480029851:layer:AWS-AppCo nfig-Extension-Arm64:13 Date replaced by newer extension: 08/23/2022 Version 2.0.58 Region US East (N. Virginia) US East (Ohio) US West (Oregon) Europe (Frankfurt) Europe (Ireland) Europe (London) ARN arn:aws:lambda:us-east-1:02 7255383542:layer:AWS-AppConfig- Extension-Arm64:2 arn:aws:lambda:us-east-2:72 8743619870:layer:AWS-AppConfig- Extension-Arm64:2 arn:aws:lambda:us-west-2:35 9756378197:layer:AWS-AppConfig- Extension-Arm64:3 arn:aws:lambda:eu-central-1 :066940009817:layer:AWS-App Config-Extension-Arm64:2 arn:aws:lambda:eu-west-1:43 4848589818:layer:AWS-AppConfig- Extension-Arm64:7 arn:aws:lambda:eu-west-2:28 2860088358:layer:AWS-AppConfig- Extension-Arm64:2 Using AWS AppConfig Agent with AWS Lambda 180 AWS AppConfig Region Asia Pacific (Tokyo) Asia Pacific (Singapore) Asia Pacific (Sydney) Asia Pacific (Mumbai) User Guide ARN arn:aws:lambda:ap-northeast -1:980059726660:layer:AWS-A ppConfig-Extension-Arm64:2 arn:aws:lambda:ap-southeast -1:421114256042:layer:AWS-A ppConfig-Extension-Arm64:3 arn:aws:lambda:ap-southeast -2:080788657173:layer:AWS-A ppConfig-Extension-Arm64:2 arn:aws:lambda:ap-south-1:5 54480029851:layer:AWS-AppCo nfig-Extension-Arm64:2 Date replaced by newer extension: 04/21/2022 Version 2.0.45 Region US East (N. Virginia) US East (Ohio) US West (Oregon) ARN arn:aws:lambda:us-east-1:02 7255383542:layer:AWS-AppConfig- Extension-Arm64:1 arn:aws:lambda:us-east-2:72 8743619870:layer:AWS-AppConfig- Extension-Arm64:1 arn:aws:lambda:us-west-2:35 9756378197:layer:AWS-AppConfig- Extension-Arm64:2 Using AWS AppConfig Agent with AWS Lambda 181 AWS AppConfig Region Europe (Frankfurt) Europe (Ireland) Europe (London) Asia Pacific (Tokyo) Asia Pacific (Singapore) Asia Pacific (Sydney) Asia Pacific (Mumbai) User Guide ARN arn:aws:lambda:eu-central-1 :066940009817:layer:AWS-App Config-Extension-Arm64:1 arn:aws:lambda:eu-west-1:43 4848589818:layer:AWS-AppConfig- Extension-Arm64:6 arn:aws:lambda:eu-west-2:28 2860088358:layer:AWS-AppConfig- Extension-Arm64:1 arn:aws:lambda:ap-northeast -1:980059726660:layer:AWS-A ppConfig-Extension-Arm64:1 arn:aws:lambda:ap-southeast -1:421114256042:layer:AWS-A ppConfig-Extension-Arm64:2 arn:aws:lambda:ap-southeast -2:080788657173:layer:AWS-A ppConfig-Extension-Arm64:1 arn:aws:lambda:ap-south-1:5 54480029851:layer:AWS-AppCo nfig-Extension-Arm64:1 Using AWS AppConfig Agent with Amazon EC2 and on-premises machines You can integrate AWS AppConfig with applications running on your Amazon Elastic Compute Cloud (Amazon EC2) Linux instances by using AWS AppConfig Agent. The agent enhances application processing and management in the following ways: Using AWS AppConfig Agent with Amazon EC2 and on-premises machines 182 AWS AppConfig User Guide • The agent calls AWS AppConfig on your behalf by using an AWS Identity and Access Management (IAM) role and managing a local cache of configuration data. By pulling configuration data from the local cache, your application requires fewer code updates to manage configuration data, retrieves configuration data in milliseconds, and isn't affected by network issues that can disrupt calls for such data.* • The agent offers a native experience for retrieving and resolving AWS AppConfig feature flags. • Out of the box, the agent provides best practices for caching strategies, polling intervals, and availability of local configuration data while tracking the configuration tokens needed for subsequent service calls. • While running in the background, the agent periodically polls the AWS AppConfig data plane for configuration data updates. Your application can retrieve the data by connecting to localhost on port 2772 (a customizable default port value) and calling HTTP GET to retrieve the data. *AWS AppConfig Agent caches data the first time the service retrieves your configuration data. For this reason, the first call to retrieve data is slower than subsequent calls. Topics • Step 1: (Required) Creating resources and configuring permissions • Step 2: (Required) Installing and starting AWS AppConfig Agent on Amazon EC2 instances • Step 3: (Optional, but recommended) Sending log files to CloudWatch Logs • Step 4: (Optional) Using environment variables to configure AWS AppConfig Agent for Amazon EC2 • Step 5: (Required) Retrieving configuration data • Step 6 (Optional, but recommended): Automating updates to AWS AppConfig Agent Step 1: (Required) Creating resources and configuring permissions To integrate AWS AppConfig with applications running on your Amazon EC2 instances, you must create AWS AppConfig artifacts and configuration data, including feature flags or freeform configuration data. For more information, see Creating feature flags and free form configuration data in AWS AppConfig. To retrieve configuration data hosted by AWS AppConfig, your applications must be configured with access to the AWS AppConfig data plane. To give your applications access, update the IAM Using AWS AppConfig Agent with Amazon EC2 and on-premises machines 183 AWS AppConfig User Guide permissions policy that is assigned to the Amazon EC2 instance role. Specifically, you must add the appconfig:StartConfigurationSession and appconfig:GetLatestConfiguration actions to the policy. Here is an example: { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "appconfig:StartConfigurationSession", "appconfig:GetLatestConfiguration" ], "Resource": "*" } ] } For more information about adding permissions to a policy, see Adding and removing IAM identity permissions in the IAM User Guide. Step 2: (Required) Installing and starting AWS AppConfig Agent on Amazon EC2 instances AWS AppConfig Agent is hosted in an Amazon Simple Storage Service (Amazon S3) bucket that
appconfig-ug-042
appconfig-ug.pdf
42
machines 183 AWS AppConfig User Guide permissions policy that is assigned to the Amazon EC2 instance role. Specifically, you must add the appconfig:StartConfigurationSession and appconfig:GetLatestConfiguration actions to the policy. Here is an example: { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "appconfig:StartConfigurationSession", "appconfig:GetLatestConfiguration" ], "Resource": "*" } ] } For more information about adding permissions to a policy, see Adding and removing IAM identity permissions in the IAM User Guide. Step 2: (Required) Installing and starting AWS AppConfig Agent on Amazon EC2 instances AWS AppConfig Agent is hosted in an Amazon Simple Storage Service (Amazon S3) bucket that is managed by AWS. Use the following procedure to install the latest version of the agent on your Linux instance. If your application is distributed across multiple instances, then you must perform this procedure on each instance that hosts the application. Note Note the following information: • AWS AppConfig Agent is available for Linux operating systems running kernel version 4.15 or greater. Debian-based systems, such as Ubuntu, are not supported. • The agent supports x86_64 and ARM64 architectures. • For distributed applications, we recommend adding the install and startup commands to the Amazon EC2 user data of your Auto Scaling group. If you do, each instance runs the commands automatically. For more information, see Run commands on your Linux instance at launch in the Amazon EC2 User Guide. Additionally, see Tutorial: Configure Using AWS AppConfig Agent with Amazon EC2 and on-premises machines 184 AWS AppConfig User Guide user data to retrieve the target lifecycle state through instance metadata in the Amazon EC2 Auto Scaling User Guide. • The procedures throughout this topic describe how to perform actions like installing the agent by logging into the instance to run the command. You can run the commands from a local client machine and target one or more instances by using Run Command, which is a tool in AWS Systems Manager. For more information, see AWS Systems Manager Run Command in the AWS Systems Manager User Guide. • AWS AppConfig Agent on Amazon EC2 Linux instances is a systemd service. To install and start AWS AppConfig Agent on an instance 1. Log into your Linux instance. 2. Open a terminal and run one of the following commands with Administrator permissions: x86_64 sudo yum install https://s3.amazonaws.com/aws-appconfig-downloads/aws-appconfig- agent/linux/x86_64/latest/aws-appconfig-agent.rpm ARM64 sudo yum install https://s3.amazonaws.com/aws-appconfig-downloads/aws-appconfig- agent/linux/arm64/latest/aws-appconfig-agent.rpm If you want to install a specific version of AWS AppConfig Agent, replace latest in the URL with a specific version number. Here's an example for x86_64: sudo yum install https://s3.amazonaws.com/aws-appconfig-downloads/aws-appconfig- agent/linux/x86_64/2.0.2/aws-appconfig-agent.rpm 3. Run the following command to start the agent: sudo systemctl start aws-appconfig-agent 4. Run the following command to verify the agent is running: sudo systemctl status aws-appconfig-agent Using AWS AppConfig Agent with Amazon EC2 and on-premises machines 185 AWS AppConfig User Guide If successful, the command returns information like the following: aws-appconfig-agent.service - aws-appconfig-agent ... Active: active (running) since Mon 2023-07-26 00:00:00 UTC; 0s ago ... Note To stop the agent, run the following command: sudo systemctl stop aws-appconfig-agent Step 3: (Optional, but recommended) Sending log files to CloudWatch Logs By default, AWS AppConfig Agent publishes logs to STDERR. Systemd redirects STDOUT and STDERR for all services running on the Linux instance to the systemd journal. You can view and manage log data in the systemd journal if you're running AWS AppConfig Agent on only one or two instances. A better solution, a solution we highly recommend for distributed applications, is to write log files to disk and then use Amazon CloudWatch agent to upload the log data to the AWS cloud. Additionally, you can configure the CloudWatch agent to delete old log files from your instance, which prevents your instance from running out of disk space. To enable logging to disk, you must set the LOG_PATH environment variable, as described in Step 4: (Optional) Using environment variables to configure AWS AppConfig Agent for Amazon EC2. To get started with the CloudWatch agent, see Collect metrics and logs from Amazon EC2 instances and on-premises servers with the CloudWatch agent in the Amazon CloudWatch User Guide. You can use Quick Setup, a tool in Systems Manager to quickly install the CloudWatch agent. For more information, see Quick Setup Host Management in the AWS Systems Manager User Guide. Warning If you choose to write log files to disk without using the CloudWatch agent, you must delete old log files. AWS AppConfig Agent automatically rotates log files every hour. If you don't delete old log files, your instance can run out of disk space. Using AWS AppConfig Agent with Amazon EC2 and on-premises machines 186 AWS AppConfig User Guide After you install the CloudWatch agent on your instance, create a CloudWatch agent configuration file. The configuration file instructs CloudWatch agent on how to work with AWS AppConfig Agent log files. For
appconfig-ug-043
appconfig-ug.pdf
43
Management in the AWS Systems Manager User Guide. Warning If you choose to write log files to disk without using the CloudWatch agent, you must delete old log files. AWS AppConfig Agent automatically rotates log files every hour. If you don't delete old log files, your instance can run out of disk space. Using AWS AppConfig Agent with Amazon EC2 and on-premises machines 186 AWS AppConfig User Guide After you install the CloudWatch agent on your instance, create a CloudWatch agent configuration file. The configuration file instructs CloudWatch agent on how to work with AWS AppConfig Agent log files. For more information about creating a CloudWatch agent configuration file, see Create the CloudWatch agent configuration file. Add the following logs section to the CloudWatch agent configuration file on the instance and save your changes: "logs": { "logs_collected": { "files": { "collect_list": [ { "file_path": "/path_you_specified_for_logging", "log_group_name": "${YOUR_LOG_GROUP_NAME}/aws-appconfig-agent.log", "auto_removal": true }, ... ] }, ... }, ... } If the value of auto_removal is true, the CloudWatch agent automatically deletes rotated AWS AppConfig Agent log files. Step 4: (Optional) Using environment variables to configure AWS AppConfig Agent for Amazon EC2 You can configure AWS AppConfig Agent for Amazon EC2 by using environment variables. To set environment variables for a systemd service, you create a drop-in unit file. The following example shows how to create drop-in unit file to set the AWS AppConfig Agent logging level to DEBUG. Example of how to create a drop-in unit file for environment variables 1. Log into your Linux instance. 2. Open a terminal and run the following command with Administrator permissions. The command creates a configuration directory: Using AWS AppConfig Agent with Amazon EC2 and on-premises machines 187 AWS AppConfig User Guide sudo mkdir /etc/systemd/system/aws-appconfig-agent.service.d 3. Run the following command to create the drop-in unit file. Replace file_name with a name for the file. The extension must be .conf: sudo touch /etc/systemd/system/aws-appconfig-agent.service.d/file_name.conf 4. Enter information in the drop-in unit file. The following example adds a Service section that defines an environment variable. The example sets AWS AppConfig Agent log level to DEBUG. [Service] Environment=LOG_LEVEL=DEBUG 5. Run the following command to reload the systemd configuration: sudo systemctl daemon-reload 6. Run the following command to restart AWS AppConfig Agent: sudo systemctl restart aws-appconfig-agent You can configure AWS AppConfig Agent for Amazon EC2 by specifying the following environment variables in a drop-in unit file. Note The following table includes a Sample values column. Depending on your monitor resolution, you might need to scroll to the bottom of the table and then scroll to the right to view the column. Environment variable ACCESS_TOKEN Details Default value Sample value(s) This environment variable defines a token that must None MyAccessToken Using AWS AppConfig Agent with Amazon EC2 and on-premises machines 188 AWS AppConfig Environment variable Details Default value Sample value(s) User Guide be provided when requesting configura tion data from the agent HTTP server. The value of the token must be set in the HTTP request authorization header with an authorization type of Bearer. Here is an example. GET /applicat ions/my_app/... Host: localhost :2772 Authorization: Bearer <token value> Using AWS AppConfig Agent with Amazon EC2 and on-premises machines 189 AWS AppConfig Environment variable BACKUP_DI RECTORY Details Default value Sample value(s) User Guide This environment variable enables AWS None /path/to/backups AppConfig Agent to save a backup of each configuration it retrieves to the specified directory. Important Configura tions backed up to disk are not encrypted . If your configura tion contains sensitive data, AWS AppConfig recommend s that you practice the principle of least privilege with your filesystem permissio ns. For more information, see Security in AWS AppConfig. Using AWS AppConfig Agent with Amazon EC2 and on-premises machines 190 AWS AppConfig Environment variable HTTP_PORT Details Default value Sample value(s) User Guide 2772 2772 This environment variable specifies the port on which the HTTP server for the agent runs. trace debug info warn error fatal none LOG_LEVEL This environment variable specifies the info level of detail that the agent logs. Each level includes the current level and all higher levels. The value is case insensiti ve. From most to least detailed, the log levels are: trace, debug, info, warn, error, fatal, and none. The trace log includes detailed informati on, including timing information, about the agent. The disk location where logs are written. If not specified, logs are written to stderr. LOG_PATH None /path/to/logs/agen t.log Using AWS AppConfig Agent with Amazon EC2 and on-premises machines 191 AWS AppConfig Environment variable MANIFEST MAX_CONNECTIONS Details Default value Sample value(s) User Guide None When using AWS AppConfig configura tion as manifest: MyApp:MyE nv:MyMani festConfig . When loading manifest from disk: file:/path/to/ manifest.json 3 3 This environment variable configure s AWS AppConfig Agent to take advantage of additional per-confi guration features like multi-account retrievals and save configuration
appconfig-ug-044
appconfig-ug.pdf
44
The trace log includes detailed informati on, including timing information, about the agent. The disk location where logs are written. If not specified, logs are written to stderr. LOG_PATH None /path/to/logs/agen t.log Using AWS AppConfig Agent with Amazon EC2 and on-premises machines 191 AWS AppConfig Environment variable MANIFEST MAX_CONNECTIONS Details Default value Sample value(s) User Guide None When using AWS AppConfig configura tion as manifest: MyApp:MyE nv:MyMani festConfig . When loading manifest from disk: file:/path/to/ manifest.json 3 3 This environment variable configure s AWS AppConfig Agent to take advantage of additional per-confi guration features like multi-account retrievals and save configuration to disk. For more information about these features, see Using a manifest to enable additional retrieval features. This environment variable configure s the maximum number of connectio ns that the agent uses to retrieve configurations from AWS AppConfig. Using AWS AppConfig Agent with Amazon EC2 and on-premises machines 192 AWS AppConfig Environment variable POLL_INTERVAL PREFETCH_LIST Details Default value Sample value(s) User Guide 45 seconds 45 45s 5m 1h None MyApp:MyE nv:MyConfig abcd123:efgh456:ij kl789 MyApp:MyEnv:Config 1,MyApp:MyEnv:Conf ig2 This environment variable controls how often the agent polls AWS AppConfig for updated configura tion data. You can specify a number of seconds for the interval. You can also specify a number with a time unit: s for seconds, m for minutes, and h for hours. If a unit isn't specified, the agent defaults to seconds. For example, 60, 60s, and 1m result in the same poll interval. This environment variable specifies the configuration data the agent requests from AWS AppConfig as soon as it starts. Multiple configura tion identifiers may be provided in a comma-separated list. Using AWS AppConfig Agent with Amazon EC2 and on-premises machines 193 AWS AppConfig Environment variable PRELOAD_BACKUPS PROXY_HEADERS Details Default value Sample value(s) User Guide true true false None header: value h1: v1, h2: v2 If set to true, AWS AppConfig Agent loads configuration backups found in the BACKUP_DI RECTORY into memory and immediately checks to see if a newer version exists from the service. If set to false, AWS AppConfig Agent only loads the contents from a configuration backup if it cannot retrieve configuration data from the service, for example if there is a problem with your network. This environment variable specifies headers that are required by the proxy referenced in the PROXY_URL environment variable. The value is a comma-separated list of headers. Using AWS AppConfig Agent with Amazon EC2 and on-premises machines 194 AWS AppConfig Environment variable PROXY_URL Details Default value Sample value(s) User Guide None http://localhost:7474 https://my-proxy.e xample.com This environment variable specifies the proxy URL to use for connections from the agent to AWS services, including AWS AppConfig. HTTPS and HTTP URLs are supported. Using AWS AppConfig Agent with Amazon EC2 and on-premises machines 195 AWS AppConfig Environment variable REQUEST_TIMEOUT Details Default value Sample value(s) User Guide 3000ms 3000 3000ms 5s This environment variable controls the amount of time the agent waits for a response from AWS AppConfig. If the service does not respond, the request fails. If the request is for the initial data retrieval, the agent returns an error to your application. If the timeout occurs during a backgroun d check for updated data, the agent logs the error and tries again after a short delay. You can specify the number of milliseco nds for the timeout. You can also specify a number with a time unit: ms for milliseconds and s for seconds. If a unit isn't specified, the agent defaults Using AWS AppConfig Agent with Amazon EC2 and on-premises machines 196 AWS AppConfig Environment variable Details Default value Sample value(s) User Guide to milliseconds. As an example, 5000, 5000ms and 5s result in the same request timeout value. ROLE_ARN This environment variable specifies the None arn:aws:iam::12345 6789012:role/MyRole Amazon Resource Name (ARN) of an IAM role. AWS AppConfig Agent assumes this role to retrieve configuration data. ROLE_EXTE RNAL_ID This environment variable specifies the None MyExternalId external ID to use with the assumed role ARN. ROLE_SESS ION_NAME This environment variable specifies the None AWSAppCon figAgentSession session name to be associated with the credentials for the assumed IAM role. Using AWS AppConfig Agent with Amazon EC2 and on-premises machines 197 AWS AppConfig Environment variable SERVICE_REGION WAIT_ON_M ANIFEST Details Default value Sample value(s) User Guide None us-east-1 eu-west-1 true true false This environment variable specifies an alternative AWS Region that AWS AppConfig Agent uses to call the AWS AppConfig service. If left undefined, the agent attempts to determine the current Region. If it can't, the agent fails to start. This environment variable configure s AWS AppConfig Agent to wait until the manifest is processed before completing startup. Step 5: (Required) Retrieving configuration data You can retrieve configuration data from AWS AppConfig Agent by using an HTTP localhost call. The following examples use curl with an
appconfig-ug-045
appconfig-ug.pdf
45
SERVICE_REGION WAIT_ON_M ANIFEST Details Default value Sample value(s) User Guide None us-east-1 eu-west-1 true true false This environment variable specifies an alternative AWS Region that AWS AppConfig Agent uses to call the AWS AppConfig service. If left undefined, the agent attempts to determine the current Region. If it can't, the agent fails to start. This environment variable configure s AWS AppConfig Agent to wait until the manifest is processed before completing startup. Step 5: (Required) Retrieving configuration data You can retrieve configuration data from AWS AppConfig Agent by using an HTTP localhost call. The following examples use curl with an HTTP client. You can call the agent using any available HTTP client supported by your application language or available libraries, including an AWS SDK. To retrieve the full content of any deployed configuration $ curl "http://localhost:2772/applications/application_name/ environments/environment_name/configurations/configuration_name" Using AWS AppConfig Agent with Amazon EC2 and on-premises machines 198 AWS AppConfig User Guide To retrieve a single flag and its attributes from an AWS AppConfig configuration of type Feature Flag $ curl "http://localhost:2772/applications/application_name/ environments/environment_name/configurations/configuration_name?flag=flag_name" To access multiple flags and their attributes from an AWS AppConfig configuration of type Feature Flag $ curl "http://localhost:2772/applications/application_name/ environments/environment_name/configurations/configuration_name? flag=flag_name_one&flag=flag_name_two" Step 6 (Optional, but recommended): Automating updates to AWS AppConfig Agent AWS AppConfig Agent is updated periodically. To ensure you are running the latest version of AWS AppConfig Agent on your instances, we recommend that you add the following commands to your Amazon EC2 user data. You can add the commands to the user data on either the instance or the EC2 Auto Scaling group. The script installs and starts the latest version of the agent each time an instance starts or reboots. #!/bin/bash # install the latest version of the agent yum install -y https://s3.amazonaws.com/aws-appconfig-downloads/aws-appconfig-agent/ linux/x86_64/latest/aws-appconfig-agent.rpm # optional: configure the agent mkdir /etc/systemd/system/aws-appconfig-agent.service.d echo "${MY_AGENT_CONFIG}" > /etc/systemd/system/aws-appconfig-agent.service.d/ overrides.conf systemctl daemon-reload # start the agent systemctl start aws-appconfig-agent Using AWS AppConfig Agent with Amazon ECS and Amazon EKS You can integrate AWS AppConfig with Amazon Elastic Container Service (Amazon ECS) and Amazon Elastic Kubernetes Service (Amazon EKS) by using AWS AppConfig Agent. The agent functions as a sidecar container running alongside your Amazon ECS and Amazon EKS container Using AWS AppConfig Agent with Amazon ECS and Amazon EKS 199 AWS AppConfig User Guide applications. The agent enhances containerized application processing and management in the following ways: • The agent calls AWS AppConfig on your behalf by using an AWS Identity and Access Management (IAM) role and managing a local cache of configuration data. By pulling configuration data from the local cache, your application requires fewer code updates to manage configuration data, retrieves configuration data in milliseconds, and isn't affected by network issues that can disrupt calls for such data.* • The agent offers a native experience for retrieving and resolving AWS AppConfig feature flags. • Out of the box, the agent provides best practices for caching strategies, polling intervals, and local configuration data availability while tracking the configuration tokens needed for subsequent service calls. • While running in the background, the agent periodically polls the AWS AppConfig data plane for configuration data updates. Your containerized application can retrieve the data by connecting to localhost on port 2772 (a customizable default port value) and calling HTTP GET to retrieve the data. • AWS AppConfig Agent updates configuration data in your containers without having to restart or recycle those containers. *AWS AppConfig Agent caches data the first time the service retrieves your configuration data. For this reason, the first call to retrieve data is slower than subsequent calls. Before you begin To integrate AWS AppConfig with your container applications, you must create AWS AppConfig artifacts and configuration data, including feature flags or freeform configuration data. For more information, see Creating feature flags and free form configuration data in AWS AppConfig. To retrieve configuration data hosted by AWS AppConfig, your container applications must be configured with access to the AWS AppConfig data plane. To give your applications access, update the IAM permissions policy that is used by your container service IAM role. Specifically, you must add the appconfig:StartConfigurationSession and appconfig:GetLatestConfiguration actions to the policy. Container service IAM roles include the following: • The Amazon ECS task role • The Amazon EKS node role Using AWS AppConfig Agent with Amazon ECS and Amazon EKS 200 AWS AppConfig User Guide • The AWS Fargate pod execution role (if your Amazon EKS containers use Fargate for compute processing) For more information about adding permissions to a policy, see Adding and removing IAM identity permissions in the IAM User Guide. Topics • Starting the AWS AppConfig agent for Amazon ECS integration • Starting the AWS AppConfig agent for Amazon EKS integration • (Optional) Running AWS AppConfig as a DaemonSet in Amazon EKS • (Optional) Using environment variables to configure AWS AppConfig Agent for
appconfig-ug-046
appconfig-ug.pdf
46
Amazon EKS node role Using AWS AppConfig Agent with Amazon ECS and Amazon EKS 200 AWS AppConfig User Guide • The AWS Fargate pod execution role (if your Amazon EKS containers use Fargate for compute processing) For more information about adding permissions to a policy, see Adding and removing IAM identity permissions in the IAM User Guide. Topics • Starting the AWS AppConfig agent for Amazon ECS integration • Starting the AWS AppConfig agent for Amazon EKS integration • (Optional) Running AWS AppConfig as a DaemonSet in Amazon EKS • (Optional) Using environment variables to configure AWS AppConfig Agent for Amazon ECS and Amazon EKS • Retrieving configuration data for applications running in Amazon ECS and Amazon EKS Starting the AWS AppConfig agent for Amazon ECS integration The AWS AppConfig Agent sidecar container is automatically available in your Amazon ECS environment. To use it, you must start it, as described in the following procedure. To start Amazon ECS (console) 1. Open the console at https://console.aws.amazon.com/ecs/v2. 2. In the navigation pane, choose Task definitions. 3. Choose the task definition for your application, and then select the latest revision. 4. Choose Create new revision, Create new revision. 5. Choose Add more containers. 6. 7. 8. 9. For Name, enter a unique name for the AWS AppConfig Agent container. For Image URI, enter: public.ecr.aws/aws-appconfig/aws-appconfig-agent:2.x For Essential container, choose Yes. In the Port mappings section, choose Add port mapping. 10. For Container port, enter 2772. Using AWS AppConfig Agent with Amazon ECS and Amazon EKS 201 AWS AppConfig Note User Guide AWS AppConfig Agent runs on port 2772, by default. You can specify a different port. 11. Choose Create. Amazon ECS creates a new container revision and displays the details. 12. In the navigation pane, choose Clusters, and then choose your application cluster in the list. 13. On the Services tab, select the service for your application. 14. Choose Update. 15. Under Deployment configuration, for Revision, choose the latest revision. 16. Choose Update. Amazon ECS deploys the latest task definition. 17. After the deployment finishes, you can verify that AWS AppConfig Agent is running on the Configuration and tasks tab. On the Tasks tab, choose the running task. 18. In the Containers section, verify that the AWS AppConfig Agent container is listed. 19. To verify that AWS AppConfig Agent started, choose the Logs tab. Locate a statement like the following for the AWS AppConfig Agent container: [appconfig agent] 1970/01/01 00:00:00 INFO serving on localhost:2772 Note Note the following information. • AWS AppConfig Agent is a long-running process. As a best practice for Amazon ECS containers, configure health checks for your containers, specifically setting the container dependency to the HEALTHY condition. For more information, see ContainerDependency in the Amazon Elastic Container Service API Reference. • You can adjust the default behavior of AWS AppConfig Agent by entering or changing environment variables. For information about the available environment variables, see (Optional) Using environment variables to configure AWS AppConfig Agent for Amazon ECS and Amazon EKS. For information about how to change environment variables in Amazon ECS, see Passing environment variables to a container in the Amazon Elastic Container Service Developer Guide. Using AWS AppConfig Agent with Amazon ECS and Amazon EKS 202 AWS AppConfig User Guide Starting the AWS AppConfig agent for Amazon EKS integration The AWS AppConfig Agent sidecar container is automatically available in your Amazon EKS environment. To use it, you must start it. The following procedure describes how to use the Amazon EKS kubectl command line tool to start the agent. Note Before you continue, ensure that your kubeconfig file is up to date. For more information about creating or editing a kubeconfig file, see Creating or updating a kubeconfig file for an Amazon EKS cluster in the Amazon EKS User Guide. To start AWS AppConfig Agent (kubectl command line tool) 1. Open the manifest for your application and verify that your Amazon EKS application is running as a single-container deployment. Contents of the file should look similar to the following. apiVersion: apps/v1 kind: Deployment metadata: name: my-app namespace: my-namespace labels: app: my-application-label spec: replicas: 1 selector: matchLabels: app: my-application-label template: metadata: labels: app: my-application-label spec: containers: - name: my-app image: my-repo/my-image imagePullPolicy: IfNotPresent 2. Add the AWS AppConfig Agent container definition details to your deployment manifest. Using AWS AppConfig Agent with Amazon ECS and Amazon EKS 203 AWS AppConfig User Guide - name: appconfig-agent image: public.ecr.aws/aws-appconfig/aws-appconfig-agent:2.x ports: - name: http containerPort: 2772 protocol: TCP env: - name: SERVICE_REGION value: AWS Region imagePullPolicy: IfNotPresent Note Note the following information. • AWS AppConfig Agent runs on port 2772, by default. You can specify a different port. • You can adjust the default behavior of AWS AppConfig Agent by entering environment variables. For more information, see (Optional) Using environment variables to configure AWS AppConfig Agent
appconfig-ug-047
appconfig-ug.pdf
47
IfNotPresent 2. Add the AWS AppConfig Agent container definition details to your deployment manifest. Using AWS AppConfig Agent with Amazon ECS and Amazon EKS 203 AWS AppConfig User Guide - name: appconfig-agent image: public.ecr.aws/aws-appconfig/aws-appconfig-agent:2.x ports: - name: http containerPort: 2772 protocol: TCP env: - name: SERVICE_REGION value: AWS Region imagePullPolicy: IfNotPresent Note Note the following information. • AWS AppConfig Agent runs on port 2772, by default. You can specify a different port. • You can adjust the default behavior of AWS AppConfig Agent by entering environment variables. For more information, see (Optional) Using environment variables to configure AWS AppConfig Agent for Amazon ECS and Amazon EKS. • For AWS Region, specify the AWS Region code (for example, us-west-1) where AWS AppConfig Agent retrieves configuration data. 3. Run the following kubectl command to apply the changes to your cluster. Replace my- deployment with the name of your deployment manifest. kubectl apply -f my-deployment.yml 4. After the deployment finishes, verify that AWS AppConfig Agent is running. Use the following command to view the application pod log file. kubectl logs -n my-namespace -c appconfig-agent my-pod Locate a statement like the following for the AWS AppConfig Agent container: [appconfig agent] 1970/01/01 00:00:00 INFO serving on localhost:2772 Using AWS AppConfig Agent with Amazon ECS and Amazon EKS 204 AWS AppConfig Note User Guide You can adjust the default behavior of AWS AppConfig Agent by entering or changing environment variables. For information about the available environment variables, see (Optional) Using environment variables to configure AWS AppConfig Agent for Amazon ECS and Amazon EKS. (Optional) Running AWS AppConfig as a DaemonSet in Amazon EKS With Amazon EKS, you can run AWS AppConfig Agent as a sidecar, which results in one agent container per application pod. Or, if you prefer, you can run AWS AppConfig Agent as a DaemonSet, which results in one agent container per node in your cluster. Note If you run AWS AppConfig Agent as a DaemonSet, the agent runs in a separate pod, which means you can't access it with calls to localhost. You must inject or otherwise discover the agent pod's IP address in order to call it. To run AWS AppConfig Agent as a DaemonSet, create a manifest file with the following contents. Replace highlighted text with details for your application and environment. For AWS Region, specify an AWS Region code (for example, us-west-1). apiVersion: apps/v1 kind: DaemonSet metadata: name: aws-appconfig-agent namespace: my_namespace labels: app: my_application_label spec: selector: matchLabels: app: my_application_label template: metadata: labels: app: my_application_label Using AWS AppConfig Agent with Amazon ECS and Amazon EKS 205 AWS AppConfig spec: containers: - name: aws-appconfig-agent image: public.ecr.aws/aws-appconfig/aws-appconfig-agent:2.x User Guide ports: - name: http containerPort: 2772 protocol: TCP env: - name: SERVICE_REGION value: AWS Region imagePullPolicy: IfNotPresent # set a high priority class to ensure the agent is running on every node priorityClassName: system-node-critical Run the following command to apply the AWS AppConfig Agent DaemonSet to your cluster. Replace aws_appconfig_agent_daemonset with the name of your DaemonSet manifest. kubectl apply -f aws_appconfig_agent_daemonset.yml (Optional) Using environment variables to configure AWS AppConfig Agent for Amazon ECS and Amazon EKS You can configure AWS AppConfig Agent by changing the following environment variables for your agent container. Note The following table includes a Sample values column. Depending on your monitor resolution, you might need to scroll to the bottom of the table and then scroll to the right to view the column. Environment variable ACCESS_TOKEN Details Default value Sample value(s) This environment variable defines a token that must None MyAccessToken Using AWS AppConfig Agent with Amazon ECS and Amazon EKS 206 AWS AppConfig Environment variable Details Default value Sample value(s) User Guide be provided when requesting configura tion data from the agent HTTP server. The value of the token must be set in the HTTP request authorization header with an authorization type of Bearer. Here is an example. GET /applicat ions/my_app/... Host: localhost :2772 Authorization: Bearer <token value> Using AWS AppConfig Agent with Amazon ECS and Amazon EKS 207 AWS AppConfig Environment variable BACKUP_DI RECTORY Details Default value Sample value(s) User Guide This environment variable enables AWS None /path/to/backups AppConfig Agent to save a backup of each configuration it retrieves to the specified directory. Important Configura tions backed up to disk are not encrypted . If your configura tion contains sensitive data, AWS AppConfig recommend s that you practice the principle of least privilege with your filesystem permissio ns. For more information, see Security in AWS AppConfig. Using AWS AppConfig Agent with Amazon ECS and Amazon EKS 208 AWS AppConfig Environment variable HTTP_PORT Details Default value Sample value(s) User Guide 2772 2772 This environment variable specifies the port on which the HTTP server for the agent runs. trace debug info warn error fatal none LOG_LEVEL This environment variable specifies the info level of detail that the agent logs. Each
appconfig-ug-048
appconfig-ug.pdf
48
to disk are not encrypted . If your configura tion contains sensitive data, AWS AppConfig recommend s that you practice the principle of least privilege with your filesystem permissio ns. For more information, see Security in AWS AppConfig. Using AWS AppConfig Agent with Amazon ECS and Amazon EKS 208 AWS AppConfig Environment variable HTTP_PORT Details Default value Sample value(s) User Guide 2772 2772 This environment variable specifies the port on which the HTTP server for the agent runs. trace debug info warn error fatal none LOG_LEVEL This environment variable specifies the info level of detail that the agent logs. Each level includes the current level and all higher levels. The value is case insensiti ve. From most to least detailed, the log levels are: trace, debug, info, warn, error, fatal, and none. The trace log includes detailed informati on, including timing information, about the agent. The disk location where logs are written. If not specified, logs are written to stderr. LOG_PATH None /path/to/logs/agen t.log Using AWS AppConfig Agent with Amazon ECS and Amazon EKS 209 AWS AppConfig Environment variable MANIFEST MAX_CONNECTIONS Details Default value Sample value(s) User Guide None When using AWS AppConfig configura tion as manifest: MyApp:MyE nv:MyMani festConfig . When loading manifest from disk: file:/path/to/ manifest.json 3 3 This environment variable configure s AWS AppConfig Agent to take advantage of additional per-confi guration features like multi-account retrievals and save configuration to disk. For more information about these features, see Using a manifest to enable additional retrieval features. This environment variable configure s the maximum number of connectio ns that the agent uses to retrieve configurations from AWS AppConfig. Using AWS AppConfig Agent with Amazon ECS and Amazon EKS 210 AWS AppConfig Environment variable POLL_INTERVAL PREFETCH_LIST Details Default value Sample value(s) User Guide 45 seconds 45 45s 5m 1h None MyApp:MyE nv:MyConfig abcd123:efgh456:ij kl789 MyApp:MyEnv:Config 1,MyApp:MyEnv:Conf ig2 This environment variable controls how often the agent polls AWS AppConfig for updated configura tion data. You can specify a number of seconds for the interval. You can also specify a number with a time unit: s for seconds, m for minutes, and h for hours. If a unit isn't specified, the agent defaults to seconds. For example, 60, 60s, and 1m result in the same poll interval. This environment variable specifies the configuration data the agent requests from AWS AppConfig as soon as it starts. Multiple configura tion identifiers may be provided in a comma-separated list. Using AWS AppConfig Agent with Amazon ECS and Amazon EKS 211 AWS AppConfig Environment variable PRELOAD_BACKUPS PROXY_HEADERS Details Default value Sample value(s) User Guide true true false None header: value h1: v1, h2: v2 If set to true, AWS AppConfig Agent loads configuration backups found in the BACKUP_DI RECTORY into memory and immediately checks to see if a newer version exists from the service. If set to false, AWS AppConfig Agent only loads the contents from a configuration backup if it cannot retrieve configuration data from the service, for example if there is a problem with your network. This environment variable specifies headers that are required by the proxy referenced in the PROXY_URL environment variable. The value is a comma-separated list of headers. Using AWS AppConfig Agent with Amazon ECS and Amazon EKS 212 AWS AppConfig Environment variable PROXY_URL Details Default value Sample value(s) User Guide None http://localhost:7474 https://my-proxy.e xample.com This environment variable specifies the proxy URL to use for connections from the agent to AWS services, including AWS AppConfig. HTTPS and HTTP URLs are supported. Using AWS AppConfig Agent with Amazon ECS and Amazon EKS 213 AWS AppConfig Environment variable REQUEST_TIMEOUT Details Default value Sample value(s) User Guide 3000ms 3000 3000ms 5s This environment variable controls the amount of time the agent waits for a response from AWS AppConfig. If the service does not respond, the request fails. If the request is for the initial data retrieval, the agent returns an error to your application. If the timeout occurs during a backgroun d check for updated data, the agent logs the error and tries again after a short delay. You can specify the number of milliseco nds for the timeout. You can also specify a number with a time unit: ms for milliseconds and s for seconds. If a unit isn't specified, the agent defaults Using AWS AppConfig Agent with Amazon ECS and Amazon EKS 214 AWS AppConfig Environment variable Details Default value Sample value(s) User Guide to milliseconds. As an example, 5000, 5000ms and 5s result in the same request timeout value. ROLE_ARN This environment variable specifies the None arn:aws:iam::12345 6789012:role/MyRole Amazon Resource Name (ARN) of an IAM role. AWS AppConfig Agent assumes this role to retrieve configuration data. ROLE_EXTE RNAL_ID This environment variable specifies the None MyExternalId external ID to use with the assumed role ARN. ROLE_SESS ION_NAME This environment variable specifies
appconfig-ug-049
appconfig-ug.pdf
49
s for seconds. If a unit isn't specified, the agent defaults Using AWS AppConfig Agent with Amazon ECS and Amazon EKS 214 AWS AppConfig Environment variable Details Default value Sample value(s) User Guide to milliseconds. As an example, 5000, 5000ms and 5s result in the same request timeout value. ROLE_ARN This environment variable specifies the None arn:aws:iam::12345 6789012:role/MyRole Amazon Resource Name (ARN) of an IAM role. AWS AppConfig Agent assumes this role to retrieve configuration data. ROLE_EXTE RNAL_ID This environment variable specifies the None MyExternalId external ID to use with the assumed role ARN. ROLE_SESS ION_NAME This environment variable specifies the None AWSAppCon figAgentSession session name to be associated with the credentials for the assumed IAM role. Using AWS AppConfig Agent with Amazon ECS and Amazon EKS 215 AWS AppConfig Environment variable SERVICE_REGION WAIT_ON_M ANIFEST Details Default value Sample value(s) User Guide None us-east-1 eu-west-1 true true false This environment variable specifies an alternative AWS Region that AWS AppConfig Agent uses to call the AWS AppConfig service. If left undefined, the agent attempts to determine the current Region. If it can't, the agent fails to start. This environment variable configure s AWS AppConfig Agent to wait until the manifest is processed before completing startup. Retrieving configuration data for applications running in Amazon ECS and Amazon EKS You can retrieve configuration data from AWS AppConfig Agent for applications running in Amazon ECS and Amazon EKS by using an HTTP localhost call. The following examples use curl with an HTTP client. You can call the agent using any available HTTP client supported by your application language or available libraries. Using AWS AppConfig Agent with Amazon ECS and Amazon EKS 216 AWS AppConfig Note User Guide To retrieve configuration data if your application uses a forward slash, for example "test- backend/test-service", you will need to use URL encoding. To retrieve the full content of any deployed configuration $ curl "http://localhost:2772/applications/application_name/ environments/environment_name/configurations/configuration_name" To retrieve a single flag and its attributes from an AWS AppConfig configuration of type Feature Flag $ curl "http://localhost:2772/applications/application_name/ environments/environment_name/configurations/configuration_name?flag=flag_name" To access multiple flags and their attributes from an AWS AppConfig configuration of type Feature Flag $ curl "http://localhost:2772/applications/application_name/ environments/environment_name/configurations/configuration_name? flag=flag_name_one&flag=flag_name_two" The call returns configuration metadata in HTTP headers, including the configuration version, content type, and configuration version label (if applicable). The body of the agent response contains the configuration content. Here is an example: HTTP/1.1 200 OK Configuration-Version: 1 Content-Type: application/json Date: Tue, 18 Feb 2025 20:20:16 GMT Content-Length: 31 My test config Using AWS AppConfig Agent with Amazon ECS and Amazon EKS 217 AWS AppConfig User Guide Retrieving basic and multi-variant feature flags For feature flag configurations (configurations of type AWS.AppConfig.FeatureFlags), the AWS AppConfig Agent enables you to retrieve a single flag or a subset of flags in a configuration. Retrieving one or two flags is useful if your use case only needs to use a few flags from the configuration profile. The following examples use cURL. Note The ability to call a single feature flag or a subset of flags in a configuration is only available in the AWS AppConfig Agent version 2.0.45 and higher. You can retrieve AWS AppConfig configuration data from a local HTTP endpoint. To access a specific flag or a list of flags, use the ?flag=FLAG_KEY query parameter for an AWS AppConfig configuration profile. To retrieve a single flag and its attributes curl "http://localhost:2772/applications/APPLICATION_NAME/ environments/ENVIRONMENT_NAME/configurations/CONFIGURATION_NAME?flag=FLAG_KEY" To retrieve multiple flags and their attributes curl "http://localhost:2772/applications/APPLICATION_NAME/ environments/ENVIRONMENT_NAME/configurations/CONFIGURATION_NAME? flag=FLAG_KEY_ONE&flag=FLAG_KEY_TWO" To retrieve feature flag variants based on caller context The following Python examples show how to retrieve feature flag variants based on caller context. To best illustrate how to make these calls, this section uses sample calls based on a scenario where a customer created the following variants: Retrieving feature flags 218 AWS AppConfig User Guide Note To retrieve flag variants, you must use the latest version of AWS AppConfig Agent in your compute environment. For more information, see the following topics that describe how to update, install, or add the agent for each of the following compute environments: • For Lambda compute environments: Adding the AWS AppConfig Agent Lambda extension • For Amazon EC2 compute environments: Step 2: (Required) Installing and starting AWS AppConfig Agent on Amazon EC2 instances • For Amazon ECS compute environments: Starting the AWS AppConfig agent for Amazon ECS integration • For Amazon EKS compute environments: Starting the AWS AppConfig agent for Amazon EKS integration To retrieve flag data using the caller context of jane_doe@example.org (who has not opted into the beta program): curl http://localhost:2772/applications/UIRefresh/environments/Production/ configurations/Features \ -H "Context: email=jane_doe@example.org" \ -H "Context: opted_in_to_beta=false" { "ui_refresh": {"_variant":"QA","dark_mode_support":true,"enabled":true} } Retrieving feature flags 219 AWS AppConfig User Guide To retrieve flag data using the caller context of jane_doe@example.org (who has opted into the beta program): curl http://localhost:2772/applications/UIRefresh/environments/Production/ configurations/Features \ -H "Context: email=jane_doe@example.org" \ -H "Context:
appconfig-ug-050
appconfig-ug.pdf
50
EC2 instances • For Amazon ECS compute environments: Starting the AWS AppConfig agent for Amazon ECS integration • For Amazon EKS compute environments: Starting the AWS AppConfig agent for Amazon EKS integration To retrieve flag data using the caller context of jane_doe@example.org (who has not opted into the beta program): curl http://localhost:2772/applications/UIRefresh/environments/Production/ configurations/Features \ -H "Context: email=jane_doe@example.org" \ -H "Context: opted_in_to_beta=false" { "ui_refresh": {"_variant":"QA","dark_mode_support":true,"enabled":true} } Retrieving feature flags 219 AWS AppConfig User Guide To retrieve flag data using the caller context of jane_doe@example.org (who has opted into the beta program): curl http://localhost:2772/applications/UIRefresh/environments/Production/ configurations/Features \ -H "Context: email=jane_doe@example.org" \ -H "Context: opted_in_to_beta=true" { "ui_refresh": {"_variant":"QA","dark_mode_support":true,"enabled":true} } To retrieve flag data using the caller context of jane_doe@qa-testers.example.org (who is a quality assurance tester at Example Organization): curl http://localhost:2772/applications/UIRefresh/environments/Production/ configurations/Features \ -H "Context: email=jane_doe@qa-testers.example.org" { "ui_refresh": {"_variant":"QA","dark_mode_support":true,"enabled":true} } To retrieve flag data without caller context (which returns the Default variant) curl http://localhost:2772/applications/UIRefresh/environments/Production/ configurations/Features { "ui_refresh": {"_variant":"Default Variant","enabled":false} } To retrieve flag data for a traffic splitting scenario to determine if 1 out of 10 random callers receive the 'sample population' variant for i in {0..9} do ; \ curl http://localhost:2772/applications/UIRefresh/environments/Production/ configurations/Features \ -H "Context: email=$i@example.org" { "ui_refresh": {"_variant":"Default Variant","enabled":false} } { "ui_refresh": {"_variant":"Default Variant","enabled":false} Retrieving feature flags 220 AWS AppConfig } User Guide { "ui_refresh": {"_variant":"Default Variant","enabled":false} } { "ui_refresh": {"_variant":"Default Variant","enabled":false} } { "ui_refresh": {"_variant":"Sample Population","dark_mode_support":false,"enabled":true} } { "ui_refresh": {"_variant":"Default Variant","enabled":false} } { "ui_refresh": {"_variant":"Default Variant","enabled":false} } { "ui_refresh": {"_variant":"Default Variant","enabled":false} } { "ui_refresh": {"_variant":"Default Variant","enabled":false} } { "ui_refresh": {"_variant":"Default Variant","enabled":false} } { "ui_refresh": {"_variant":"Default Variant","enabled":false} } Using a manifest to enable additional retrieval features AWS AppConfig Agent offers the following additional features to help you retrieve configurations for your applications. • Configuring AWS AppConfig Agent to retrieve configurations from multiple accounts: Use AWS AppConfig Agent from a primary or retrieval AWS account to retrieve configuration data from multiple vendor accounts. • Configuring AWS AppConfig Agent to write configuration copies to disk: Use AWS AppConfig Agent to write configuration data to disk. This feature enables customers with applications that read configuration data from disk to integrate with AWS AppConfig. Using a manifest to enable additional retrieval features 221 AWS AppConfig User Guide Understanding agent manifests To enable these AWS AppConfig Agent features, you create a manifest. A manifest is a set of configuration data that you provide to control actions the agent can perform. A manifest is written in JSON. It contains a set of top-level keys that correspond to different configurations you’ve deployed using AWS AppConfig. A manifest can include multiple configurations. Furthermore, each configuration in the manifest can identify one or more agent features to use for the specified configuration. The content of the manifest uses the following format: { "application_name:environment_name:configuration_name": { "agent_feature_to_enable_1": { "feature-setting-key": "feature-setting-value" }, "agent_feature_to_enable_2": { "feature-setting-key": "feature-setting-value" } } } Here is example JSON for a manifest with two configurations. The first configuration (MyApp) doesn't use any AWS AppConfig Agent features. The second configuration (My2ndApp) uses the write configuration copy to disk and the multi-account retrieval features: { "MyApp:Test:MyAllowListConfiguration": {}, "My2ndApp:Beta:MyEnableMobilePaymentsFeatureFlagConfiguration": { "credentials": { "roleArn": "arn:us-west-1:iam::123456789012:role/MyTestRole", "roleExternalId": "00b148e2-4ea4-46a1-ab0f-c422b54d0aac", "roleSessionName": "AwsAppConfigAgent", "credentialsDuration": "2h" }, "writeTo": { "path": "/tmp/aws-appconfig/my-2nd-app/beta/my-enable-payments-feature- flag-configuration.json" } } Using a manifest to enable additional retrieval features 222 AWS AppConfig } How to supply an agent manifest User Guide You can store the manifest as a file in a location where AWS AppConfig Agent can read it. Or, you can store the manifest as an AWS AppConfig configuration and point the agent to it. To supply an agent manifest, you must set a MANIFEST environment variable with one of the following values: Manifest location Environment variable value Use case File file:/path/to/agent-manifes t.json Use this method if your manifest won't change often. AWS AppConfig configuration application- name:environment- name:configuration- name Environment variable Manifest content (JSON) Use this method for dynamic updates. You can update and deploy a manifest stored in AWS AppConfig as a configuration in the same ways you store other AWS AppConfig configurations. Use this method if your manifest won't change often. This method is useful in container environments where it's easier to set an environment variable than it is to expose a file. For more information about setting variables for AWS AppConfig Agent, see the relevant topic for your use case: • Configuring the AWS AppConfig Agent Lambda extension • Using AWS AppConfig Agent with Amazon EC2 • Using AWS AppConfig Agent with Amazon ECS and Amazon EKS Using a manifest to enable additional retrieval features 223 AWS AppConfig User Guide Configuring AWS AppConfig Agent to retrieve configurations from multiple accounts You can configure AWS AppConfig Agent to retrieve configurations from multiple AWS accounts by entering credential overrides in the AWS AppConfig Agent manifest. Credential overrides include the Amazon Resource Name (ARN) of an AWS Identity and Access Management (IAM) role, a role ID,
appconfig-ug-051
appconfig-ug.pdf
51
the relevant topic for your use case: • Configuring the AWS AppConfig Agent Lambda extension • Using AWS AppConfig Agent with Amazon EC2 • Using AWS AppConfig Agent with Amazon ECS and Amazon EKS Using a manifest to enable additional retrieval features 223 AWS AppConfig User Guide Configuring AWS AppConfig Agent to retrieve configurations from multiple accounts You can configure AWS AppConfig Agent to retrieve configurations from multiple AWS accounts by entering credential overrides in the AWS AppConfig Agent manifest. Credential overrides include the Amazon Resource Name (ARN) of an AWS Identity and Access Management (IAM) role, a role ID, a session name, and a duration for how long the agent can assume the role. You enter these details in a "credentials" section in the manifest. The "credentials" section uses the following format: { "application_name:environment_name:configuration_name": { "credentials": { "roleArn": "arn:partition:iam::account_ID:role/roleName", "roleExternalId": "string", "roleSessionName": "string", "credentialsDuration": "time_in_hours" } } } Here is an example: { "My2ndApp:Beta:MyEnableMobilePaymentsFeatureFlagConfiguration": { "credentials": { "roleArn": "arn:us-west-1:iam::123456789012:role/MyTestRole", "roleExternalId": "00b148e2-4ea4-46a1-ab0f-c422b54d0aac", "roleSessionName": "AWSAppConfigAgent", "credentialsDuration": "2h" } } } Before retrieving a configuration, the agent reads the credential details for the configuration from the manifest and then assumes the IAM role specified for that configuration. You can specify a different set of credential overrides for different configurations in a single manifest. The following diagram shows how AWS AppConfig Agent, while running in Account A (the retrieval account), assumes separate roles specified for Accounts B and C (the vendor accounts) and then calls the Using a manifest to enable additional retrieval features 224 AWS AppConfig User Guide GetLatestConfiguration API operation to retrieve configuration data from AWS AppConfig running in those accounts: Configure permissions to retrieve configuration data from vendor accounts AWS AppConfig Agent running in the retrieval account needs permission to retrieve configuration data from the vendor accounts. You give the agent permission by creating an AWS Identity and Access Management (IAM) role in each of the vendor accounts. AWS AppConfig Agent in the retrieval account assumes this role to get data from vendor accounts. Complete the procedures in this section to create an IAM permissions policy, an IAM role, and add agent overrides to the manifest. Before you begin Collect the following information before you create a permission policy and a role in IAM. Using a manifest to enable additional retrieval features 225 AWS AppConfig User Guide • The IDs for each AWS account. The retrieval account is the account that will call other accounts for configuration data. The vendor accounts are the accounts that will vend configuration data to the retrieval account. • The name of the IAM role used by AWS AppConfig in the retrieval account. Here's a list of the roles used by AWS AppConfig, by default: • For Amazon Elastic Compute Cloud (Amazon EC2), AWS AppConfig uses the instance role. • For AWS Lambda, AWS AppConfig uses the Lambda execution role. • For Amazon Elastic Container Service (Amazon ECS) and Amazon Elastic Kubernetes Service (Amazon EKS), AWS AppConfig uses the container role. If you configured AWS AppConfig Agent to use a different IAM role by specifying the ROLE_ARN environment variable, make a note of that name. Create the permissions policy Use the following procedure to create a permissions policy using the IAM console. Complete the procedure in each AWS account that will vend configuration data for the retrieval account. To create an IAM policy 1. Sign in to the AWS Management Console in a vendor account. 2. Open the IAM console at https://console.aws.amazon.com/iam/. 3. In the navigation pane, choose Policies, and then choose Create policy. 4. Choose the JSON option. 5. In the Policy editor, replace the default JSON with the following policy statement. Update each example resource placeholder with vendor account details. { "Version": "2012-10-17", "Statement": [{ "Effect": "Allow", "Action": [ "appconfig:StartConfigurationSession", "appconfig:GetLatestConfiguration" ], "Resource": "arn:partition:appconfig:region:vendor_account_ID:application/ Using a manifest to enable additional retrieval features 226 AWS AppConfig User Guide vendor_application_ID/environment/vendor_environment_ID/ configuration/vendor_configuration_ID" } ] } Here's an example: { "Version": "2012-10-17", "Statement": [{ "Effect": "Allow", "Action": [ "appconfig:StartConfigurationSession", "appconfig:GetLatestConfiguration" ], "Resource": "arn:aws:appconfig:us-east-2:111122223333:application/abc123/ environment/def456/configuration/hij789" } ] } 6. Choose Next. 7. 8. In the Policy name field, enter a name. (Optional) For Add tags, add one or more tag-key value pairs to organize, track, or control access for this policy. 9. Choose Create policy. The system returns you to the Policies page. 10. Repeat this procedure in each AWS account that will vend configuration data for the retrieval account. Create the IAM role Use the following procedure to create an IAM role using the IAM console. Complete the procedure in each AWS account that will vend configuration data for the retrieval account. To create an IAM role 1. Sign in to the AWS Management Console in a vendor account. 2. Open the IAM console at https://console.aws.amazon.com/iam/. Using a manifest to enable additional retrieval features 227 AWS AppConfig
appconfig-ug-052
appconfig-ug.pdf
52
for this policy. 9. Choose Create policy. The system returns you to the Policies page. 10. Repeat this procedure in each AWS account that will vend configuration data for the retrieval account. Create the IAM role Use the following procedure to create an IAM role using the IAM console. Complete the procedure in each AWS account that will vend configuration data for the retrieval account. To create an IAM role 1. Sign in to the AWS Management Console in a vendor account. 2. Open the IAM console at https://console.aws.amazon.com/iam/. Using a manifest to enable additional retrieval features 227 AWS AppConfig User Guide 3. 4. 5. 6. 7. In the navigation pane, choose Roles, and then choose Create policy. For Trusted entity type, choose AWS account. In the AWS account section, choose Another AWS account. In the Account ID field, enter the retrieval account ID. (Optional) As a security best practice for this assume role, choose Require external ID and enter a string. 8. Choose Next. 9. On the Add permissions page, use the Search field to locate the policy you created in the previous procedure. Select the check box next to its name. 10. Choose Next. 11. For Role name, enter a name. 12. (Optional) For Description, enter a description. 13. For Step 1: Select trusted entities, choose Edit. Replace the default JSON trust policy with the following policy. Update each example resource placeholder with information from your retrieval account. { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "AWS": "arn:aws:iam::retrieval_account_ID:role/appconfig_role_in_retrieval_account" }, "Action": "sts:AssumeRole" } ] } 14. (Optional) For Tags, add one or more tag-key value pairs to organize, track, or control access for this role. 15. Choose Create role. The system returns you to the Roles page. 16. Search for the role you just created. Choose it. In the ARN section, copy the ARN. You'll specify this information in the next procedure. Using a manifest to enable additional retrieval features 228 AWS AppConfig User Guide Add credential overrides to the manifest After you create the IAM role in your vendor account, update the manifest in the retrieval account. Specifically, add the credentials block and the IAM role ARN for retrieving configuration data from the vendor account. Here is the JSON format: { "vendor_application_name:vendor_environment_name:vendor_configuration_name": { "credentials": { "roleArn": "arn:partition:iam::vendor_account_ID:role/name_of_role_created_in_vendor_account", "roleExternalId": "string", "roleSessionName": "string", "credentialsDuration": "time_in_hours" } } } Here is an example: { "My2ndApp:Beta:MyEnableMobilePaymentsFeatureFlagConfiguration": { "credentials": { "roleArn": "arn:us-west-1:iam::123456789012:role/MyTestRole", "roleExternalId": "00b148e2-4ea4-46a1-ab0f-c422b54d0aac", "roleSessionName": "AwsAppConfigAgent", "credentialsDuration": "2h" } } } Validate that multi-account retrieval is working You can validate that that agent is able to retrieve configuration data from multiple accounts by reviewing the AWS AppConfig agent logs. The INFO level log for retrieved initial data for 'YourApplicationName:YourEnvironmentName:YourConfigurationName' is the best indicator for successful retrievals. If retrievals are failing, you should see an ERROR level log indicating the failure reason. Here is an example for a successful retrieval from a vendor account: [appconfig agent] 2023/11/13 11:33:27 INFO AppConfig Agent 2.0.x [appconfig agent] 2023/11/13 11:33:28 INFO serving on localhost:2772 Using a manifest to enable additional retrieval features 229 AWS AppConfig User Guide [appconfig agent] 2023/11/13 11:33:28 INFO retrieved initial data for 'MyTestApplication:MyTestEnvironment:MyDenyListConfiguration' in XX.Xms Configuring AWS AppConfig Agent to write configuration copies to disk You can configure AWS AppConfig Agent to automatically store a copy of a configuration to disk in plain text. This feature enables customers with applications that read configuration data from disk to integrate with AWS AppConfig. This feature is not designed to be used as a configuration backup feature. AWS AppConfig Agent doesn't read from the configuration files copied to disk. If you want to back up configurations to disk, see the BACKUP_DIRECTORY and PRELOAD_BACKUP environment variables for Using AWS AppConfig Agent with Amazon EC2 or Using AWS AppConfig Agent with Amazon ECS and Amazon EKS. Warning Note the following important information about this feature: • Configurations saved to disk are stored in plain text and are human readable. Don't enable this feature for configurations that include sensitive data. • This feature writes to the local disk. Use the principle of least privilege for filesystem permissions. For more information, see Implement least privilege access. To enable write configuration copy to disk 1. Edit the manifest. 2. Choose the configuration that you want AWS AppConfig to write to disk and add a writeTo element. Here is an example: { "application_name:environment_name:configuration_name": { "writeTo": { "path": "path_to_configuration_file" } } } Using a manifest to enable additional retrieval features 230 AWS AppConfig Here is an example: { User Guide "MyTestApp:MyTestEnvironment:MyNewConfiguration": { "writeTo": { "path": "/tmp/aws-appconfig/mobile-app/beta/enable-mobile-payments" } } } 3. Save your changes. The configuration.json file will be updated each time new configuration data is deployed. Validate that write configuration copy to disk is working You can validate that copies of a configuration are being written to disk by looking by reviewing
appconfig-ug-053
appconfig-ug.pdf
53
the configuration that you want AWS AppConfig to write to disk and add a writeTo element. Here is an example: { "application_name:environment_name:configuration_name": { "writeTo": { "path": "path_to_configuration_file" } } } Using a manifest to enable additional retrieval features 230 AWS AppConfig Here is an example: { User Guide "MyTestApp:MyTestEnvironment:MyNewConfiguration": { "writeTo": { "path": "/tmp/aws-appconfig/mobile-app/beta/enable-mobile-payments" } } } 3. Save your changes. The configuration.json file will be updated each time new configuration data is deployed. Validate that write configuration copy to disk is working You can validate that copies of a configuration are being written to disk by looking by reviewing the AWS AppConfig agent logs. The INFO log entry with the phrasing "INFO wrote configuration 'application:environment:configuration' to file_path" indicates that AWS AppConfig Agent writes configuration copies to disk. Here is an example: [appconfig agent] 2023/11/13 11:33:27 INFO AppConfig Agent 2.0.x [appconfig agent] 2023/11/13 11:33:28 INFO serving on localhost:2772 [appconfig agent] 2023/11/13 11:33:28 INFO retrieved initial data for 'MobileApp:Beta:EnableMobilePayments' in XX.Xms [appconfig agent] 2023/11/13 17:05:49 INFO wrote configuration 'MobileApp:Beta:EnableMobilePayments' to /tmp/configs/your-app/your-env/your- config.json Generating a client using the OpenAPI specification You can use the following YAML specification for OpenAPI to create an SDK using a tool like OpenAPI Generator. You can update this specification to include hardcoded values for Application, Environment, or Configuration. You can also add additional paths (if you have multiple configuration types) and include configuration schemas to generate configuration-specific typed models for your SDK clients. For more information about OpenAPI (which is also known as Swagger), see the OpenAPI specification. openapi: 3.0.0 Generating a client using the OpenAPI specification 231 User Guide AWS AppConfig info: version: 1.0.0 title: AWS AppConfig Agent API description: An API model for AWS AppConfig Agent. servers: - url: http://localhost:{port}/ variables: port: default: '2772' paths: /applications/{Application}/environments/{Environment}/configurations/ {Configuration}: get: operationId: getConfiguration tags: - configuration parameters: - in: path name: Application description: The application for the configuration to get. Specify either the application name or the application ID. required: true schema: type: string - in: path name: Environment description: The environment for the configuration to get. Specify either the environment name or the environment ID. required: true schema: type: string - in: path name: Configuration description: The configuration to get. Specify either the configuration name or the configuration ID. required: true schema: type: string - in: query name: flag description: The key(s) of the feature flag(s) to retrieve. If not provided, all flags are returned. required: false Generating a client using the OpenAPI specification 232 AWS AppConfig User Guide schema: type: array items: type: string - in: header name: context description: Request context used to evaluate multi-variant feature flags. required: false schema: type: array items: type: string pattern: '^\w+=\w+$' responses: 200: headers: ConfigurationVersion: schema: type: string content: application/octet-stream: schema: type: string format: binary description: successful config retrieval 400: description: BadRequestException content: application/text: schema: $ref: '#/components/schemas/Error' 404: description: ResourceNotFoundException content: application/text: schema: $ref: '#/components/schemas/Error' 500: description: InternalServerException content: application/text: schema: $ref: '#/components/schemas/Error' 502: Generating a client using the OpenAPI specification 233 AWS AppConfig User Guide description: BadGatewayException content: application/text: schema: $ref: '#/components/schemas/Error' 504: description: GatewayTimeoutException content: application/text: schema: $ref: '#/components/schemas/Error' components: schemas: Error: type: string description: The response error Working with AWS AppConfig Agent local development mode AWS AppConfig Agent supports a local development mode. If you enable local development mode, the agent reads configuration data from a specified directory on disk. It doesn't retrieve configuration data from AWS AppConfig. You can simulate configuration deployments by updating files in the specified directory. We recommend local development mode for the following use cases: • Test different configuration versions before deploying them using AWS AppConfig. • Test different configuration options for a new feature before committing changes to your code repository. • Test different configuration scenarios to verify they work as expected. Warning Don't use local development mode in production environments. This mode doesn't support important AWS AppConfig safety features like deployment validation and automated rollbacks. Use the following procedure to configure AWS AppConfig Agent for local development mode. Working with AWS AppConfig Agent local development mode 234 AWS AppConfig User Guide To configure AWS AppConfig Agent for local development mode 1. Install the agent using the method described for your compute environment. AWS AppConfig Agent works with the following AWS services: • AWS Lambda • Amazon EC2 • Amazon ECS and Amazon EKS 2. If the agent is running, stop it. 3. Add LOCAL_DEVELOPMENT_DIRECTORY to the list of environment variables. Specify a directory on the filesystem that provides the agent with read permissions. For example, /tmp/ local_configs. 4. Create a file in the directory. The file name must use the following format: application_name:environment_name:configuration_profile_name Here is an example: Mobile:Development:EnableMobilePaymentsFeatureFlagConfiguration Note • To view feature flag samples you can add to a file in your LOCAL_DEVELOPMENT_DIRECTORY directory, see Feature flag samples for AWS AppConfig Agent local development mode. • (Optional) You
appconfig-ug-054
appconfig-ug.pdf
54
AWS services: • AWS Lambda • Amazon EC2 • Amazon ECS and Amazon EKS 2. If the agent is running, stop it. 3. Add LOCAL_DEVELOPMENT_DIRECTORY to the list of environment variables. Specify a directory on the filesystem that provides the agent with read permissions. For example, /tmp/ local_configs. 4. Create a file in the directory. The file name must use the following format: application_name:environment_name:configuration_profile_name Here is an example: Mobile:Development:EnableMobilePaymentsFeatureFlagConfiguration Note • To view feature flag samples you can add to a file in your LOCAL_DEVELOPMENT_DIRECTORY directory, see Feature flag samples for AWS AppConfig Agent local development mode. • (Optional) You can control the content type the agent returns for your configuration data based on the extension you give the file. For example, if you name the file with a .json extension, the agent returns a content type of application/json when your application requests it. If you omit the extension, the agent uses application/octet-stream for the content type. If you need precise control, you can provide an extension in the format .type%subtype. The agent will return a content type of .type/subtype. 5. Run the following command to restart the agent and request the configuration data. Working with AWS AppConfig Agent local development mode 235 AWS AppConfig User Guide curl http://localhost:2772/applications/application_name/ environments/environment_name/configurations/configuration_name The agent checks for changes to the local file at the poll interval specified for the agent. If the poll interval isn't specified, the agent uses the default interval of 45 seconds. This check at the poll interval ensures that the agent behaves the same in a local development environment as it does when configured to interact with the AWS AppConfig service. Note To deploy a new version of a local development configuration file, update the file with new data. Feature flag samples for AWS AppConfig Agent local development mode This section includes feature flag samples you can use with AWS AppConfig Agent in local development mode. Local development mode expects feature flag data in the data's retrieval- time format. Retrieval-time format is the format returned when the flag is retrieved from the GetLatestConfiguration API, which only contains the flag's value. Retrieval-time format doesn't include a flag's complete definition (as passed to the CreateHostedConfigurationVersion API). The complete definition for a flag also contains information such as attribute names and values, constraints, and the flag's enabled state. Topics • Basic feature flag samples • Multi-variant feature flag samples Basic feature flag samples Use the following basic feature flag samples with AWS AppConfig Agent in local development mode. Working with AWS AppConfig Agent local development mode 236 AWS AppConfig Note User Guide If you want the agent to report the content type of your local feature flag data as application/json (as it would when retrieving flag data from AWS AppConfig in an environment that isn't local development mode), your local feature flag files must use the .json extension. For example, Local:MyFeatureFlags:SampleB1.json. Sample 1: A single flag representing a UI refresh. { "ui_refresh": { "enabled": true, "new_styleguide_colors": true } } Sample 2: Multiple flags representing operational feature flags. { "background_worker": { "enabled": true, "num_threads": 4, "queue_name": "MyWorkQueue" }, "emergency_shutoff_switch": { "enabled": false }, "logger_settings": { "enabled": true, "level": "INFO" } } Multi-variant feature flag samples The retrieval-time format of a feature flag configuration that contains at least one multi-variant feature flag is represented as Amazon Ion data instead of JSON data. In this format, multi-variant flags are represented as an annotated list, and basic flags are represented as an annotated string. The list elements of a multi-variant flag are either a tuple (a list with a length of two), which represents a single variant, or a string, which represents the default variant. Within a variant tuple, Working with AWS AppConfig Agent local development mode 237 AWS AppConfig User Guide the first element is an s-expression that represents the variant's rule, and the second element is a string that represents the variant's content. In order for the agent to properly interpret these files, your local feature flag files must use the following extension: .application%ion%type=AWS.AppConfig.FeatureFlags. For example, Local:MyFeatureFlags:SampleMV1.application%ion %type=AWS.AppConfig.FeatureFlags. Sample 1: A multi-variant flag representing a tiered release of a new feature. 'tiered_release'::[ [ (or (and (eq $group "Tier1") (split by::$userId pct::1 seed::"2025.01.01")) (and (eq $group "Tier2") (split by::$userId pct::7 seed::"2025.01.01"))), '''{"_variant": "ShowFeature", "enabled": true}''' ], '''{"_variant": "HideFeature", "enabled": false}''' ] Sample 2: Multiple flags representing different UX displays based on the user’s ID. The first two flags are multi-variant and the final flag is basic. 'colorway'::[ [ (contains $userId "beta"), '''{"_variant": "BetaTesters", "enabled": true, "background": "blue", "foreground": "red"}''', ], [ (split by::$userId pct::10), '''{"_variant": "SplitRollOutRedAndBlue", "enabled": true, "background": "blue", "foreground": "red"}''', ], '''{"_variant": "default", "enabled": true, "background": "green", "foreground": "green"}''', ] 'simple_feature'::[ [ (contains $userId "beta"), '''{"_variant": "BetaTesters", "enabled": true}''' ], Working with AWS AppConfig Agent local development mode 238 AWS AppConfig User Guide
appconfig-ug-055
appconfig-ug.pdf
55
$group "Tier2") (split by::$userId pct::7 seed::"2025.01.01"))), '''{"_variant": "ShowFeature", "enabled": true}''' ], '''{"_variant": "HideFeature", "enabled": false}''' ] Sample 2: Multiple flags representing different UX displays based on the user’s ID. The first two flags are multi-variant and the final flag is basic. 'colorway'::[ [ (contains $userId "beta"), '''{"_variant": "BetaTesters", "enabled": true, "background": "blue", "foreground": "red"}''', ], [ (split by::$userId pct::10), '''{"_variant": "SplitRollOutRedAndBlue", "enabled": true, "background": "blue", "foreground": "red"}''', ], '''{"_variant": "default", "enabled": true, "background": "green", "foreground": "green"}''', ] 'simple_feature'::[ [ (contains $userId "beta"), '''{"_variant": "BetaTesters", "enabled": true}''' ], Working with AWS AppConfig Agent local development mode 238 AWS AppConfig User Guide '''{"_variant": "default", "enabled": false}''' ] 'button_color'::'''{"enabled": true, "color": "orange"}''' AWS AppConfig browser and mobile use considerations Feature flags enable you to update the experience of your web pages and mobile application on the fly, without the overhead, risk, or rigidity of an app store release. Using feature flags, you can gradually release a change to your user base at a time of your choosing. If you encounter an error, you can instantly roll back the change without requiring users to upgrade to a new software version. In short, feature flags provide greater control and flexibility when deploying changes to your application. The following sections describe important considerations for using AWS AppConfig feature flags with web pages and mobiles devices. Topics • Configuration data and flag retrieval • Authentication and Amazon Cognito • Caching • Segmentation • Bandwidth (mobile use cases) • Additional flag use cases Configuration data and flag retrieval For browser and mobile use cases, many customers choose to employ a proxy layer between the web or the mobile application and AWS AppConfig. Doing so decouples your AWS AppConfig call volume from the size of your user base, which reduces costs. It also enables you to leverage the AWS AppConfig Agent, which optimizes flag-retrieval performance and supports features like multi-variant flags. AWS AppConfig recommends using AWS Lambda to create the proxy. Instead of retrieving flags directly from AWS AppConfig, configure the AWS AppConfig Lambda extension to retrieve your feature flags within a Lambda function. Write the function to accept AWS AppConfig retrieval parameters from the event request and to return the corresponding configuration data in the Lambda response. Expose your proxy to the internet using Lambda function URLs. Browser and mobile use considerations 239 AWS AppConfig User Guide After you configure your proxy, consider the frequency in which you retrieve data. Mobile uses cases typically do not require high-frequency polling intervals. Configure AWS AppConfig Agent to refresh data from AWS AppConfig more frequently than your application refreshes from the proxy. Authentication and Amazon Cognito Lambda function URLs support two forms of access control, AWS_IAM and NONE. Use NONE if you prefer to implement your own authentication and authorization in your Lambda function. NONE is also the recommended option if your use case allows exposing your endpoint to the public and your configuration data doesn't contain sensitive data. For all other use cases, use AWS_IAM. Important If you expose your endpoint to the internet without authentication, ensure that your configuration data does not leak sensitive data, including personally identifiable information (PII), user IDs, or unreleased feature names. If you choose to use AWS_IAM, you’ll need to manage credentials with Amazon Cognito. To get started with Amazon Cognito, you create an identity pool. An identity pool allows you to vend short-term credentials to your application for authenticated or guest users. You will need to add roles in the identity pool that permit users to use the InvokeFunctionUrl for your Lambda function. Doing so enables instances of your application to access the credentials necessary to retrieve your configuration data. When working with Amazon Cognito in your application, consider using AWS Amplify. Amplify simplifies mobile/web application interactions with AWS and provides built-in support for Amazon Cognito. Caching When using AWS AppConfig, you should always cache your configuration data locally on the device or in the browser. Caching offers the following advantages: • Improves performance by reducing latency and battery drain • Offers stability by eliminating dependencies to network access • Lowers cost by reducing data retrieval frequency Authentication and Amazon Cognito 240 AWS AppConfig User Guide For mobile use cases, we recommend you implement in-memory and persistent on-device caches. Configure your application to attempt to retrieve the desired configuration from the in-memory cache and fall back to fetching from your proxy, if necessary. Upon successful retrieval from your proxy, update the in-memory cache and then persist the configuration to the device. Use a background process to iterate through the cache and refresh each configuration. When fetching configuration for the first time after application startup, if a retrieval is unsuccessful, defer to the persistent configuration (and use it to seed the in-memory cache). Segmentation When using feature flags, you may want to segment the
appconfig-ug-056
appconfig-ug.pdf
56
implement in-memory and persistent on-device caches. Configure your application to attempt to retrieve the desired configuration from the in-memory cache and fall back to fetching from your proxy, if necessary. Upon successful retrieval from your proxy, update the in-memory cache and then persist the configuration to the device. Use a background process to iterate through the cache and refresh each configuration. When fetching configuration for the first time after application startup, if a retrieval is unsuccessful, defer to the persistent configuration (and use it to seed the in-memory cache). Segmentation When using feature flags, you may want to segment the feature flagging experience across your customer base. To do so, supply context to your flag retrieval calls, and configure rules to return different variants of your feature flags based on the provided context. For example, you may have a feature flag variant for iOS 18.X users, a variant for iOS 17.X users, and a default flag for all other versions of iOS. With variants, you can configure every iOS version of your application to target the same configuration in the same environment, but based on the context supplied in the retrieval call (for example, "version": "iOS18.1"), the devices will receive the appropriate variant of the configuration. Note If you are using AWS AppConfig feature flag variants for a mobile use case, you must use the AWS AppConfig Agent and a proxy for retrieving feature flags. If you choose not to use AWS AppConfig Agent to retrieve feature flags, you can leverage AWS AppConfig environments for simple, low-cardinality segmentation. An environment is a logical deployment group for your targets. In addition to partitioning your configurations to development, testing, and production environments, you can subdivide your customer base by creating mobile- specific environments, such as device type (tablet vs phone) or OS major versions. With separate environments, you can deploy the same or different sets of configuration data to meet the particular requirements of your customer base. Bandwidth (mobile use cases) In general, aim to keep the size of each flag set small. Mobile use cases tend to involve low- bandwidth constraints. Minimizing the size of your data will help you maintain a consistent experience across your user base. Also, consider that because mobile devices often operate Segmentation 241 AWS AppConfig User Guide between low- and no-bandwidth environments, on-device caching is critical. Application code that fails gracefully if no configuration data can be retrieved is also critical. Additional flag use cases The power of feature flags extends beyond feature-release convenience. Long standing operational flags can be used to improve the operational posture of your application. For example, you can create a performance monitoring toggle that emits additional metrics and debug data during an event. Alternatively, you may want to maintain and adjust your application refresh rates for a segment of your customer base. Retrieving configuration data without AWS AppConfig Agent The recommended way to retrieve configuration data from AWS AppConfig is by using the Amazon-developed and managed AWS AppConfig Agent. With the agent, you can cache configuration data locally and asynchronously poll the AWS AppConfig data plane service for updates. This caching/polling process ensures that your configuration data is always available for your application while minimizing latency and cost. If you prefer not to use the agent, you can call public APIs directly from the AWS AppConfig data plane service. The data plane service uses two API actions, StartConfigurationSession and GetLatestConfiguration. The data plane service also uses separate endpoints from the AWS AppConfig control plane. Note The data plane service replaces the previous process of retrieving configuration data by using the GetConfiguration API action. The GetConfiguration API is deprecated. How it works Here's how the process of directly calling AWS AppConfig APIs using the data plane service works. Your application retrieves configuration data by first establishing a configuration session using the StartConfigurationSession API operation. Your session's client then makes periodic calls to GetLatestConfiguration to check for and retrieve the latest data available. When calling StartConfigurationSession, your code sends the following information: Additional flag use cases 242 AWS AppConfig User Guide • Identifiers (ID or name) of an AWS AppConfig application, environment, and configuration profile that the session tracks. • (Optional) The minimum amount of time the session's client must wait between calls to GetLatestConfiguration. In response, AWS AppConfig provides an InitialConfigurationToken to be given to the session's client and used the first time it calls GetLatestConfiguration for that session. Important This token should only be used once in your first call to GetLatestConfiguration. You must use the new token in the GetLatestConfiguration response (NextPollConfigurationToken) in each subsequent call to GetLatestConfiguration. To support long poll use cases, the tokens are valid for up to 24 hours. If a GetLatestConfiguration call uses an expired token, the system returns BadRequestException. When calling GetLatestConfiguration, your client
appconfig-ug-057
appconfig-ug.pdf
57
amount of time the session's client must wait between calls to GetLatestConfiguration. In response, AWS AppConfig provides an InitialConfigurationToken to be given to the session's client and used the first time it calls GetLatestConfiguration for that session. Important This token should only be used once in your first call to GetLatestConfiguration. You must use the new token in the GetLatestConfiguration response (NextPollConfigurationToken) in each subsequent call to GetLatestConfiguration. To support long poll use cases, the tokens are valid for up to 24 hours. If a GetLatestConfiguration call uses an expired token, the system returns BadRequestException. When calling GetLatestConfiguration, your client code sends the most recent ConfigurationToken value it has and receives in response: • NextPollConfigurationToken: the ConfigurationToken value to use on the next call to GetLatestConfiguration. • NextPollIntervalInSeconds: the duration the client should wait before making its next call to GetLatestConfiguration. • The configuration: the latest data intended for the session. This may be empty if the client already has the latest version of the configuration. Important Note the following important information. • The StartConfigurationSession API should only be called once per application, environment, configuration profile, and client to establish a session with the service. This is typically done in the startup of your application or immediately prior to the first retrieval of a configuration. Retrieving configuration data without AWS AppConfig Agent 243 AWS AppConfig User Guide • If your configuration is deployed using a KmsKeyIdentifier, your request to receive the configuration must include permission to call kms:Decrypt. For more information, see Decrypt in the AWS Key Management Service API Reference. • The API operation previously used to retrieve configuration data, GetConfiguration, is deprecated. The GetConfiguration API operation does not support encrypted configurations. (Example) Retrieving a configuration by calling AWS AppConfig APIs The following AWS CLI example demonstrates how to retrieve configuration data by using the AWS AppConfig Data StartConfigurationSession and GetLatestConfiguration API operations. The first command starts a configuration session. This call includes the IDs (or names) of the AWS AppConfig application, the environment, and the configuration profile. The API returns an InitialConfigurationToken used to fetch your configuration data. aws appconfigdata start-configuration-session \ --application-identifier application_name_or_ID \ --environment-identifier environment_name_or_ID \ --configuration-profile-identifier configuration_profile_name_or_ID The system responds with information in the following format. { "InitialConfigurationToken": initial configuration token } After starting a session, use InitialConfigurationToken to call GetLatestConfiguration to fetch your configuration data. The configuration data is saved to the mydata.json file. aws appconfigdata get-latest-configuration \ --configuration-token initial configuration token mydata.json The first call to GetLatestConfiguration uses the ConfigurationToken obtained from StartConfigurationSession. The following information is returned. { "NextPollConfigurationToken" : next configuration token, (Example) Retrieving a configuration by calling AWS AppConfig APIs 244 AWS AppConfig User Guide "ContentType" : content type of configuration, "NextPollIntervalInSeconds" : 60 } Subsequent calls to GetLatestConfiguration must provide NextPollConfigurationToken from the previous response. aws appconfigdata get-latest-configuration \ --configuration-token next configuration token mydata.json Important Note the following important details about the GetLatestConfiguration API operation: • The GetLatestConfiguration response includes a Configuration section that shows the configuration data. The Configuration section only appears if the system finds new or updated configuration data. If the system doesn't find new or updated configuration data, then the Configuration data is empty. • You receive a new ConfigurationToken in every response from GetLatestConfiguration. • We recommend tuning the polling frequency of your GetLatestConfiguration API calls based on your budget, the expected frequency of your configuration deployments, and the number of targets for a configuration. (Example) Retrieving a configuration by calling AWS AppConfig APIs 245 AWS AppConfig User Guide Extending AWS AppConfig workflows using extensions An extension augments your ability to inject logic or behavior at different points during the AWS AppConfig workflow of creating or deploying a configuration. For example, you can use extensions to perform the following types of tasks (to name a few): • Send a notification to an Amazon Simple Notification Service (Amazon SNS) topic when a configuration profile is deployed. • Scrub the contents of a configuration profile for sensitive data before a deployment starts. • Create or update an Atlassian Jira issue whenever a change is made to a feature flag. • Merge content from a service or data source into your configuration data when you start a deployment. • Back up a configuration to an Amazon Simple Storage Service (Amazon S3) bucket whenever a configuration is deployed. You can associate these types of tasks with AWS AppConfig applications, environments, and configuration profiles. Contents • Understanding AWS AppConfig extensions • Working with AWS authored extensions • Walkthrough: Creating custom AWS AppConfig extensions Understanding AWS AppConfig extensions This topic introduces AWS AppConfig extension concepts and terminology. The information is discussed in the context of each step required to set up and use AWS AppConfig extensions. Topics • Step 1: Determine what you want to do with extensions • Step
appconfig-ug-058
appconfig-ug.pdf
58
deployment. • Back up a configuration to an Amazon Simple Storage Service (Amazon S3) bucket whenever a configuration is deployed. You can associate these types of tasks with AWS AppConfig applications, environments, and configuration profiles. Contents • Understanding AWS AppConfig extensions • Working with AWS authored extensions • Walkthrough: Creating custom AWS AppConfig extensions Understanding AWS AppConfig extensions This topic introduces AWS AppConfig extension concepts and terminology. The information is discussed in the context of each step required to set up and use AWS AppConfig extensions. Topics • Step 1: Determine what you want to do with extensions • Step 2: Determine when you want the extension to run • Step 3: Create an extension association • Step 4: Deploy a configuration and verify the extension actions are performed Understanding AWS AppConfig extensions 246 AWS AppConfig User Guide Step 1: Determine what you want to do with extensions Do you want to receive a notification to a webhook that sends messages to Slack anytime an AWS AppConfig deployment completes? Do you want to back up a configuration profile to an Amazon Simple Storage Service (Amazon S3) bucket before a configuration is deployed? Do you want to scrub configuration data for sensitive information before the configuration is deployed? You can use extensions to perform these types of tasks and more. You can create custom extensions or use the AWS authored extensions included with AWS AppConfig. Note For most use cases, to create a custom extension, you must create an AWS Lambda function to perform any computation and processing defined in the extension. For more information, see Walkthrough: Creating custom AWS AppConfig extensions. The following AWS authored extensions can help you quickly integrate configuration deployments with other services. You can use these extensions in the AWS AppConfig console or by calling extension API actions directly from the AWS CLI, AWS Tools for PowerShell, or the SDK. Extension Description Amazon CloudWatch Evidently A/B testing AWS AppConfig deployment events to EventBridge This extension allows your application to assign variations to user sessions locally instead of by calling the EvaluateFeature operation. For more information, see Using the the Amazon CloudWatch Evidently extension. This extension sends events to the EventBrid ge default event bus when a configuration is deployed. AWS AppConfig deployment events to Amazon Simple Notification Service (Amazon SNS) This extension sends messages to an Amazon SNS topic that you specify when a configura tion is deployed. Step 1: Determine what you want to do with extensions 247 AWS AppConfig Extension Description User Guide AWS AppConfig deployment events to Amazon Simple Queue Service (Amazon SQS) This extension enqueues messages into your Amazon SQS queue when a configuration is Integration extension—Atlassian Jira deployed. This extensions allows AWS AppConfig to create and update issues whenever you make changes to a feature flag. Step 2: Determine when you want the extension to run An extension defines one or more actions that it performs during an AWS AppConfig workflow. For example, the AWS authored AWS AppConfig deployment events to Amazon SNS extension includes an action to send a notification to an Amazon SNS topic. Each action is invoked either when you interact with AWS AppConfig or when AWS AppConfig is performing a process on your behalf. These are called action points. AWS AppConfig extensions support the following action points: PRE_* action points: Extension actions configured on PRE_* action points are applied after request validation, but before AWS AppConfig performs the activity that corresponds to the action point name. These action invocations are processed at the same time as a request. If more than one request is made, action invocations run sequentially. Also note that PRE_* action points receive and can change the contents of a configuration. PRE_* action points can also respond to an error and prevent an action from happening. • PRE_CREATE_HOSTED_CONFIGURATION_VERSION • PRE_START_DEPLOYMENT ON_* action points: An extension can also run in parallel with an AWS AppConfig workflow by using an ON_* action point. ON_* action points are invoked asynchronously. ON_* action points don't receive the contents of a configuration. If an extension experiences an error during an ON_* action point, the service ignores the error and continues the workflow. • ON_DEPLOYMENT_START • ON_DEPLOYMENT_STEP Step 2: Determine when you want the extension to run 248 AWS AppConfig User Guide • ON_DEPLOYMENT_BAKING • ON_DEPLOYMENT_COMPLETE • ON_DEPLOYMENT_ROLLED_BACK AT_* action points: Extension actions configured on AT_* action points are invoked synchronously and in parallel to an AWS AppConfig workflow. If an extension experiences an error during an AT_* action point, the service stops the workflow and rolls back the deployment. • AT_DEPLOYMENT_TICK Step 3: Create an extension association To create an extension, or configure an AWS authored extension, you define the action points that invoke an extension when a specific AWS AppConfig resource is used. For example, you can choose
appconfig-ug-059
appconfig-ug.pdf
59
when you want the extension to run 248 AWS AppConfig User Guide • ON_DEPLOYMENT_BAKING • ON_DEPLOYMENT_COMPLETE • ON_DEPLOYMENT_ROLLED_BACK AT_* action points: Extension actions configured on AT_* action points are invoked synchronously and in parallel to an AWS AppConfig workflow. If an extension experiences an error during an AT_* action point, the service stops the workflow and rolls back the deployment. • AT_DEPLOYMENT_TICK Step 3: Create an extension association To create an extension, or configure an AWS authored extension, you define the action points that invoke an extension when a specific AWS AppConfig resource is used. For example, you can choose to run the AWS AppConfig deployment events to Amazon SNS extension and receive notifications on an Amazon SNS topic anytime a configuration deployment is started for a specific application. Defining which action points invoke an extension for a specific AWS AppConfig resource is called an extension association. An extension association is a specified relationship between an extension and an AWS AppConfig resource, such as an application or a configuration profile. A single AWS AppConfig application can include multiple environments and configuration profiles. If you associate an extension to an application or an environment, AWS AppConfig invokes the extension for any workflows that relate to the application or environment resources, if applicable. For example, say you have an AWS AppConfig application called MobileApps that includes a configuration profile called AccessList. And say the MobileApps application includes Beta, Integration, and Production environments. You create an extension association for the AWS authored Amazon SNS notification extension and associate the extension to the MobileApps application. The Amazon SNS notification extension is invoked anytime the configuration is deployed for the application to any of the three environments. Note You don't have to create an extension to use AWS authored extensions, but you do have to create an extension association. Step 3: Create an extension association 249 AWS AppConfig User Guide Step 4: Deploy a configuration and verify the extension actions are performed After you create an association, when a hosted configuration is created or a configuration is deployed, AWS AppConfig invokes the extension and performs the specified actions. When an extension is invoked, if the system experiences an error during a PRE-* action point, AWS AppConfig returns information about that error. Working with AWS authored extensions AWS AppConfig includes the following AWS authored extensions. These extensions can help you integrate the AWS AppConfig workflow with other services. You can use these extensions in the AWS Management Console or by calling extension API actions directly from the AWS CLI, AWS Tools for PowerShell, or the SDK. Extension Description Amazon CloudWatch Evidently A/B testing AWS AppConfig deployment events to EventBridge This extension allows your application to assign variations to user sessions locally instead of by calling the EvaluateFeature operation. For more information, see Using the the Amazon CloudWatch Evidently extension. This extension sends events to the EventBrid ge default event bus when a configuration is deployed. AWS AppConfig deployment events to Amazon Simple Notification Service (Amazon SNS) This extension sends messages to an Amazon SNS topic that you specify when a configura tion is deployed. AWS AppConfig deployment events to Amazon Simple Queue Service (Amazon SQS) This extension enqueues messages into your Amazon SQS queue when a configuration is deployed. Step 4: Deploy a configuration and verify the extension actions are performed 250 AWS AppConfig Extension Integration extension—Atlassian Jira User Guide Description This extensions allows AWS AppConfig to create and update issues whenever you make changes to a feature flag. Using the the Amazon CloudWatch Evidently extension You can use Amazon CloudWatch Evidently to safely validate new features by serving them to a specified percentage of your users while you roll out the feature. You can monitor the performance of the new feature to help you decide when to ramp up traffic to your users. This helps you reduce risk and identify unintended consequences before you fully launch the feature. You can also conduct A/B experiments to make feature design decisions based on evidence and data. The AWS AppConfig extension for CloudWatch Evidently allows your application to assign variations to user sessions locally instead of by calling the EvaluateFeature operation. A local session mitigates the latency and availability risks that come with an API call. For information about how to configure and use the extension, see Perform launches and A/B experiments with CloudWatch Evidently in the Amazon CloudWatch User Guide. Using the AWS AppConfig deployment events to Amazon EventBridge extension The AWS AppConfig deployment events to Amazon EventBridge extension is an AWS authored extension that helps you monitor and act on the AWS AppConfig configuration deployment workflow. The extension sends event notifications to the EventBridge default events bus whenever a configuration is deployed. After you’ve associated the extension to one of your AWS AppConfig applications, environments, or
appconfig-ug-060
appconfig-ug.pdf
60
availability risks that come with an API call. For information about how to configure and use the extension, see Perform launches and A/B experiments with CloudWatch Evidently in the Amazon CloudWatch User Guide. Using the AWS AppConfig deployment events to Amazon EventBridge extension The AWS AppConfig deployment events to Amazon EventBridge extension is an AWS authored extension that helps you monitor and act on the AWS AppConfig configuration deployment workflow. The extension sends event notifications to the EventBridge default events bus whenever a configuration is deployed. After you’ve associated the extension to one of your AWS AppConfig applications, environments, or configuration profiles, AWS AppConfig sends event notifications to the event bus after every configuration deployment start, end, and rollback. If you want more control over which action points send EventBridge notifications, you can create a custom extension and enter the EventBridge default events bus Amazon Resource Name (ARN) for the URI field. For information about creating an extension, see Walkthrough: Creating custom AWS AppConfig extensions. Using the the Amazon CloudWatch Evidently extension 251 AWS AppConfig Important This extension supports only the EventBridge default events bus. User Guide Using the extension To use the AWS AppConfig deployment events to Amazon EventBridge extension, you first attach the extension to one of your AWS AppConfig resources by creating an extension association. You create the association by using the AWS AppConfig console or the CreateExtensionAssociation API action. When you create the association, you specify the ARN of an AWS AppConfig application, environment, or configuration profile. If you associate the extension to an application or an environment, an event notification is sent for any configuration profile contained within the specified application or environment. After you create the association, when a configuration for the specified AWS AppConfig resource is deployed, AWS AppConfig invokes the extension and sends notifications according to the action points specified in the extension. Note This extension is invoked by the following action points: • ON_DEPLOYMENT_START • ON_DEPLOYMENT_COMPLETE • ON_DEPLOYMENT_ROLLED_BACK You can't customize the actions points for this extension. To invoke different action points, you can create your own extension. For more information, see Walkthrough: Creating custom AWS AppConfig extensions. Use the following procedures to create an AWS AppConfig extension association by using either the AWS Systems Manager console or the AWS CLI. Using the AWS AppConfig deployment events to Amazon EventBridge extension 252 AWS AppConfig User Guide To create an extension association (console) 1. Open the AWS Systems Manager console at https://console.aws.amazon.com/systems- manager/appconfig/. 2. In the navigation pane, choose AWS AppConfig. 3. On the Extensions tab, choose Add to resource. 4. In the Extension resource details section, for Resource type, choose an AWS AppConfig resource type. Depending on the resource you choose, AWS AppConfig prompts you to choose other resources. 5. Choose Create association to resource. Here's a sample event sent to EventBridge when the extension is invoked. { "version":"0", "id":"c53dbd72-c1a0-2302-9ed6-c076e9128277", "detail-type":"On Deployment Complete", "source":"aws.appconfig", "account":"111122223333", "time":"2022-07-09T01:44:15Z", "region":"us-east-1", "resources":[ "arn:aws:appconfig:us-east-1:111122223333:extensionassociation/z763ff5" ], "detail":{ "InvocationId":"5tfjcig", "Parameters":{ }, "Type":"OnDeploymentComplete", "Application":{ "Id":"ba8toh7", "Name":"MyApp" }, "Environment":{ "Id":"pgil2o7", "Name":"MyEnv" }, "ConfigurationProfile":{ "Id":"ga3tqep", Using the AWS AppConfig deployment events to Amazon EventBridge extension 253 AWS AppConfig User Guide "Name":"MyConfigProfile" }, "DeploymentNumber":1, "ConfigurationVersion":"1" } } Using the AWS AppConfig deployment events to Amazon SNS extension The AWS AppConfig deployment events to Amazon SNS extension is an AWS authored extension that helps you monitor and act on the AWS AppConfig configuration deployment workflow. The extension publishes messages to an Amazon SNS topic whenever a configuration is deployed. After you associate the extension to one of your AWS AppConfig applications, environments, or configuration profiles, AWS AppConfig publishes a message to the topic after every configuration deployment start, end, and rollback. If you want more control over which action points send Amazon SNS notifications, you can create a custom extension and enter an Amazon SNS topic Amazon Resource Name (ARN) for the URI field. For information about creating an extension, see Walkthrough: Creating custom AWS AppConfig extensions. Using the extension This section describes how to use the AWS AppConfig deployment events to Amazon SNS extension. Step 1: Configure AWS AppConfig to publish messages to a topic Add an access control policy to your Amazon SNS topic granting AWS AppConfig (appconfig.amazonaws.com) publish permissions (sns:Publish). For more information, see Example cases for Amazon SNS access control. Step 2: Create an extension association Attach the extension to one of your AWS AppConfig resources by creating an extension association. You create the association by using the AWS AppConfig console or the CreateExtensionAssociation API action. When you create the association, you specify the ARN of an AWS AppConfig application, environment, or configuration profile. If you associate the extension to an application or an environment, a notification is sent for any configuration profile contained within the specified Using the AWS AppConfig deployment events to Amazon SNS extension 254 AWS
appconfig-ug-061
appconfig-ug.pdf
61
For more information, see Example cases for Amazon SNS access control. Step 2: Create an extension association Attach the extension to one of your AWS AppConfig resources by creating an extension association. You create the association by using the AWS AppConfig console or the CreateExtensionAssociation API action. When you create the association, you specify the ARN of an AWS AppConfig application, environment, or configuration profile. If you associate the extension to an application or an environment, a notification is sent for any configuration profile contained within the specified Using the AWS AppConfig deployment events to Amazon SNS extension 254 AWS AppConfig User Guide application or environment. When you create the association, you must enter a value for the topicArn parameter that contains the ARN of the Amazon SNS topic you want to use. After you create the association, when a configuration for the specified AWS AppConfig resource is deployed, AWS AppConfig invokes the extension and sends notifications according to the action points specified in the extension. Note This extension is invoked by the following action points: • ON_DEPLOYMENT_START • ON_DEPLOYMENT_COMPLETE • ON_DEPLOYMENT_ROLLED_BACK You can't customize the actions points for this extension. To invoke different action points, you can create your own extension. For more information, see Walkthrough: Creating custom AWS AppConfig extensions. Use the following procedures to create an AWS AppConfig extension association by using either the AWS Systems Manager console or the AWS CLI. To create an extension association (console) 1. Open the AWS Systems Manager console at https://console.aws.amazon.com/systems- manager/appconfig/. 2. In the navigation pane, choose AWS AppConfig. 3. On the Extensions tab, choose Add to resource. 4. In the Extension resource details section, for Resource type, choose an AWS AppConfig resource type. Depending on the resource you choose, AWS AppConfig prompts you to choose other resources. 5. Choose Create association to resource. Here's a sample of the message sent to the Amazon SNS topic when the extension is invoked. { Using the AWS AppConfig deployment events to Amazon SNS extension 255 AWS AppConfig "Type": "Notification", "MessageId": "ae9d702f-9a66-51b3-8586-2b17932a9f28", "TopicArn": "arn:aws:sns:us-east-1:111122223333:MySNSTopic", User Guide "Message": { "InvocationId": "7itcaxp", "Parameters": { "topicArn": "arn:aws:sns:us-east-1:111122223333:MySNSTopic" }, "Application": { "Id": "1a2b3c4d", "Name": MyApp }, "Environment": { "Id": "1a2b3c4d", "Name": MyEnv }, "ConfigurationProfile": { "Id": "1a2b3c4d", "Name": "MyConfigProfile" }, "Description": null, "DeploymentNumber": "3", "ConfigurationVersion": "1", "Type": "OnDeploymentComplete" }, "Timestamp": "2022-06-30T20:26:52.067Z", "SignatureVersion": "1", "Signature": "<...>", "SigningCertURL": "<...>", "UnsubscribeURL": "<...>", "MessageAttributes": { "MessageType": { "Type": "String", "Value": "OnDeploymentStart" } } } Using the AWS AppConfig deployment events to Amazon SQS extension The AWS AppConfig deployment events to Amazon SQS extension is an AWS authored extension that helps you monitor and act on the AWS AppConfig configuration deployment workflow. The extension enqueues messages into your Amazon Simple Queue Service (Amazon Using the AWS AppConfig deployment events to Amazon SQS extension 256 AWS AppConfig User Guide SQS) queue whenever a configuration is deployed. After you associate the extension to one of your AWS AppConfig applications, environments, or configuration profiles, AWS AppConfig enqueues a message into the queue after every configuration deployment start, end, and rollback. If you want more control over which action points send Amazon SQS notifications, you can create a custom extension and enter an Amazon SQS queue Amazon Resource Name (ARN) for the URI field. For information about creating an extension, see Walkthrough: Creating custom AWS AppConfig extensions. Using the extension This section describes how to use the AWS AppConfig deployment events to Amazon SQS extension. Step 1: Configure AWS AppConfig to enqueue messages Add an Amazon SQS policy to your Amazon SQS queue granting AWS AppConfig (appconfig.amazonaws.com) send message permissions (sqs:SendMessage). For more information, see Basic examples of Amazon SQS policies. Step 2: Create an extension association Attach the extension to one of your AWS AppConfig resources by creating an extension association. You create the association by using the AWS AppConfig console or the CreateExtensionAssociation API action. When you create the association, you specify the ARN of an AWS AppConfig application, environment, or configuration profile. If you associate the extension to an application or an environment, a notification is sent for any configuration profile contained within the specified application or environment. When you create the association, you must enter a Here parameter that contains the ARN of the Amazon SQS queue you want to use. After you create the association, when a configuration for the specified AWS AppConfig resource is created or deployed, AWS AppConfig invokes the extension and sends notifications according to the action points specified in the extension. Note This extension is invoked by the following action points: • ON_DEPLOYMENT_START • ON_DEPLOYMENT_COMPLETE Using the AWS AppConfig deployment events to Amazon SQS extension 257 AWS AppConfig User Guide • ON_DEPLOYMENT_ROLLED_BACK You can't customize the actions points for this extension. To invoke different action points, you can create your own extension. For more information, see Walkthrough:
appconfig-ug-062
appconfig-ug.pdf
62
of the Amazon SQS queue you want to use. After you create the association, when a configuration for the specified AWS AppConfig resource is created or deployed, AWS AppConfig invokes the extension and sends notifications according to the action points specified in the extension. Note This extension is invoked by the following action points: • ON_DEPLOYMENT_START • ON_DEPLOYMENT_COMPLETE Using the AWS AppConfig deployment events to Amazon SQS extension 257 AWS AppConfig User Guide • ON_DEPLOYMENT_ROLLED_BACK You can't customize the actions points for this extension. To invoke different action points, you can create your own extension. For more information, see Walkthrough: Creating custom AWS AppConfig extensions. Use the following procedures to create an AWS AppConfig extension association by using either the AWS Systems Manager console or the AWS CLI. To create an extension association (console) 1. Open the AWS Systems Manager console at https://console.aws.amazon.com/systems- manager/appconfig/. 2. In the navigation pane, choose AWS AppConfig. 3. On the Extensions tab, choose Add to resource. 4. In the Extension resource details section, for Resource type, choose an AWS AppConfig resource type. Depending on the resource you choose, AWS AppConfig prompts you to choose other resources. 5. Choose Create association to resource. Here's an example of the message sent to the Amazon SQS queue when the extension is invoked. { "InvocationId":"7itcaxp", "Parameters":{ "queueArn":"arn:aws:sqs:us-east-1:111122223333:MySQSQueue" }, "Application":{ "Id":"1a2b3c4d", "Name":MyApp }, "Environment":{ "Id":"1a2b3c4d", "Name":MyEnv }, "ConfigurationProfile":{ "Id":"1a2b3c4d", Using the AWS AppConfig deployment events to Amazon SQS extension 258 AWS AppConfig User Guide "Name":"MyConfigProfile" }, "Description":null, "DeploymentNumber":"3", "ConfigurationVersion":"1", "Type":"OnDeploymentComplete" } Using the Atlassian Jira extension for AWS AppConfig By integrating with Atlassian Jira, AWS AppConfig can create and update issues in the Atlassian console whenever you make changes to a feature flag in your AWS account for the specified AWS Region. Each Jira issue includes the flag name, application ID, configuration profile ID, and flag values. After you update, save, and deploy your flag changes, Jira updates the existing issues with the details of the change. Note Jira updates issues whenever you create or update a feature flag. Jira also updates issues when you delete a child-level flag attribute from a parent-level flag. Jira does not record information when you delete a parent-level flag. To configure integration, you must do the following: • Configuring permissions for AWS AppConfig Jira integration • Configuring the AWS AppConfig Jira integration application Configuring permissions for AWS AppConfig Jira integration When you configure AWS AppConfig integration with Jira, you specify credentials for a user. Specifically, you enter the user's access key ID and secret key in the AWS AppConfig for Jira application. This user gives Jira permission to communicate with AWS AppConfig. AWS AppConfig uses these credentials one time to establish an association between AWS AppConfig and Jira. The credentials are not stored. You can remove the association by uninstalling the AWS AppConfig for Jira application. The user account requires a permission policy that includes the following actions: Using the Jira extension 259 AWS AppConfig User Guide • appconfig:CreateExtensionAssociation • appconfig:GetConfigurationProfile • appconfig:ListApplications • appconfig:ListConfigurationProfiles • appconfig:ListExtensionAssociations • sts:GetCallerIdentity Complete the following tasks to create an IAM permission policy and a user for AWS AppConfig and Jira integration: Tasks • Task 1: Create an IAM permission policy for AWS AppConfig and Jira integration • Task 2: Create a user for AWS AppConfig and Jira integration Task 1: Create an IAM permission policy for AWS AppConfig and Jira integration Use the following procedure to create an IAM permission policy that allows Atlassian Jira to communicate with AWS AppConfig. We recommend that you create a new policy and attach this policy to a new IAM role. Adding the required permission to an existing IAM policy and role goes against the principle of least privilege and is not recommended. To create an IAM policy for AWS AppConfig and Jira integration 1. Open the IAM console at https://console.aws.amazon.com/iam/. 2. In the navigation pane, choose Policies, and then choose Create policy. 3. On the Create policy page, choose the JSON tab and replace the default content with the following policy. In the following policy, replace Region, account_ID, application_ID, and configuration_profile_ID with information from your AWS AppConfig feature flag environment. { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ Using the Jira extension 260 AWS AppConfig User Guide "appconfig:CreateExtensionAssociation", "appconfig:ListExtensionAssociations", "appconfig:GetConfigurationProfile" ], "Resource": [ "arn:aws:appconfig:Region:account_ID:application/application_ID", "arn:aws:appconfig:Region:account_ID:application/application_ID/ configurationprofile/configuration_profile_ID" ] }, { "Effect": "Allow", "Action": [ "appconfig:ListApplications" ], "Resource": [ "arn:aws:appconfig:Region:account_ID:*" ] }, { "Effect": "Allow", "Action": [ "appconfig:ListConfigurationProfiles" ], "Resource": [ "arn:aws:appconfig:Region:account_ID:application/application_ID" ] }, { "Effect": "Allow", "Action": "sts:GetCallerIdentity", "Resource": "*" } ] } 4. Choose Next: Tags. 5. (Optional) Add one or more tag-key value pairs to organize, track, or control access for this policy, and then choose Next: Review. Using the Jira extension 261 AWS AppConfig User Guide 6. On the Review policy page, enter a name in
appconfig-ug-063
appconfig-ug.pdf
63
Using the Jira extension 260 AWS AppConfig User Guide "appconfig:CreateExtensionAssociation", "appconfig:ListExtensionAssociations", "appconfig:GetConfigurationProfile" ], "Resource": [ "arn:aws:appconfig:Region:account_ID:application/application_ID", "arn:aws:appconfig:Region:account_ID:application/application_ID/ configurationprofile/configuration_profile_ID" ] }, { "Effect": "Allow", "Action": [ "appconfig:ListApplications" ], "Resource": [ "arn:aws:appconfig:Region:account_ID:*" ] }, { "Effect": "Allow", "Action": [ "appconfig:ListConfigurationProfiles" ], "Resource": [ "arn:aws:appconfig:Region:account_ID:application/application_ID" ] }, { "Effect": "Allow", "Action": "sts:GetCallerIdentity", "Resource": "*" } ] } 4. Choose Next: Tags. 5. (Optional) Add one or more tag-key value pairs to organize, track, or control access for this policy, and then choose Next: Review. Using the Jira extension 261 AWS AppConfig User Guide 6. On the Review policy page, enter a name in the Name box, such as AppConfigJiraPolicy, and then enter an optional description. 7. Choose Create policy. Task 2: Create a user for AWS AppConfig and Jira integration Use the following procedure to create a user for AWS AppConfig and Atlassian Jira integration. After you create the user, you can copy the access key ID and secret key, which you will specify when you complete the integration. To create a user for AWS AppConfig and Jira integration 1. Open the IAM console at https://console.aws.amazon.com/iam/. 2. 3. 4. In the navigation pane, choose Users, and then choose Add users. In the User name field, enter a name, such as AppConfigJiraUser. For Select AWS credential type, choose Access key - Programmatic access. 5. Choose Next: Permissions. 6. Under Set permissions page, choose Attach existing policies directly. Search for and select the check box for the policy that you created in Task 1: Create an IAM permission policy for AWS AppConfig and Jira integration, and then choose Next: Tags. 7. On the Add tags (optional) page, add one or more tag-key value pairs to organize, track, or control access for this user. Choose Next: Review. 8. On the Review page, verify the user details. 9. Choose Create user. The system displays the user's access key ID and secret key. Either download the .csv file or copy these credentials to a separate location. You will specify these credentials when you configure integration. Configuring the AWS AppConfig Jira integration application Use the following procedure to configure required options in the AWS AppConfig for Jira application. After you complete this procedure, Jira creates a new issue for each feature flag in your AWS account for the specified AWS Region. If you make changes to a feature flag in AWS AppConfig, Jira records the details in the existing issues. Using the Jira extension 262 AWS AppConfig Note User Guide An AWS AppConfig feature flag can include multiple child-level flag attributes. Jira creates one issue for each parent-level feature flag. If you change a child-level flag attribute, you can view the details of that change in the Jira issue for the parent-level flag. To configure integration 1. 2. 3. 4. Log in to the Atlassian Marketplace. Type AWS AppConfig in the search field and press Enter. Install the application on your Jira instance. In the Atlassian console, choose Manage apps, and then choose AWS AppConfig for Jira. 5. Choose Configure. 6. Under Configuration details, choose Jira project and then choose the project that you want to associate with your AWS AppConfig feature flag. 7. Choose AWS Region, and then choose the Region where your AWS AppConfig feature flag is located. 8. 9. In the Application ID field, enter the name of the AWS AppConfig application that contains your feature flag. In the Configuration profile ID field, enter the name of the AWS AppConfig configuration profile for your feature flag. 10. In the Access key ID and Secret key fields, enter the credentials you copied in Task 2: Create a user for AWS AppConfig and Jira integration. Optionally, you can also specify a session token. 11. Choose Submit. 12. In the Atlassian console, choose Projects, and then choose the project you selected for AWS AppConfig integration. The Issues page displays an issue for each feature flag in the specified AWS account and AWS Region. Deleting the AWS AppConfig for Jira application and data If you no longer want to use Jira integration with AWS AppConfig feature flags, you can delete the AWS AppConfig for Jira application in the Atlassian console. Deleting the integration application does the following: Using the Jira extension 263 AWS AppConfig User Guide • Deletes the association between your Jira instance and AWS AppConfig • Deletes your Jira instance details from AWS AppConfig To delete the AWS AppConfig for Jira application 1. In the Atlassian console, choose Manage apps. 2. Choose AWS AppConfig for Jira. 3. Choose Uninstall. Walkthrough: Creating custom AWS AppConfig extensions To create a custom AWS AppConfig extension, complete the following tasks. Each task is described in more detail in later topics. Note You can view samples of custom AWS AppConfig extensions on GitHub: • Sample extension that prevents deployments with a blocked day
appconfig-ug-064
appconfig-ug.pdf
64
extension 263 AWS AppConfig User Guide • Deletes the association between your Jira instance and AWS AppConfig • Deletes your Jira instance details from AWS AppConfig To delete the AWS AppConfig for Jira application 1. In the Atlassian console, choose Manage apps. 2. Choose AWS AppConfig for Jira. 3. Choose Uninstall. Walkthrough: Creating custom AWS AppConfig extensions To create a custom AWS AppConfig extension, complete the following tasks. Each task is described in more detail in later topics. Note You can view samples of custom AWS AppConfig extensions on GitHub: • Sample extension that prevents deployments with a blocked day moratorium calendar using Systems Manager Change Calendar • Sample extension that prevents secrets from leaking into configuration data using git- secrets • Sample extension that prevents personally identifiable information (PII) from leaking into configuration data using Amazon Comprehend 1. Create an AWS Lambda function For most use cases, to create a custom extension, you must create an AWS Lambda function to perform any computation and processing defined in the extension. An exception to this rule is if you create custom versions of the AWS authored notification extensions to add or remove action points. For more details about this exception, see Step 3: Create a custom AWS AppConfig extension. 2. Configure permissions for your custom extension To configure permissions for your custom extension, you can do one of the following: Walkthrough: Creating custom AWS AppConfig extensions 264 AWS AppConfig User Guide • Create an AWS Identity and Access Management (IAM) service role that includes InvokeFunction permissions. • Create a resource policy by using the Lambda AddPermission API action. This walkthrough describes how to create the IAM service role. 3. Create an extension You can create an extension by using the AWS AppConfig console or by calling the CreateExtension API action from the AWS CLI, AWS Tools for PowerShell, or the SDK. The walkthrough uses the console. 4. Create an extension association You can create an extension association by using the AWS AppConfig console or by calling the CreateExtensionAssociation API action from the AWS CLI, AWS Tools for PowerShell, or the SDK. The walkthrough uses the console. 5. Perform an action that invokes the extension After you create the association, AWS AppConfig invokes the extension when the action points defined by the extension occur for that resource. For example, if you associate an extension that contains a PRE_CREATE_HOSTED_CONFIGURATION_VERSION action, the extension is invoked every time you create a new hosted configuration version. The topics in this section describe each task involved in creating a custom AWS AppConfig extension. Each task is described in the context of a use case where a customer wants to create an extension that automatically backs up a configuration to an Amazon Simple Storage Service (Amazon S3) bucket. The extension runs whenever a hosted configuration is created (PRE_CREATE_HOSTED_CONFIGURATION_VERSION) or deployed (PRE_START_DEPLOYMENT). Topics • Step 1: Create a Lambda function for a custom AWS AppConfig extension • Step 2: Configure permissions for a custom AWS AppConfig extension • Step 3: Create a custom AWS AppConfig extension • Step 4: Create an extension association for a custom AWS AppConfig extension Walkthrough: Creating custom AWS AppConfig extensions 265 AWS AppConfig User Guide Step 1: Create a Lambda function for a custom AWS AppConfig extension For most use-cases, to create a custom extension, you must create an AWS Lambda function to perform any computation and processing defined in the extension. This section includes Lambda function sample code for a custom AWS AppConfig extension. This section also includes payload request and response reference details. For information about creating a Lambda function, see Getting started with Lambda in the AWS Lambda Developer Guide. Sample code The following sample code for a Lambda function, when invoked, automatically backs up an AWS AppConfig configuration to an Amazon S3 bucket. The configuration is backed up whenever a new configuration is created or deployed. The sample uses extension parameters so the bucket name doesn't have to be hardcoded in the Lambda function. By using extension parameters, the user can attach the extension to multiple applications and back up configurations to different buckets. The code sample includes comments to further explain the function. Sample Lambda function for an AWS AppConfig extension from datetime import datetime import base64 import json import boto3 def lambda_handler(event, context): print(event) # Extensions that use the PRE_CREATE_HOSTED_CONFIGURATION_VERSION and PRE_START_DEPLOYMENT # action points receive the contents of AWS AppConfig configurations in Lambda event parameters. # Configuration contents are received as a base64-encoded string, which the lambda needs to decode # in order to get the configuration data as bytes. For other action points, the content # of the configuration isn't present, so the code below will fail. config_data_bytes = base64.b64decode(event["Content"]) Step 1: Create a Lambda function for a custom AWS AppConfig extension 266 AWS AppConfig User
appconfig-ug-065
appconfig-ug.pdf
65
AppConfig extension from datetime import datetime import base64 import json import boto3 def lambda_handler(event, context): print(event) # Extensions that use the PRE_CREATE_HOSTED_CONFIGURATION_VERSION and PRE_START_DEPLOYMENT # action points receive the contents of AWS AppConfig configurations in Lambda event parameters. # Configuration contents are received as a base64-encoded string, which the lambda needs to decode # in order to get the configuration data as bytes. For other action points, the content # of the configuration isn't present, so the code below will fail. config_data_bytes = base64.b64decode(event["Content"]) Step 1: Create a Lambda function for a custom AWS AppConfig extension 266 AWS AppConfig User Guide # You can specify parameters for extensions. The CreateExtension API action lets you define # which parameters an extension supports. You supply the values for those parameters when you # create an extension association by calling the CreateExtensionAssociation API action. # The following code uses a parameter called S3_BUCKET to obtain the value specified in the # extension association. You can specify this parameter when you create the extension # later in this walkthrough. extension_association_params = event.get('Parameters', {}) bucket_name = extension_association_params['S3_BUCKET'] write_backup_to_s3(bucket_name, config_data_bytes) # The PRE_CREATE_HOSTED_CONFIGURATION_VERSION and PRE_START_DEPLOYMENT action points can # modify the contents of a configuration. The following code makes a minor change # for the purposes of a demonstration. old_config_data_string = config_data_bytes.decode('utf-8') new_config_data_string = old_config_data_string.replace('hello', 'hello!') new_config_data_bytes = new_config_data_string.encode('utf-8') # The lambda initially received the configuration data as a base64-encoded string # and must return it in the same format. new_config_data_base64string = base64.b64encode(new_config_data_bytes).decode('ascii') return { 'statusCode': 200, # If you want to modify the contents of the configuration, you must include the new contents in the # Lambda response. If you don't want to modify the contents, you can omit the 'Content' field shown here. 'Content': new_config_data_base64string } def write_backup_to_s3(bucket_name, config_data_bytes): s3 = boto3.resource('s3') new_object = s3.Object(bucket_name, f"config_backup_{datetime.now().isoformat()}.txt") new_object.put(Body=config_data_bytes) Step 1: Create a Lambda function for a custom AWS AppConfig extension 267 AWS AppConfig User Guide If you want to use this sample during this walkthrough, save it with the name MyS3ConfigurationBackUpExtension and copy the Amazon Resource Name (ARN) for the function. You specify the ARN when you create the AWS Identity and Access Management (IAM) assume role in the next section. You specify the ARN and the name when you create the extension. Payload reference This section includes payload request and response reference details for working with custom AWS AppConfig extensions. Request structure AtDeploymentTick { 'InvocationId': 'o2xbtm7', 'Parameters': { 'ParameterOne': 'ValueOne', 'ParameterTwo': 'ValueTwo' }, 'Type': 'OnDeploymentStart', 'Application': { 'Id': 'abcd123' }, 'Environment': { 'Id': 'efgh456' }, 'ConfigurationProfile': { 'Id': 'ijkl789', 'Name': 'ConfigurationName' }, 'DeploymentNumber': 2, 'Description': 'Deployment description', 'ConfigurationVersion': '2', 'DeploymentState': 'DEPLOYING', 'PercentageComplete': '0.0' } Request structure PreCreateHostedConfigurationVersion { Step 1: Create a Lambda function for a custom AWS AppConfig extension 268 AWS AppConfig User Guide 'InvocationId': 'vlns753', // id for specific invocation 'Parameters': { 'ParameterOne': 'ValueOne', 'ParameterTwo': 'ValueTwo' }, 'ContentType': 'text/plain', 'ContentVersion': '2', 'Content': 'SGVsbG8gZWFydGgh', // Base64 encoded content 'Application': { 'Id': 'abcd123', 'Name': 'ApplicationName' }, 'ConfigurationProfile': { 'Id': 'ijkl789', 'Name': 'ConfigurationName' }, 'Description': '', 'Type': 'PreCreateHostedConfigurationVersion', 'PreviousContent': { 'ContentType': 'text/plain', 'ContentVersion': '1', 'Content': 'SGVsbG8gd29ybGQh' } } PreStartDeployment { 'InvocationId': '765ahdm', 'Parameters': { 'ParameterOne': 'ValueOne', 'ParameterTwo': 'ValueTwo' }, 'ContentType': 'text/plain', 'ContentVersion': '2', 'Content': 'SGVsbG8gZWFydGgh', 'Application': { 'Id': 'abcd123', 'Name': 'ApplicationName' }, 'Environment': { 'Id': 'ibpnqlq', 'Name': 'EnvironmentName' Step 1: Create a Lambda function for a custom AWS AppConfig extension 269 User Guide AWS AppConfig }, 'ConfigurationProfile': { 'Id': 'ijkl789', 'Name': 'ConfigurationName' }, 'DeploymentNumber': 2, 'Description': 'Deployment description', 'Type': 'PreStartDeployment' } Asynchronous events OnStartDeployment, OnDeploymentStep, OnDeployment { 'InvocationId': 'o2xbtm7', 'Parameters': { 'ParameterOne': 'ValueOne', 'ParameterTwo': 'ValueTwo' }, 'Type': 'OnDeploymentStart', 'Application': { 'Id': 'abcd123' }, 'Environment': { 'Id': 'efgh456' }, 'ConfigurationProfile': { 'Id': 'ijkl789', 'Name': 'ConfigurationName' }, 'DeploymentNumber': 2, 'Description': 'Deployment description', 'ConfigurationVersion': '2' } Response structure The following examples show what your Lambda function returns in response to the request from a custom AWS AppConfig extension. PRE_* Synchronous events - successful response Step 1: Create a Lambda function for a custom AWS AppConfig extension 270 AWS AppConfig User Guide If you want to transform the content, use the following: "Content": "SomeBase64EncodedByteArray" AT_* Synchronous events - successful response If you want to control the next steps of a deployment (continue a deployment or roll it back) set Directive and Description attributes in the response. "Directive": "ROLL_BACK" "Description" "Deployment event log description" Directive supports two values: CONTINUE or ROLL_BACK. Use these enums in your payload response to control the next steps of a deployment. Synchronous events - successful response If you want to transform the content, use the following: "Content": "SomeBase64EncodedByteArray" If you don't want to transform the content, return nothing. Asynchronous events - successful response Return nothing. All error events { "Error": "BadRequestError", "Message": "There was malformed stuff in here", "Details": [{ "Type": "Malformed", "Name": "S3 pointer", "Reason": "S3 bucket did not exist" }] } Step 1:
appconfig-ug-066
appconfig-ug.pdf
66
Directive and Description attributes in the response. "Directive": "ROLL_BACK" "Description" "Deployment event log description" Directive supports two values: CONTINUE or ROLL_BACK. Use these enums in your payload response to control the next steps of a deployment. Synchronous events - successful response If you want to transform the content, use the following: "Content": "SomeBase64EncodedByteArray" If you don't want to transform the content, return nothing. Asynchronous events - successful response Return nothing. All error events { "Error": "BadRequestError", "Message": "There was malformed stuff in here", "Details": [{ "Type": "Malformed", "Name": "S3 pointer", "Reason": "S3 bucket did not exist" }] } Step 1: Create a Lambda function for a custom AWS AppConfig extension 271 AWS AppConfig User Guide Step 2: Configure permissions for a custom AWS AppConfig extension Use the following procedure to create and configure an AWS Identity and Access Management (IAM) service role (or assume role). AWS AppConfig uses this role to invoke the Lambda function. To create an IAM service role and allow AWS AppConfig to assume it 1. Open the IAM console at https://console.aws.amazon.com/iam/. 2. In the navigation pane, choose Roles, and then choose Create role. 3. Under Select type of trusted entity, choose Custom trust policy. 4. Paste the following JSON policy into the Custom trust policy field. { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "Service": "appconfig.amazonaws.com" }, "Action": "sts:AssumeRole" } ] } Choose Next. 5. On the Add permissions page, choose Create policy. The Create policy page opens in a new tab. 6. Choose the JSON tab, and then paste the following permission policy into the editor. The lambda:InvokeFunction action is used for PRE_* action points. The lambda:InvokeAsync action is used for ON_* action points. Replace Your Lambda ARN with the Amazon Resource Name (ARN) of your Lambda. { "Version": "2012-10-17", "Statement": [ { "Sid": "VisualEditor0", "Effect": "Allow", Step 2: Configure permissions for a custom AWS AppConfig extension 272 AWS AppConfig User Guide "Action": [ "lambda:InvokeFunction", "lambda:InvokeAsync" ], "Resource": "Your Lambda ARN" } ] } 7. Choose Next: Tags. 8. On the Add tags (Optional) page, add one or more key-value pairs and then choose Next: Review. 9. On the Review policy page enter a name and a description, and then choose Create policy. 10. On the browser tab for your custom trust policy, choose the Refresh icon and then search for the permission policy you just created. 11. Select the check box for your permission policy and then choose Next. 12. On the Name, review, and create page, enter a name in the Role name box, and then enter a description. 13. Choose Create role. The system returns you to the Roles page. Choose View role in the banner. 14. Copy the ARN. You specify this ARN when you create the extension. Step 3: Create a custom AWS AppConfig extension An extension defines one or more actions that it performs during an AWS AppConfig workflow. For example, the AWS authored AWS AppConfig deployment events to Amazon SNS extension includes an action to send a notification to an Amazon SNS topic. Each action is invoked either when you interact with AWS AppConfig or when AWS AppConfig is performing a process on your behalf. These are called action points. AWS AppConfig extensions support the following action points: PRE_* action points: Extension actions configured on PRE_* action points are applied after request validation, but before AWS AppConfig performs the activity that corresponds to the action point name. These action invocations are processed at the same time as a request. If more than one request is made, action invocations run sequentially. Also note that PRE_* action points receive Step 3: Create a custom AWS AppConfig extension 273 AWS AppConfig User Guide and can change the contents of a configuration. PRE_* action points can also respond to an error and prevent an action from happening. • PRE_CREATE_HOSTED_CONFIGURATION_VERSION • PRE_START_DEPLOYMENT ON_* action points: An extension can also run in parallel with an AWS AppConfig workflow by using an ON_* action point. ON_* action points are invoked asynchronously. ON_* action points don't receive the contents of a configuration. If an extension experiences an error during an ON_* action point, the service ignores the error and continues the workflow. • ON_DEPLOYMENT_START • ON_DEPLOYMENT_STEP • ON_DEPLOYMENT_BAKING • ON_DEPLOYMENT_COMPLETE • ON_DEPLOYMENT_ROLLED_BACK AT_* action points: Extension actions configured on AT_* action points are invoked synchronously and in parallel to an AWS AppConfig workflow. If an extension experiences an error during an AT_* action point, the service stops the workflow and rolls back the deployment. • AT_DEPLOYMENT_TICK Note The AT_DEPLOYMENT_TICK action point supports third-party monitoring integration. AT_DEPLOYMENT_TICK is invoked during configuration deployment processing orchestration. If you use a third-party monitoring solution (for example, Datadog), you can create an AWS AppConfig extension that checks for alarms at the AT_DEPLOYMENT_TICK action point and, as a safety guardrail,
appconfig-ug-067
appconfig-ug.pdf
67
• ON_DEPLOYMENT_STEP • ON_DEPLOYMENT_BAKING • ON_DEPLOYMENT_COMPLETE • ON_DEPLOYMENT_ROLLED_BACK AT_* action points: Extension actions configured on AT_* action points are invoked synchronously and in parallel to an AWS AppConfig workflow. If an extension experiences an error during an AT_* action point, the service stops the workflow and rolls back the deployment. • AT_DEPLOYMENT_TICK Note The AT_DEPLOYMENT_TICK action point supports third-party monitoring integration. AT_DEPLOYMENT_TICK is invoked during configuration deployment processing orchestration. If you use a third-party monitoring solution (for example, Datadog), you can create an AWS AppConfig extension that checks for alarms at the AT_DEPLOYMENT_TICK action point and, as a safety guardrail, rolls back the deployment if it triggered an alarm. To view a code sample of an AWS AppConfig extension that uses the AT_DEPLOYMENT_TICK action point to integrate with Datadog, see aws-samples / aws-appconfig-tick-extn-for- datadog on GitHub. Step 3: Create a custom AWS AppConfig extension 274 AWS AppConfig Sample extension User Guide The following sample extension defines one action that calls the PRE_CREATE_HOSTED_CONFIGURATION_VERSION action point. In the Uri field, the action specifies the Amazon Resource Name (ARN) of the MyS3ConfigurationBackUpExtension Lambda function created earlier in this walkthrough. The action also specifies the AWS Identity and Access Management (IAM) assume role ARN created earlier in this walkthrough. Sample AWS AppConfig extension { "Name": "MySampleExtension", "Description": "A sample extension that backs up configurations to an S3 bucket.", "Actions": { "PRE_CREATE_HOSTED_CONFIGURATION_VERSION": [ { "Name": "PreCreateHostedConfigVersionActionForS3Backup", "Uri": "arn:aws:lambda:aws- region:111122223333:function:MyS3ConfigurationBackUpExtension", "RoleArn": "arn:aws:iam::111122223333:role/ExtensionsTestRole" } ] }, "Parameters" : { "S3_BUCKET": { "Required": false } } } Note To view request syntax and field descriptions when creating an extension, see the CreateExtension topic in the AWS AppConfig API Reference. To create an extension (console) 1. Open the AWS Systems Manager console at https://console.aws.amazon.com/systems- manager/appconfig/. 2. In the navigation pane, choose AWS AppConfig. Step 3: Create a custom AWS AppConfig extension 275 AWS AppConfig User Guide 3. On the Extensions tab, choose Create extension. 4. 5. 6. 7. 8. For Extension name, enter a unique name. For the purposes of this walkthrough, enter MyS3ConfigurationBackUpExtension. Optionally, enter a description. In the Actions section, choose Add new action. For Action name, enter a unique name. For the purposes of this walkthrough, enter PreCreateHostedConfigVersionActionForS3Backup. This name describes the action point used by the action and the extension purpose. In the Action point list, choose PRE_CREATE_HOSTED_CONFIGURATION_VERSION. For Uri, choose Lambda function and then choose the function in the Lambda function list. If you don't see your function, verify that you are in the same AWS Region where you created the function. 9. For IAM Role, choose the role you created earlier in this walkthrough. 10. In the Extension parameters (optional) section, choose Add new parameter. 11. For Parameter name, enter a name. For the purposes of this walkthrough, enter S3_BUCKET. 12. Repeat steps 5–11 to create a second action for the PRE_START_DEPLOYMENT action point. 13. Choose Create extension. Customizing AWS authored notification extensions You don't have to create a Lambda or an extension to use AWS authored notification extensions. You can simply create an extension association and then perform an operation that calls one of the supported action points. By default, the AWS authored notification extensions support the following actions points: • ON_DEPLOYMENT_START • ON_DEPLOYMENT_COMPLETE • ON_DEPLOYMENT_ROLLED_BACK If you create custom versions of the AWS AppConfig deployment events to Amazon SNS extension and AWS AppConfig deployment events to Amazon SQS extensions, you can specify the action points for which you want to receive notifications. Step 3: Create a custom AWS AppConfig extension 276 AWS AppConfig Note User Guide The AWS AppConfig deployment events to EventBridge extension doesn't support the PRE_* action points. You can create a custom version if you want to remove some of the default actions points assigned to the AWS authored version. You don't need to create a Lambda function if you create custom versions of the AWS authored notification extensions. You only need to specify an Amazon Resource Name (ARN) in the Uri field for the new extension version. • For a custom EventBridge notification extension, enter the ARN of the EventBridge default events in the Uri field. • For a custom Amazon SNS notification extension, enter the ARN of an Amazon SNS topic in the Uri field. • For a custom Amazon SQS notification extension, enter the ARN of an Amazon SQS message queue in the Uri field. Step 4: Create an extension association for a custom AWS AppConfig extension To create an extension, or configure an AWS authored extension, you define the action points that invoke an extension when a specific AWS AppConfig resource is used. For example, you can choose to run the AWS AppConfig deployment events to Amazon SNS extension and receive notifications on an Amazon SNS topic anytime a configuration deployment is started for a specific application. Defining which action points invoke an extension
appconfig-ug-068
appconfig-ug.pdf
68
For a custom Amazon SQS notification extension, enter the ARN of an Amazon SQS message queue in the Uri field. Step 4: Create an extension association for a custom AWS AppConfig extension To create an extension, or configure an AWS authored extension, you define the action points that invoke an extension when a specific AWS AppConfig resource is used. For example, you can choose to run the AWS AppConfig deployment events to Amazon SNS extension and receive notifications on an Amazon SNS topic anytime a configuration deployment is started for a specific application. Defining which action points invoke an extension for a specific AWS AppConfig resource is called an extension association. An extension association is a specified relationship between an extension and an AWS AppConfig resource, such as an application or a configuration profile. A single AWS AppConfig application can include multiple environments and configuration profiles. If you associate an extension to an application or an environment, AWS AppConfig invokes the extension for any workflows that relate to the application or environment resources, if applicable. For example, say you have an AWS AppConfig application called MobileApps that includes a configuration profile called AccessList. And say the MobileApps application includes Beta, Integration, and Production environments. You create an extension association for the AWS Step 4: Create an extension association for a custom AWS AppConfig extension 277 AWS AppConfig User Guide authored Amazon SNS notification extension and associate the extension to the MobileApps application. The Amazon SNS notification extension is invoked anytime the configuration is deployed for the application to any of the three environments. Use the following procedures to create an AWS AppConfig extension association by using the AWS AppConfig console. To create an extension association (console) 1. Open the AWS Systems Manager console at https://console.aws.amazon.com/systems- manager/appconfig/. 2. In the navigation pane, choose AWS AppConfig. 3. On the Extensions tab, choose an option button for an extension and then choose Add to resource. For the purposes of this walkthrough, choose MyS3ConfigurationBackUpExtension. 4. In the Extension resource details section, for Resource type, choose an AWS AppConfig resource type. Depending on the resource you choose, AWS AppConfig prompts you to choose other resources. For the purposes of this walkthrough, choose Application. 5. Choose an application in the list. 6. In the Parameters section, verify that S3_BUCKET is listed in the Key field. In the Value field, paste the ARN of the Lambda extensions. For example: arn:aws:lambda:aws- region:111122223333:function:MyS3ConfigurationBackUpExtension. 7. Choose Create association to resource. After you create the association, you can invoke the MyS3ConfigurationBackUpExtension extension by creating a new configuration profile that specifies hosted for its SourceUri. As a part of the workflow to create the new configuration, AWS AppConfig encounters the PRE_CREATE_HOSTED_CONFIGURATION_VERSION action point. Encountering this action point invokes the MyS3ConfigurationBackUpExtension extension, which automatically backs up the newly created configuration to the S3 bucket specified in the Parameter section of the extension association. Step 4: Create an extension association for a custom AWS AppConfig extension 278 AWS AppConfig User Guide Using code samples to perform common AWS AppConfig tasks This section includes code samples for programmatically performing common AWS AppConfig actions. We recommend you use these samples with the Java, Python, and JavaScript SDKs to perform the actions in a test environment. This section includes a code sample for cleaning up your test environment after you finish. Topics • Creating or updating a freeform configuration stored in the hosted configuration store • Creating a configuration profile for a secret stored in Secrets Manager • Deploying a configuration profile • Using AWS AppConfig Agent to read a freeform configuration profile • Using AWS AppConfig Agent to read a specific feature flag • Using AWS AppConfig Agent to retrieve a feature flag with variants • Using the GetLatestConfiguration API action to read a freeform configuration profile • Cleaning up your environment Creating or updating a freeform configuration stored in the hosted configuration store Each of the following samples includes comments about the actions performed by the code. The samples in this section call the following APIs: • CreateApplication • CreateConfigurationProfile • CreateHostedConfigurationVersion Java public CreateHostedConfigurationVersionResponse createHostedConfigVersion() { AppConfigClient appconfig = AppConfigClient.create(); Creating or updating a freeform configuration stored in the hosted configuration store 279 AWS AppConfig User Guide // Create an application CreateApplicationResponse app = appconfig.createApplication(req -> req.name("MyDemoApp")); // Create a hosted, freeform configuration profile CreateConfigurationProfileResponse configProfile = appconfig.createConfigurationProfile(req -> req .applicationId(app.id()) .name("MyConfigProfile") .locationUri("hosted") .type("AWS.Freeform")); // Create a hosted configuration version CreateHostedConfigurationVersionResponse hcv = appconfig.createHostedConfigurationVersion(req -> req .applicationId(app.id()) .configurationProfileId(configProfile.id()) .contentType("text/plain; charset=utf-8") .content(SdkBytes.fromUtf8String("my config data"))); return hcv; } Python import boto3 appconfig = boto3.client('appconfig') # create an application application = appconfig.create_application(Name='MyDemoApp') # create a hosted, freeform configuration profile config_profile = appconfig.create_configuration_profile( ApplicationId=application['Id'], Name='MyConfigProfile', LocationUri='hosted', Type='AWS.Freeform') # create a hosted configuration version hcv = appconfig.create_hosted_configuration_version( ApplicationId=application['Id'], ConfigurationProfileId=config_profile['Id'], Creating or updating a freeform configuration stored in the hosted
appconfig-ug-069
appconfig-ug.pdf
69
AppConfig User Guide // Create an application CreateApplicationResponse app = appconfig.createApplication(req -> req.name("MyDemoApp")); // Create a hosted, freeform configuration profile CreateConfigurationProfileResponse configProfile = appconfig.createConfigurationProfile(req -> req .applicationId(app.id()) .name("MyConfigProfile") .locationUri("hosted") .type("AWS.Freeform")); // Create a hosted configuration version CreateHostedConfigurationVersionResponse hcv = appconfig.createHostedConfigurationVersion(req -> req .applicationId(app.id()) .configurationProfileId(configProfile.id()) .contentType("text/plain; charset=utf-8") .content(SdkBytes.fromUtf8String("my config data"))); return hcv; } Python import boto3 appconfig = boto3.client('appconfig') # create an application application = appconfig.create_application(Name='MyDemoApp') # create a hosted, freeform configuration profile config_profile = appconfig.create_configuration_profile( ApplicationId=application['Id'], Name='MyConfigProfile', LocationUri='hosted', Type='AWS.Freeform') # create a hosted configuration version hcv = appconfig.create_hosted_configuration_version( ApplicationId=application['Id'], ConfigurationProfileId=config_profile['Id'], Creating or updating a freeform configuration stored in the hosted configuration store 280 AWS AppConfig User Guide Content=b'my config data', ContentType='text/plain') JavaScript import { AppConfigClient, CreateApplicationCommand, CreateConfigurationProfileCommand, CreateHostedConfigurationVersionCommand, } from "@aws-sdk/client-appconfig"; const appconfig = new AppConfigClient(); // create an application const application = await appconfig.send( new CreateApplicationCommand({ Name: "MyDemoApp" }) ); // create a hosted, freeform configuration profile const profile = await appconfig.send( new CreateConfigurationProfileCommand({ ApplicationId: application.Id, Name: "MyConfigProfile", LocationUri: "hosted", Type: "AWS.Freeform", }) ); // create a hosted configuration version await appconfig.send( new CreateHostedConfigurationVersionCommand({ ApplicationId: application.Id, ConfigurationProfileId: profile.Id, ContentType: "text/plain", Content: "my config data", }) ); Creating or updating a freeform configuration stored in the hosted configuration store 281 AWS AppConfig User Guide Creating a configuration profile for a secret stored in Secrets Manager Each of the following samples includes comments about the actions performed by the code. The samples in this section call the following APIs: • CreateApplication • CreateConfigurationProfile Java private void createSecretsManagerConfigProfile() { AppConfigClient appconfig = AppConfigClient.create(); // Create an application CreateApplicationResponse app = appconfig.createApplication(req -> req.name("MyDemoApp")); // Create a configuration profile for Secrets Manager Secret CreateConfigurationProfileResponse configProfile = appconfig.createConfigurationProfile(req -> req .applicationId(app.id()) .name("MyConfigProfile") .locationUri("secretsmanager://MySecret") .retrievalRoleArn("arn:aws:iam::000000000000:role/ RoleTrustedByAppConfigThatCanRetrieveSecret") .type("AWS.Freeform")); } Python import boto3 appconfig = boto3.client('appconfig') # create an application application = appconfig.create_application(Name='MyDemoApp') # create a configuration profile for Secrets Manager Secret config_profile = appconfig.create_configuration_profile( Creating a configuration profile for a secret stored in Secrets Manager 282 AWS AppConfig User Guide ApplicationId=application['Id'], Name='MyConfigProfile', LocationUri='secretsmanager://MySecret', RetrievalRoleArn='arn:aws:iam::000000000000:role/ RoleTrustedByAppConfigThatCanRetrieveSecret', Type='AWS.Freeform') JavaScript import { AppConfigClient, CreateConfigurationProfileCommand, } from "@aws-sdk/client-appconfig"; const appconfig = new AppConfigClient(); // create an application const application = await appconfig.send( new CreateApplicationCommand({ Name: "MyDemoApp" }) ); // create a configuration profile for Secrets Manager Secret await appconfig.send( new CreateConfigurationProfileCommand({ ApplicationId: application.Id, Name: "MyConfigProfile", LocationUri: "secretsmanager://MySecret", RetrievalRoleArn: "arn:aws:iam::000000000000:role/ RoleTrustedByAppConfigThatCanRetrieveSecret", Type: "AWS.Freeform", }) ); Deploying a configuration profile Each of the following samples includes comments about the actions performed by the code. The samples in this section call the following APIs: • CreateApplication • CreateConfigurationProfile • CreateHostedConfigurationVersion Deploying a configuration profile 283 AWS AppConfig • CreateEnvironment • StartDeployment • GetDeployment Java User Guide private void createDeployment() throws InterruptedException { AppConfigClient appconfig = AppConfigClient.create(); // Create an application CreateApplicationResponse app = appconfig.createApplication(req -> req.name("MyDemoApp")); // Create a hosted, freeform configuration profile CreateConfigurationProfileResponse configProfile = appconfig.createConfigurationProfile(req -> req .applicationId(app.id()) .name("MyConfigProfile") .locationUri("hosted") .type("AWS.Freeform")); // Create a hosted configuration version CreateHostedConfigurationVersionResponse hcv = appconfig.createHostedConfigurationVersion(req -> req .applicationId(app.id()) .configurationProfileId(configProfile.id()) .contentType("text/plain; charset=utf-8") .content(SdkBytes.fromUtf8String("my config data"))); // Create an environment CreateEnvironmentResponse env = appconfig.createEnvironment(req -> req .applicationId(app.id()) .name("Beta") // If you have CloudWatch alarms that monitor the health of your service, you can add them here and they // will trigger a rollback if they fire during an appconfig deployment //.monitors(Monitor.builder().alarmArn("arn:aws:cloudwatch:us- east-1:520900602629:alarm:MyAlarm") // .alarmRoleArn("arn:aws:iam::520900602629:role/MyAppConfigAlarmRole").build()) ); Deploying a configuration profile 284 AWS AppConfig User Guide // Start a deployment StartDeploymentResponse deploymentResponse = appconfig.startDeployment(req - > req .applicationId(app.id()) .configurationProfileId(configProfile.id()) .environmentId(env.id()) .configurationVersion(hcv.versionNumber().toString()) .deploymentStrategyId("AppConfig.Linear50PercentEvery30Seconds") ); // Wait for deployment to complete List<DeploymentState> nonFinalDeploymentStates = Arrays.asList( DeploymentState.DEPLOYING, DeploymentState.BAKING, DeploymentState.ROLLING_BACK, DeploymentState.VALIDATING); GetDeploymentRequest getDeploymentRequest = GetDeploymentRequest.builder().applicationId(app.id()) .environmentId(env.id()) .deploymentNumber(deploymentResponse.deploymentNumber()).build(); GetDeploymentResponse deployment = appconfig.getDeployment(getDeploymentRequest); while (nonFinalDeploymentStates.contains(deployment.state())) { System.out.println("Waiting for deployment to complete: " + deployment); Thread.sleep(1000L); deployment = appconfig.getDeployment(getDeploymentRequest); } System.out.println("Deployment complete: " + deployment); } Python import boto3 appconfig = boto3.client('appconfig') # create an application application = appconfig.create_application(Name='MyDemoApp') Deploying a configuration profile 285 AWS AppConfig User Guide # create an environment environment = appconfig.create_environment( ApplicationId=application['Id'], Name='MyEnvironment') # create a configuration profile config_profile = appconfig.create_configuration_profile( ApplicationId=application['Id'], Name='MyConfigProfile', LocationUri='hosted', Type='AWS.Freeform') # create a hosted configuration version hcv = appconfig.create_hosted_configuration_version( ApplicationId=application['Id'], ConfigurationProfileId=config_profile['Id'], Content=b'my config data', ContentType='text/plain') # start a deployment deployment = appconfig.start_deployment( ApplicationId=application['Id'], EnvironmentId=environment['Id'], ConfigurationProfileId=config_profile['Id'], ConfigurationVersion=str(hcv['VersionNumber']), DeploymentStrategyId='AppConfig.Linear20PercentEvery6Minutes') JavaScript import { AppConfigClient, CreateApplicationCommand, CreateEnvironmentCommand, CreateConfigurationProfileCommand, CreateHostedConfigurationVersionCommand, StartDeploymentCommand, } from "@aws-sdk/client-appconfig"; const appconfig = new AppConfigClient(); // create an application const application = await appconfig.send( new CreateApplicationCommand({ Name: "MyDemoApp" }) Deploying a configuration profile 286 AWS AppConfig ); User Guide // create an environment const environment = await appconfig.send( new CreateEnvironmentCommand({ ApplicationId: application.Id, Name: "MyEnvironment", }) ); // create a configuration profile const config_profile = await appconfig.send( new CreateConfigurationProfileCommand({ ApplicationId: application.Id, Name: "MyConfigProfile", LocationUri: "hosted", Type: "AWS.Freeform", }) ); // create a hosted configuration version const hcv = await appconfig.send( new CreateHostedConfigurationVersionCommand({ ApplicationId: application.Id, ConfigurationProfileId: config_profile.Id, Content: "my config data", ContentType: "text/plain", }) ); // start a deployment await appconfig.send( new StartDeploymentCommand({ ApplicationId: application.Id, EnvironmentId: environment.Id, ConfigurationProfileId: config_profile.Id, ConfigurationVersion:
appconfig-ug-070
appconfig-ug.pdf
70
application const application = await appconfig.send( new CreateApplicationCommand({ Name: "MyDemoApp" }) Deploying a configuration profile 286 AWS AppConfig ); User Guide // create an environment const environment = await appconfig.send( new CreateEnvironmentCommand({ ApplicationId: application.Id, Name: "MyEnvironment", }) ); // create a configuration profile const config_profile = await appconfig.send( new CreateConfigurationProfileCommand({ ApplicationId: application.Id, Name: "MyConfigProfile", LocationUri: "hosted", Type: "AWS.Freeform", }) ); // create a hosted configuration version const hcv = await appconfig.send( new CreateHostedConfigurationVersionCommand({ ApplicationId: application.Id, ConfigurationProfileId: config_profile.Id, Content: "my config data", ContentType: "text/plain", }) ); // start a deployment await appconfig.send( new StartDeploymentCommand({ ApplicationId: application.Id, EnvironmentId: environment.Id, ConfigurationProfileId: config_profile.Id, ConfigurationVersion: hcv.VersionNumber.toString(), DeploymentStrategyId: "AppConfig.Linear20PercentEvery6Minutes", }) ); Deploying a configuration profile 287 AWS AppConfig User Guide Using AWS AppConfig Agent to read a freeform configuration profile Each of the following samples includes comments about the actions performed by the code. Java public void retrieveConfigFromAgent() throws Exception { /* In this sample, we will retrieve configuration data from the AWS AppConfig Agent. The agent is a sidecar process that handles retrieving configuration data from AppConfig for you in a way that implements best practices like configuration caching. For more information about the agent, see How to use AWS AppConfig Agent */ // The agent runs a local HTTP server that serves configuration data // Make a GET request to the agent's local server to retrieve the configuration data URL url = new URL("http://localhost:2772/applications/MyDemoApp/ environments/Beta/configurations/MyConfigProfile"); HttpURLConnection con = (HttpURLConnection) url.openConnection(); con.setRequestMethod("GET"); StringBuilder content; try (BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()))) { content = new StringBuilder(); int ch; while ((ch = in.read()) != -1) { content.append((char) ch); } } con.disconnect(); System.out.println("Configuration from agent via HTTP: " + content); } Python # in this sample, we will retrieve configuration data from the AWS AppConfig Agent. Using AWS AppConfig Agent to read a freeform configuration profile 288 AWS AppConfig User Guide # the agent is a sidecar process that handles retrieving configuration data from AWS AppConfig # for you in a way that implements best practices like configuration caching. # # for more information about the agent, see # How to use AWS AppConfig Agent # import requests application_name = 'MyDemoApp' environment_name = 'MyEnvironment' config_profile_name = 'MyConfigProfile' # the agent runs a local HTTP server that serves configuration data # make a GET request to the agent's local server to retrieve the configuration data response = requests.get(f"http://localhost:2772/applications/{application_name}/ environments/{environment_name}/configurations/{config_profile_name}") config = response.content JavaScript // in this sample, we will retrieve configuration data from the AWS AppConfig Agent. // the agent is a sidecar process that handles retrieving configuration data from AppConfig // for you in a way that implements best practices like configuration caching. // for more information about the agent, see // How to use AWS AppConfig Agent const application_name = "MyDemoApp"; const environment_name = "MyEnvironment"; const config_profile_name = "MyConfigProfile"; // the agent runs a local HTTP server that serves configuration data // make a GET request to the agent's local server to retrieve the configuration data const url = `http://localhost:2772/applications/${application_name}/environments/ ${environment_name}/configurations/${config_profile_name}`; const response = await fetch(url); const config = await response.text(); // (use `await response.json()` if your config is json) Using AWS AppConfig Agent to read a freeform configuration profile 289 AWS AppConfig User Guide Using AWS AppConfig Agent to read a specific feature flag Each of the following samples includes comments about the actions performed by the code. Java public void retrieveSingleFlagFromAgent() throws Exception { /* You can retrieve a single flag's data from the agent by providing the "flag" query string parameter. Note: the configuration's type must be AWS.AppConfig.FeatureFlags */ URL url = new URL("http://localhost:2772/applications/MyDemoApp/ environments/Beta/configurations/MyFlagsProfile?flag=myFlagKey"); HttpURLConnection con = (HttpURLConnection) url.openConnection(); con.setRequestMethod("GET"); StringBuilder content; try (BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()))) { content = new StringBuilder(); int ch; while ((ch = in.read()) != -1) { content.append((char) ch); } } con.disconnect(); System.out.println("MyFlagName from agent: " + content); } Python import requests application_name = 'MyDemoApp' environment_name = 'MyEnvironment' config_profile_name = 'MyConfigProfile' flag_key = 'MyFlag' # retrieve a single flag's data by providing the "flag" query string parameter # note: the configuration's type must be AWS.AppConfig.FeatureFlags Using AWS AppConfig Agent to read a specific feature flag 290 AWS AppConfig User Guide response = requests.get(f"http://localhost:2772/applications/{application_name}/ environments/{environment_name}/configurations/{config_profile_name}? flag={flag_key}") config = response.content JavaScript const application_name = "MyDemoApp"; const environment_name = "MyEnvironment"; const config_profile_name = "MyConfigProfile"; const flag_name = "MyFlag"; // retrieve a single flag's data by providing the "flag" query string parameter // note: the configuration's type must be AWS.AppConfig.FeatureFlags const url = `http://localhost:2772/applications/${application_name}/environments/ ${environment_name}/configurations/${config_profile_name}?flag=${flag_name}`; const response = await fetch(url); const flag = await response.json(); // { "enabled": true/false } Using AWS AppConfig Agent to retrieve a feature flag with variants Each of the following samples includes comments about the actions performed by the code. Java public static void retrieveConfigFromAgentWithVariants() throws Exception { /* This sample retrieves feature flag configuration data containing variants from AWS AppConfig Agent. For more information
appconfig-ug-071
appconfig-ug.pdf
71
"MyEnvironment"; const config_profile_name = "MyConfigProfile"; const flag_name = "MyFlag"; // retrieve a single flag's data by providing the "flag" query string parameter // note: the configuration's type must be AWS.AppConfig.FeatureFlags const url = `http://localhost:2772/applications/${application_name}/environments/ ${environment_name}/configurations/${config_profile_name}?flag=${flag_name}`; const response = await fetch(url); const flag = await response.json(); // { "enabled": true/false } Using AWS AppConfig Agent to retrieve a feature flag with variants Each of the following samples includes comments about the actions performed by the code. Java public static void retrieveConfigFromAgentWithVariants() throws Exception { /* This sample retrieves feature flag configuration data containing variants from AWS AppConfig Agent. For more information about the agent, see How to use AWS AppConfig Agent */ // Make a GET request to the agent's local server to retrieve the configuration data URL url = new URL("http://localhost:2772/applications/MyDemoApp/environments/ Beta/configurations/MyConfigProfile"); HttpURLConnection con = (HttpURLConnection) url.openConnection(); // Provide context in the 'Context' header Using AWS AppConfig Agent to retrieve a feature flag with variants 291 AWS AppConfig User Guide // In the header value, use '=' to separate context key from context value // Note: Multiple context values may be passed either across // multiple headers or as comma-separated values in a single header con.setRequestProperty("Context", "country=US"); StringBuilder content; try (BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()))) { content = new StringBuilder(); int ch; while ((ch = in.read()) != -1) { content.append((char) ch); } } con.disconnect(); System.out.println("Configuration from agent via HTTP: " + content); } Python # This sample retrieve features flag configuration data # containing variants from AWS AppConfig Agent. # For more information about the agent, see How to use AWS AppConfig Agent import requests application_name = 'MyDemoApp' environment_name = 'Beta' config_profile_name = 'MyConfigProfile' # make a GET request to the agent's local server to retrieve the configuration data response = requests.get(f"http://localhost:2772/applications/application_name/ environments/environment_name/configurations/configuration_profile_name", headers = { "Context": "country=US" # Provide context in the 'Context' header # In the header value, use '=' to separate context key from context value # Note: Multiple context values may be passed either across # multiple headers or as comma- separated values in a single header Using AWS AppConfig Agent to retrieve a feature flag with variants 292 AWS AppConfig } ) print("Configuration from agent via HTTP: ", response.json()) User Guide JavaScript // This sample retrieves feature flag configuration data // containing variants from AWS AppConfig Agent. // For more information about the agent, see How to use AWS AppConfig Agent const application_name = "MyDemoApp"; const environment_name = "Beta"; const config_profile_name = "MyConfigProfile"; const url = `http://localhost:2772/applications/$application_name/environments/ $environment_name/configurations/$configuration_profile_name`; // make a GET request to the agent's local server to retrieve the configuration data const response = await fetch(url, { method: 'GET', headers: { 'Context': 'country=US' // Provide context in the 'Context' header // In the header value, use '=' to separate context key from context value // Note: Multiple context values may be passed either across // multiple headers or as comma-separated values in a single header } }); const config = await response.json(); console.log("Configuration from agent via HTTP: ", config); Using the GetLatestConfiguration API action to read a freeform configuration profile Each of the following samples includes comments about the actions performed by the code. The samples in this section call the following APIs: Using the GetLatestConfiguration API action to read a freeform configuration profile 293 AWS AppConfig • GetLatestConfiguration • StartConfigurationSession Java /* User Guide The example below uses two AWS AppConfig Data APIs: StartConfigurationSession and GetLatestConfiguration. For more information about these APIs, see AWS AppConfig Data. This class is meant to be used as a singleton to retrieve the latest configuration data from AWS AppConfig. This class maintains a cache of the latest configuration data in addition to the configuration token to be passed to the next GetLatestConfiguration API call. */ class AppConfigApiRetriever { /* AWS AppConfig Data SDK client used to interact with the AWS AppConfig Data service. */ private AppConfigDataClient appConfigData; /* The configuration token to be passed to the next GetLatestConfiguration API call. */ private String configurationToken; /* The cached configuration data to be returned when there is no new configuration data available. */ private SdkBytes configuration; public AppConfigApiRetriever() { this.appConfigData = AppConfigDataClient.create(); } /* Returns the latest configuration data stored in AWS AppConfig. */ Using the GetLatestConfiguration API action to read a freeform configuration profile 294 AWS AppConfig User Guide public SdkBytes getConfig() { /* If there is no configuration token yet, get one by starting a new session with the StartConfigurationSession API. Note that this API does not return configuration data. Rather, it returns an initial configuration token that is subsequently passed to the GetLatestConfiguration API. */ if (this.configurationToken == null) { StartConfigurationSessionResponse session = appConfigData.startConfigurationSession(req -> req .applicationIdentifier("MyDemoApp") .configurationProfileIdentifier("MyConfig") .environmentIdentifier("Beta")); this.configurationToken = session.initialConfigurationToken(); } /* Retrieve the configuration from the GetLatestConfiguration API, providing the current configuration token. If this caller does not yet have the
appconfig-ug-072
appconfig-ug.pdf
72
API action to read a freeform configuration profile 294 AWS AppConfig User Guide public SdkBytes getConfig() { /* If there is no configuration token yet, get one by starting a new session with the StartConfigurationSession API. Note that this API does not return configuration data. Rather, it returns an initial configuration token that is subsequently passed to the GetLatestConfiguration API. */ if (this.configurationToken == null) { StartConfigurationSessionResponse session = appConfigData.startConfigurationSession(req -> req .applicationIdentifier("MyDemoApp") .configurationProfileIdentifier("MyConfig") .environmentIdentifier("Beta")); this.configurationToken = session.initialConfigurationToken(); } /* Retrieve the configuration from the GetLatestConfiguration API, providing the current configuration token. If this caller does not yet have the latest configuration (e.g. this is the first call to GetLatestConfiguration or new configuration data has been deployed since the first call), the latest configuration data will be returned. Otherwise, the GetLatestConfiguration API will not return any data since the caller already has the latest. */ GetLatestConfigurationResponse response = appConfigData.getLatestConfiguration( GetLatestConfigurationRequest.builder().configurationToken(this.configurationToken).build()); /* Save the returned configuration token so that it can be passed to the next GetLatestConfiguration API call. Warning: Not persisting this token for use in the next GetLatestConfiguration API call may result in higher than expected usage costs. */ this.configurationToken = response.nextPollConfigurationToken(); /* If the GetLatestConfiguration API returned configuration data, update the cached configuration with the returned data. Using the GetLatestConfiguration API action to read a freeform configuration profile 295 AWS AppConfig User Guide Otherwise, assume the configuration has not changed, and return the cached configuration. */ SdkBytes configFromApi = response.configuration(); if (configFromApi.asByteArray().length != 0) { this.configuration = configFromApi; System.out.println("Configuration contents have changed since the last GetLatestConfiguration call, new contents = " + this.configuration.asUtf8String()); } else { System.out.println("GetLatestConfiguration returned an empty response because we already have the latest configuration"); } return this.configuration; } } Python # The example below uses two AWS AppConfig Data APIs: StartConfigurationSession and GetLatestConfiguration. # For more information about these APIs, see AWS AppConfig Data. # # This class is meant to be used as a singleton to retrieve the latest configuration data from AWS AppConfig. # This class maintains a cache of the latest configuration data in addition to the configuration token to be # passed to the next GetLatestConfiguration API call. class AppConfigApiRetriever: def __init__(self): # AWS AppConfig Data SDK client used to interact with the AWS AppConfig Data service. self.appconfigdata = boto3.client('appconfigdata') # The configuration token to be passed to the next GetLatestConfiguration API call. self.configuration_token = None # The cached configuration data to be returned when there is no new configuration data available. self.configuration = None # Returns the latest configuration data stored in AWS AppConfig. Using the GetLatestConfiguration API action to read a freeform configuration profile 296 AWS AppConfig User Guide def get_config(self): # If there is no configuration token yet, get one by starting a new session with the StartConfigurationSession API. # Note that this API does not return configuration data. Rather, it returns an initial configuration token that is # subsequently passed to the GetLatestConfiguration API. if not self.configuration_token: session = self.appconfigdata.start_configuration_session( ApplicationIdentifier='MyDemoApp', ConfigurationProfileIdentifier='MyConfig', EnvironmentIdentifier='Beta' ) self.configuration_token = session['InitialConfigurationToken'] # Retrieve the configuration from the GetLatestConfiguration API, providing the current configuration token. # If this caller does not yet have the latest configuration (e.g. this is the first call to GetLatestConfiguration # or new configuration data has been deployed since the first call), the latest configuration data will be returned. # Otherwise, the GetLatestConfiguration API will not return any data since the caller already has the latest. response = self.appconfigdata.get_latest_configuration(ConfigurationToken=self.configuration_token) # Save the returned configuration token so that it can be passed to the next GetLatestConfiguration API call. # Warning: Not persisting this token for use in the next GetLatestConfiguration API call may result in higher # than expected usage costs. self.configuration_token = response['NextPollConfigurationToken'] # If the GetLatestConfiguration API returned configuration data, update the cached configuration with the returned data. # Otherwise, assume the configuration has not changed, and return the cached configuration. config_from_api = response['Configuration'].read() if config_from_api: self.configuration = config_from_api print('Configuration contents have changed since the last GetLatestConfiguration call, new contents = ' + str(self.configuration)) else: print('GetLatestConfiguration returned an empty response because we already have the latest configuration') Using the GetLatestConfiguration API action to read a freeform configuration profile 297 AWS AppConfig User Guide return self.configuration JavaScript /* The example below uses two AWS AppConfig Data APIs: StartConfigurationSession and GetLatestConfiguration. For more information about these APIs, see AWS AppConfig Data. This class is meant to be used as a singleton to retrieve the latest configuration data from AWS AppConfig. This class maintains a cache of the latest configuration data in addition to the configuration token to be passed to the next GetLatestConfiguration API call. */ class AppConfigApiRetriever { constructor() { /* AWS AppConfig Data SDK client used to interact with the AWS AppConfig Data service. */ this.appconfigdata = new AppConfigDataClient(); /* The configuration token to be passed
appconfig-ug-073
appconfig-ug.pdf
73
/* The example below uses two AWS AppConfig Data APIs: StartConfigurationSession and GetLatestConfiguration. For more information about these APIs, see AWS AppConfig Data. This class is meant to be used as a singleton to retrieve the latest configuration data from AWS AppConfig. This class maintains a cache of the latest configuration data in addition to the configuration token to be passed to the next GetLatestConfiguration API call. */ class AppConfigApiRetriever { constructor() { /* AWS AppConfig Data SDK client used to interact with the AWS AppConfig Data service. */ this.appconfigdata = new AppConfigDataClient(); /* The configuration token to be passed to the next GetLatestConfiguration API call. */ this.configurationToken = null; /* The cached configuration data to be returned when there is no new configuration data available. */ this.configuration = null; } /* Returns the latest configuration data stored in AWS AppConfig. */ async getConfig() { /* Using the GetLatestConfiguration API action to read a freeform configuration profile 298 AWS AppConfig User Guide If there is no configuration token yet, get one by starting a new session with the StartConfigurationSession API. Note that this API does not return configuration data. Rather, it returns an initial configuration token that is subsequently passed to the GetLatestConfiguration API. */ if (!this.configurationToken) { const session = await this.appconfigdata.send( new StartConfigurationSessionCommand({ ApplicationIdentifier: "MyDemoApp", ConfigurationProfileIdentifier: "MyConfig", EnvironmentIdentifier: "Beta" }) ); this.configurationToken = session.InitialConfigurationToken; } /* Retrieve the configuration from the GetLatestConfiguration API, providing the current configuration token. If this caller does not yet have the latest configuration (e.g. this is the first call to GetLatestConfiguration or new configuration data has been deployed since the first call), the latest configuration data will be returned. Otherwise, the GetLatestConfiguration API will not return any data since the caller already has the latest. */ const response = await this.appconfigdata.send( new GetLatestConfigurationCommand({ ConfigurationToken: this.configurationToken }) ); /* Save the returned configuration token so that it can be passed to the next GetLatestConfiguration API call. Warning: Not persisting this token for use in the next GetLatestConfiguration API call may result in higher than expected usage costs. */ this.configurationToken = response.NextPollConfigurationToken; /* Using the GetLatestConfiguration API action to read a freeform configuration profile 299 AWS AppConfig User Guide If the GetLatestConfiguration API returned configuration data, update the cached configuration with the returned data. Otherwise, assume the configuration has not changed, and return the cached configuration. */ const configFromApi = response.Configuration.transformToString(); if (configFromApi) { this.configuration = configFromApi; console.log("Configuration contents have changed since the last GetLatestConfiguration call, new contents = " + this.configuration); } else { console.log("GetLatestConfiguration returned an empty response because we already have the latest configuration"); } return this.configuration; } } Cleaning up your environment If you ran one or more of the code samples in this section, we recommend you use one of the following samples to locate and delete the AWS AppConfig resources created by those code samples. The samples in this section call the following APIs: • ListApplications • DeleteApplication • ListEnvironments • DeleteEnvironments • ListConfigurationProfiles • DeleteConfigurationProfile • ListHostedConfigurationVersions • DeleteHostedConfigurationVersion Java /* Cleaning up your environment 300 AWS AppConfig User Guide This sample provides cleanup code that deletes all the AWS AppConfig resources created in the samples above. WARNING: this code will permanently delete the given application and all of its sub-resources, including configuration profiles, hosted configuration versions, and environments. DO NOT run this code against an application that you may need in the future. */ public void cleanUpDemoResources() { AppConfigClient appconfig = AppConfigClient.create(); // The name of the application to delete // IMPORTANT: verify this name corresponds to the application you wish to delete String applicationToDelete = "MyDemoApp"; appconfig.listApplicationsPaginator(ListApplicationsRequest.builder().build()).items().forEach(app -> { if (app.name().equals(applicationToDelete)) { System.out.println("Deleting App: " + app); appconfig.listConfigurationProfilesPaginator(req -> req.applicationId(app.id())).items().forEach(cp -> { System.out.println("Deleting Profile: " + cp); appconfig .listHostedConfigurationVersionsPaginator(req -> req .applicationId(app.id()) .configurationProfileId(cp.id())) .items() .forEach(hcv -> { System.out.println("Deleting HCV: " + hcv); appconfig.deleteHostedConfigurationVersion(req -> req .applicationId(app.id()) .configurationProfileId(cp.id()) .versionNumber(hcv.versionNumber())); }); appconfig.deleteConfigurationProfile(req -> req .applicationId(app.id()) .configurationProfileId(cp.id())); }); Cleaning up your environment 301 AWS AppConfig User Guide appconfig.listEnvironmentsPaginator(req- >req.applicationId(app.id())).items().forEach(env -> { System.out.println("Deleting Environment: " + env); appconfig.deleteEnvironment(req- >req.applicationId(app.id()).environmentId(env.id())); }); appconfig.deleteApplication(req -> req.applicationId(app.id())); } }); } Python # this sample provides cleanup code that deletes all the AWS AppConfig resources created in the samples above. # # WARNING: this code will permanently delete the given application and all of its sub-resources, including # configuration profiles, hosted configuration versions, and environments. DO NOT run this code against # an application that you may need in the future. # import boto3 # the name of the application to delete # IMPORTANT: verify this name corresponds to the application you wish to delete application_name = 'MyDemoApp' # create and iterate over a list paginator such that we end up with a list of pages, which are themselves lists of applications # e.g. [ [{'Name':'MyApp1',...},{'Name':'MyApp2',...}], [{'Name':'MyApp3',...}] ] list_of_app_lists = [page['Items'] for page in appconfig.get_paginator('list_applications').paginate()]
appconfig-ug-074
appconfig-ug.pdf
74
will permanently delete the given application and all of its sub-resources, including # configuration profiles, hosted configuration versions, and environments. DO NOT run this code against # an application that you may need in the future. # import boto3 # the name of the application to delete # IMPORTANT: verify this name corresponds to the application you wish to delete application_name = 'MyDemoApp' # create and iterate over a list paginator such that we end up with a list of pages, which are themselves lists of applications # e.g. [ [{'Name':'MyApp1',...},{'Name':'MyApp2',...}], [{'Name':'MyApp3',...}] ] list_of_app_lists = [page['Items'] for page in appconfig.get_paginator('list_applications').paginate()] # retrieve the target application from the list of lists application = [app for apps in list_of_app_lists for app in apps if app['Name'] == application_name][0] print(f"deleting application {application['Name']} (id={application['Id']})") # delete all configuration profiles list_of_config_lists = [page['Items'] for page in appconfig.get_paginator('list_configuration_profiles').paginate(ApplicationId=application['Id'])] Cleaning up your environment 302 AWS AppConfig User Guide for config_profile in [config for configs in list_of_config_lists for config in configs]: print(f"\tdeleting configuration profile {config_profile['Name']} (Id={config_profile['Id']})") # delete all hosted configuration versions list_of_hcv_lists = [page['Items'] for page in appconfig.get_paginator('list_hosted_configuration_versions').paginate(ApplicationId=application['Id'], ConfigurationProfileId=config_profile['Id'])] for hcv in [hcv for hcvs in list_of_hcv_lists for hcv in hcvs]: appconfig.delete_hosted_configuration_version(ApplicationId=application['Id'], ConfigurationProfileId=config_profile['Id'], VersionNumber=hcv['VersionNumber']) print(f"\t\tdeleted hosted configuration version {hcv['VersionNumber']}") # delete the config profile itself appconfig.delete_configuration_profile(ApplicationId=application['Id'], ConfigurationProfileId=config_profile['Id']) print(f"\tdeleted configuration profile {config_profile['Name']} (Id={config_profile['Id']})") # delete all environments list_of_env_lists = [page['Items'] for page in appconfig.get_paginator('list_environments').paginate(ApplicationId=application['Id'])] for environment in [env for envs in list_of_env_lists for env in envs]: appconfig.delete_environment(ApplicationId=application['Id'], EnvironmentId=environment['Id']) print(f"\tdeleted environment {environment['Name']} (Id={environment['Id']})") # delete the application itself appconfig.delete_application(ApplicationId=application['Id']) print(f"deleted application {application['Name']} (id={application['Id']})") JavaScript // this sample provides cleanup code that deletes all the AWS AppConfig resources created in the samples above. // WARNING: this code will permanently delete the given application and all of its sub-resources, including // configuration profiles, hosted configuration versions, and environments. DO NOT run this code against // an application that you may need in the future. Cleaning up your environment 303 AWS AppConfig User Guide import { AppConfigClient, paginateListApplications, DeleteApplicationCommand, paginateListConfigurationProfiles, DeleteConfigurationProfileCommand, paginateListHostedConfigurationVersions, DeleteHostedConfigurationVersionCommand, paginateListEnvironments, DeleteEnvironmentCommand, } from "@aws-sdk/client-appconfig"; const client = new AppConfigClient(); // the name of the application to delete // IMPORTANT: verify this name corresponds to the application you wish to delete const application_name = "MyDemoApp"; // iterate over all applications, deleting ones that have the name defined above for await (const app_page of paginateListApplications({ client }, {})) { for (const application of app_page.Items) { // skip applications that dont have the name thats set if (application.Name !== application_name) continue; console.log( `deleting application ${application.Name} (id=${application.Id})`); // delete all configuration profiles for await (const config_page of paginateListConfigurationProfiles({ client }, { ApplicationId: application.Id })) { for (const config_profile of config_page.Items) { console.log(`\tdeleting configuration profile ${config_profile.Name} (Id= ${config_profile.Id})`); // delete all hosted configuration versions for await (const hosted_page of paginateListHostedConfigurationVersions({ client }, { ApplicationId: application.Id, ConfigurationProfileId: config_profile.Id } )) { for (const hosted_config_version of hosted_page.Items) { await client.send( new DeleteHostedConfigurationVersionCommand({ Cleaning up your environment 304 AWS AppConfig User Guide ApplicationId: application.Id, ConfigurationProfileId: config_profile.Id, VersionNumber: hosted_config_version.VersionNumber, }) ); console.log(`\t\tdeleted hosted configuration version ${hosted_config_version.VersionNumber}`); } } // delete the config profile itself await client.send( new DeleteConfigurationProfileCommand({ ApplicationId: application.Id, ConfigurationProfileId: config_profile.Id, }) ); console.log(`\tdeleted configuration profile ${config_profile.Name} (Id= ${config_profile.Id})`) } // delete all environments for await (const env_page of paginateListEnvironments({ client }, { ApplicationId: application.Id })) { for (const environment of env_page.Items) { await client.send( new DeleteEnvironmentCommand({ ApplicationId: application.Id, EnvironmentId: environment.Id, }) ); console.log(`\tdeleted environment ${environment.Name} (Id= ${environment.Id})`) } } } // delete the application itself await client.send( new DeleteApplicationCommand({ ApplicationId: application.Id }) ); console.log(`deleted application ${application.Name} (id=${application.Id})`) } Cleaning up your environment 305 AWS AppConfig } User Guide Cleaning up your environment 306 AWS AppConfig User Guide Configuring AWS AppConfig deletion protection AWS AppConfig provides an account setting to help prevent users from unintentionally deleting actively-used environments and configuration profiles. AWS AppConfig monitors calls to GetLatestConfiguration and GetConfiguration and tracks which configuration profiles and environments have been included in these calls within a 60-minute interval (the default setting). Any configuration profile or environment that was accessed within that interval will be considered active. If you attempt to delete an active configuration profile or environment, AWS AppConfig returns an error. If needed, you can bypass this error by using the DeletionProtectionCheck parameter. For more information, see Bypassing or forcing a deletion protection check. Configure deletion protection using the console Use the following procedure to configure deletion protection by using the AWS Systems Manager console. To configure deletion protection (console) 1. Open the AWS Systems Manager console at https://console.aws.amazon.com/systems- manager/appconfig/. 2. In the navigation pane, choose Settings. 3. Use the toggle to enable or disable deletion protection. 4. For Protection period, set the definition of an active resource to be between 15 and 1440 minutes. 5. Click Apply. Configure deletion protection using the AWS CLI Use the following procedure to configure deletion protection by using the AWS CLI.
appconfig-ug-075
appconfig-ug.pdf
75
or forcing a deletion protection check. Configure deletion protection using the console Use the following procedure to configure deletion protection by using the AWS Systems Manager console. To configure deletion protection (console) 1. Open the AWS Systems Manager console at https://console.aws.amazon.com/systems- manager/appconfig/. 2. In the navigation pane, choose Settings. 3. Use the toggle to enable or disable deletion protection. 4. For Protection period, set the definition of an active resource to be between 15 and 1440 minutes. 5. Click Apply. Configure deletion protection using the AWS CLI Use the following procedure to configure deletion protection by using the AWS CLI. Replace value in the following commands with the value you want to use in your environment. Note Before you begin, we recommend you update to the latest version of the AWS CLI. For more information, see Install or update to the latest version of the AWS CLI in the AWS Command Line Interface User Guide. 307 AWS AppConfig User Guide To configure deletion protection (CLI) 1. Run the following command to view the current deletion protection settings. aws appconfig get-account-settings 2. Run the following command to enable or disable deletion protection. Specify false to disable deletion protection or true to enable it. aws appconfig update-account-settings --deletion-protection Enabled=value 3. You can increase the default interval to a maximum of 24 hours. Run the following command to specify a new interval. aws appconfig update-account-settings --deletion-protection Enabled=true,ProtectionPeriodInMinutes=a number between 15 and 1440 Bypassing or forcing a deletion protection check To help you manage deletion protection, the DeleteEnvironment and DeleteConfigurationProfile APIs include a parameter called DeletionProtectionCheck. This parameter supports the following values: • BYPASS: Instructs AWS AppConfig to bypass the deletion protection check and delete a configuration profile even if deletion protection would have otherwise prevented it. • APPLY: Instructs the deletion protection check to run, even if deletion protection is disabled at the account level. APPLY also forces the deletion protection check to run against resources created in the past hour, which are normally excluded from deletion protection checks. • ACCOUNT_DEFAULT: The default setting, which instructs AWS AppConfig to implement the deletion protection value specified in the UpdateAccountSettings API. Note By default, DeletionProtectionCheck skips configuration profiles and environments created in the past hour. The default configuration is intended to prevent deletion protection from interferring with tests and demos that create short-lived resources. You Bypassing or forcing a deletion protection check 308 AWS AppConfig User Guide can override this behavior by passing DeletionProtectionCheck=APPLY when calling DeleteEnvironment or DeleteConfigurationProfile. The following CLI walkthrough uses sample commands to illustrate how to use the DeletionProtectionCheck parameter. Replace ID in the following commands with the ID for your AWS AppConfig artifacts. 1. Call GetLatestConfiguration on a deployed configuration. aws appconfigdata get-latest-configuration --configuration-token $(aws appconfigdata start-configuration-session --application-identifier ID -- environment-identifier ID --configuration-profile-identifier ID --query InitialConfigurationToken) outfile.txt 2. Wait 60 seconds for AWS AppConfig to register that the configuration is active. 3. Run the following command to call DeleteEnvironment and apply deletion protection on the environment. aws appconfig delete-environment --environment-id ID --application-id ID -- deletion-protection-check APPLY The command should return the following error. An error occurred (BadRequestException) when calling the DeleteEnvironment operation: Environment Beta is actively being used in your application and cannot be deleted. 4. Run the following command to bypass deletion protection and delete the environment. aws appconfig delete-environment --environment-id ID --application-id ID -- deletion-protection-check BYPASS Bypassing or forcing a deletion protection check 309 AWS AppConfig User Guide Security in AWS AppConfig Cloud security at AWS is the highest priority. As an AWS customer, you benefit from a data center and network architecture that are built to meet the requirements of the most security-sensitive organizations. Security is a shared responsibility between AWS and you. The shared responsibility model describes this as security of the cloud and security in the cloud: • Security of the cloud – AWS is responsible for protecting the infrastructure that runs AWS services in the AWS Cloud. AWS also provides you with services that you can use securely. Third- party auditors regularly test and verify the effectiveness of our security as part of the AWS Compliance Programs. To learn about the compliance programs that apply to AWS Systems Manager, see AWS Services in Scope by Compliance Program. • Security in the cloud – Your responsibility is determined by the AWS service that you use. You are also responsible for other factors including the sensitivity of your data, your company’s requirements, and applicable laws and regulations. AWS AppConfig is a tool in AWS Systems Manager. To understand how to apply the shared responsibility model when using AWS AppConfig, see Security in AWS Systems Manager. That section describes how to configure Systems Manager to meet the security and compliance objectives for AWS AppConfig. Implement least privilege access As a security best practice, grant the minimum required
appconfig-ug-076
appconfig-ug.pdf
76
by Compliance Program. • Security in the cloud – Your responsibility is determined by the AWS service that you use. You are also responsible for other factors including the sensitivity of your data, your company’s requirements, and applicable laws and regulations. AWS AppConfig is a tool in AWS Systems Manager. To understand how to apply the shared responsibility model when using AWS AppConfig, see Security in AWS Systems Manager. That section describes how to configure Systems Manager to meet the security and compliance objectives for AWS AppConfig. Implement least privilege access As a security best practice, grant the minimum required permissions that identities require to perform specific actions on specific resources under specific conditions. AWS AppConfig Agent offers two features that enable the agent to access the filesystem of an instance or container: backup and write to disk. If you enable these features, verify that only the AWS AppConfig Agent has permissions to write to the designated configuration files on the filesystem. Also verify that only the processes required to read from these configuration files have the ability to do so. Implementing least privilege access is fundamental in reducing security risk and the impact that could result from errors or malicious intent. For more information about implementing least privilege access, see SEC03-BP02 Grant least privilege access in the AWS Well-Architected Tool User Guide. For more information about the AWS Implement least privilege access 310 AWS AppConfig User Guide AppConfig Agent features mentioned in this section, see Using a manifest to enable additional retrieval features. Data encryption at rest for AWS AppConfig AWS AppConfig provides encryption by default to protect customer data at rest using AWS owned keys. AWS owned keys — AWS AppConfig uses these keys by default to automatically encrypt data deployed by the service and hosted in the AWS AppConfig data store. You can't view, manage, or use AWS owned keys, or audit their use. However, you don't have to take any action or change any programs to protect the keys that encrypt your data. For more information, see AWS owned keys in the AWS Key Management Service Developer Guide. While you can't disable this layer of encryption or select an alternate encryption type, you can specify a customer managed key to be used when you save configuration data hosted in the AWS AppConfig data store and when you deploy your configuration data. Customer managed keys — AWS AppConfig supports the use of a symmetric customer managed key that you create, own, and manage to add a second layer of encryption over the existing AWS owned key. Because you have full control of this layer of encryption, you can perform such tasks as: • Establishing and maintaining key policies and grants • Establishing and maintaining IAM policies • Enabling and disabling key policies • Rotating key cryptographic material • Adding tags • Creating key aliases • Scheduling keys for deletion For more information, see Customer managed key in the AWS Key Management Service Developer Guide. AWS AppConfig supports customer managed keys AWS AppConfig offers support for customer managed key encryption for configuration data. For configuration versions saved to the AWS AppConfig hosted data store, customers can set a KmsKeyIdentifier on the corresponding configuration profile. Each time a new version Data encryption at rest for AWS AppConfig 311 AWS AppConfig User Guide of configuration data is created using the CreateHostedConfigurationVersion API operation, AWS AppConfig generates an AWS KMS data key from the KmsKeyIdentifier to encrypt the data before storing it. When the data is later accessed, either during the GetHostedConfigurationVersion or StartDeployment API operations, AWS AppConfig decrypts the configuration data using information about the generated data key. AWS AppConfig also offers support for customer managed key encryption for deployed configuration data. To encrypt configuration data, customers can provide a KmsKeyIdentifier to their deployment. AWS AppConfig generates the AWS KMS data key with this KmsKeyIdentifier to encrypt data on the StartDeployment API operation. AWS AppConfig encryption access When creating a customer managed key, use the following key policy to ensure that the key can be used. { "Version": "2012-10-17", "Statement": [ { "Sid": "Allow use of the key", "Effect": "Allow", "Principal": { "AWS": "arn:aws:iam::account_ID:role/role_name" }, "Action": [ "kms:Decrypt", "kms:GenerateDataKey" ], "Resource": "*" } ] To encrypt hosted configuration data with a customer managed key, the identity calling CreateHostedConfigurationVersion needs the following policy statement which can be assigned to a user, group, or role: { "Version": "2012-10-17", "Statement": [ { Data encryption at rest for AWS AppConfig 312 AWS AppConfig User Guide "Effect": "Allow", "Action": "kms:GenerateDataKey, "Resource": "arn:aws:kms:Region:account_ID:key_ID" } ] } If you are using a Secrets Manager secret or any other configuration data encrypted with a customer managed key, your retrievalRoleArn will need kms:Decrypt to decrypt and retrieve the data. { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": "kms:Decrypt",
appconfig-ug-077
appconfig-ug.pdf
77
"Resource": "*" } ] To encrypt hosted configuration data with a customer managed key, the identity calling CreateHostedConfigurationVersion needs the following policy statement which can be assigned to a user, group, or role: { "Version": "2012-10-17", "Statement": [ { Data encryption at rest for AWS AppConfig 312 AWS AppConfig User Guide "Effect": "Allow", "Action": "kms:GenerateDataKey, "Resource": "arn:aws:kms:Region:account_ID:key_ID" } ] } If you are using a Secrets Manager secret or any other configuration data encrypted with a customer managed key, your retrievalRoleArn will need kms:Decrypt to decrypt and retrieve the data. { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": "kms:Decrypt", "Resource": "arn:aws:kms:Region:account_ID:configuration source/object" } ] } When calling the AWS AppConfig StartDeployment API operation, the identity calling StartDeployment needs the following IAM policy which can be assigned to a user, group, or role: { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "kms:GenerateDataKey*" ], "Resource": "arn:aws:kms:Region:account_ID:key_ID" } ] } When calling the AWS AppConfig GetLatestConfiguration API operation, the identity calling GetLatestConfiguration needs the following policy which can be assigned to a user, group, or role: Data encryption at rest for AWS AppConfig 313 AWS AppConfig User Guide { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": "kms:Decrypt, "Resource": "arn:aws:kms:Region:account_ID:key_ID" } ] } Encryption context An encryption context is an optional set of key-value pairs that contain additional contextual information about the data. AWS KMS uses the encryption context as additional authenticated data to support authenticated encryption. When you include an encryption context in a request to encrypt data, AWS KMS binds the encryption context to the encrypted data. To decrypt data, you include the same encryption context in the request. AWS AppConfig encryption context: AWS AppConfig uses an encryption context in all AWS KMS cryptographic operations for encrypted hosted configuration data and deployments. The context contains a key corresponding to the type of data and a value that identifies the specific data item. Monitoring your encryption keys for AWS When you use an AWS KMS customer managed keys with AWS AppConfig, you can use AWS CloudTrail or Amazon CloudWatch Logs to track requests that AWS AppConfig sends to AWS KMS. The following example is a CloudTrail event for Decrypt to monitor AWS KMS operations called by AWS AppConfig to access data encrypted by your customer managed key: { "eventVersion": "1.08", "userIdentity": { "type": "AWSService", "invokedBy": "appconfig.amazonaws.com" }, "eventTime": "2023-01-03T02:22:28z", "eventSource": "kms.amazonaws.com", Data encryption at rest for AWS AppConfig 314 AWS AppConfig User Guide "eventName": "Decrypt", "awsRegion": "Region", "sourceIPAddress": "172.12.34.56", "userAgent": "ExampleDesktop/1.0 (V1; OS)", "requestParameters": { "encryptionContext": { "aws:appconfig:deployment:arn": "arn:aws:appconfig:Region:account_ID:application/application_ID/ environment/environment_ID/deployment/deployment_ID" }, "keyId": "arn:aws:kms:Region:account_ID:key/key_ID", "encryptionAlgorithm": "SYMMETRIC_DEFAULT" }, "responseElements": null, "requestID": "ff000af-00eb-00ce-0e00-ea000fb0fba0SAMPLE", "eventID": "ff000af-00eb-00ce-0e00-ea000fb0fba0SAMPLE", "readOnly": true, "resources": [ { "accountId": "account_ID", "type": "AWS::KMS::Key", "ARN": "arn:aws:kms:Region:account_ID:key_ID" } ], "eventType": "AwsApiCall", "managementEvent": true, "eventCategory": "Management", "recipientAccountId": "account_ID", "sharedEventID": "dc129381-1d94-49bd-b522-f56a3482d088" } Access AWS AppConfig using an interface endpoint (AWS PrivateLink) You can use AWS PrivateLink to create a private connection between your VPC and AWS AppConfig. You can access AWS AppConfig as if it were in your VPC, without the use of an internet gateway, NAT device, VPN connection, or AWS Direct Connect connection. Instances in your VPC don't need public IP addresses to access AWS AppConfig. You establish this private connection by creating an interface endpoint, powered by AWS PrivateLink. We create an endpoint network interface in each subnet that you enable for the AWS PrivateLink 315 AWS AppConfig User Guide interface endpoint. These are requester-managed network interfaces that serve as the entry point for traffic destined for AWS AppConfig. For more information, see Access AWS services through AWS PrivateLink in the AWS PrivateLink Guide. Considerations for AWS AppConfig Before you set up an interface endpoint for AWS AppConfig, review Considerations in the AWS PrivateLink Guide. AWS AppConfig supports making calls to the appconfig and appconfigdata services through the interface endpoint. Create an interface endpoint for AWS AppConfig You can create an interface endpoint for AWS AppConfig using either the Amazon VPC console or the AWS Command Line Interface (AWS CLI). For more information, see Create an interface endpoint in the AWS PrivateLink Guide. Create an interface endpoint for AWS AppConfig using the following service names: com.amazonaws.region.appconfig com.amazonaws.region.appconfigdata If you enable private DNS for the interface endpoint, you can make API requests to AWS AppConfig using its default Regional DNS name. For example, appconfig.us-east-1.amazonaws.com and appconfigdata.us-east-1.amazonaws.com. Create an endpoint policy for your interface endpoint An endpoint policy is an IAM resource that you can attach to an interface endpoint. The default endpoint policy allows full access to AWS AppConfig through the interface endpoint. To control the access allowed to AWS AppConfig from your VPC, attach a custom endpoint policy to the interface endpoint. An endpoint policy specifies the following information: Considerations 316 AWS AppConfig User Guide • The principals that can perform actions (AWS accounts, IAM users, and IAM roles). • The actions
appconfig-ug-078
appconfig-ug.pdf
78
AWS AppConfig using its default Regional DNS name. For example, appconfig.us-east-1.amazonaws.com and appconfigdata.us-east-1.amazonaws.com. Create an endpoint policy for your interface endpoint An endpoint policy is an IAM resource that you can attach to an interface endpoint. The default endpoint policy allows full access to AWS AppConfig through the interface endpoint. To control the access allowed to AWS AppConfig from your VPC, attach a custom endpoint policy to the interface endpoint. An endpoint policy specifies the following information: Considerations 316 AWS AppConfig User Guide • The principals that can perform actions (AWS accounts, IAM users, and IAM roles). • The actions that can be performed. • The resources on which the actions can be performed. For more information, see Control access to services using endpoint policies in the AWS PrivateLink Guide. Example: VPC endpoint policy for AWS AppConfig actions The following is an example of a custom endpoint policy. When you attach this policy to your interface endpoint, it grants access to the listed AWS AppConfig actions for all principals on all resources. { "Statement": [ { "Principal": "*", "Effect": "Allow", "Action": [ "appconfig:CreateApplication", "appconfig:CreateEnvironment", "appconfig:CreateConfigurationProfile", "appconfig:StartDeployment", "appconfig:GetLatestConfiguration" "appconfig:StartConfigurationSession" ], "Resource":"*" } ] } Secrets Manager key rotation This section describes important security information about AWS AppConfig integration with Secrets Manager. For information about Secrets Manager, see What is AWS Secrets Manager? in the AWS Secrets Manager User Guide. Secrets Manager key rotation 317 AWS AppConfig User Guide Setting up automatic rotation of Secrets Manager secrets deployed by AWS AppConfig Rotation is the process of periodically updating a secret stored in Secrets Manager. When you rotate a secret, you update the credentials in both the secret and the database or service. You can configure automatic secrets rotation in Secrets Manager by using an AWS Lambda function to update the secret and the database. For more information, see Rotate AWS Secrets Manager secrets in the AWS Secrets Manager User Guide. To enable key rotation of Secrets Manager secrets deployed by AWS AppConfig, update your rotation Lambda function and deploy the rotated secret. Note Deploy your AWS AppConfig configuration profile after your secret has been rotated and fully updated to the new version. You can determine if the secret rotated because the status of VersionStage changes from AWSPENDING to AWSCURRENT. Secret rotation completion occurs within the Secrets Manager Rotation Templates finish_secret function. Here is an example function that starts an AWS AppConfig deployment after a secret is rotated. import time import boto3 client = boto3.client('appconfig') def finish_secret(service_client, arn, new_version): """Finish the rotation by marking the pending secret as current This method finishes the secret rotation by staging the secret staged AWSPENDING with the AWSCURRENT stage. Args: service_client (client): The secrets manager service client arn (string): The secret ARN or other identifier new_version (string): The new version to be associated with the secret """ # First describe the secret to get the current version metadata = service_client.describe_secret(SecretId=arn) current_version = None for version in metadata["VersionIdsToStages"]: Setting up automatic rotation of Secrets Manager secrets deployed by AWS AppConfig 318 AWS AppConfig User Guide if "AWSCURRENT" in metadata["VersionIdsToStages"][version]: if version == new_version: # The correct version is already marked as current, return logger.info("finishSecret: Version %s already marked as AWSCURRENT for %s" % (version, arn)) return current_version = version break # Finalize by staging the secret version current service_client.update_secret_version_stage(SecretId=arn, VersionStage="AWSCURRENT", MoveToVersionId=new_version, RemoveFromVersionId=current_version) # Deploy rotated secret response = client.start_deployment( ApplicationId='TestApp', EnvironmentId='TestEnvironment', DeploymentStrategyId='TestStrategy', ConfigurationProfileId='ConfigurationProfileId', ConfigurationVersion=new_version, KmsKeyIdentifier=key, Description='Deploy secret rotated at ' + str(time.time()) ) logger.info("finishSecret: Successfully set AWSCURRENT stage to version %s for secret %s." % (new_version, arn)) Setting up automatic rotation of Secrets Manager secrets deployed by AWS AppConfig 319 AWS AppConfig User Guide Monitoring AWS AppConfig Monitoring is an important part of maintaining the reliability, availability, and performance of AWS AppConfig and your other AWS solutions. AWS provides the following monitoring tools to watch AWS AppConfig, report when something is wrong, and take automatic actions when appropriate: • Amazon CloudWatch monitors your AWS resources and and the applications you run on AWS in real time. You can collect and track metrics, create customized dashboards, and set alarms that notify you or take actions when a specified metric reaches a threshold that you specify. For example, you can have CloudWatch track CPU usage or other metrics of your Amazon EC2 instances and automatically launch new instances when needed. For more information, see the Amazon CloudWatch User Guide. • AWS CloudTrail captures API calls and related events made by or on behalf of your AWS account and delivers the log files to an Amazon S3 bucket that you specify. You can identify which users and accounts called AWS, the source IP address from which the calls were made, and when the calls occurred. For more information, see the AWS CloudTrail User Guide. • Amazon CloudWatch Logs enables you to
appconfig-ug-079
appconfig-ug.pdf
79
have CloudWatch track CPU usage or other metrics of your Amazon EC2 instances and automatically launch new instances when needed. For more information, see the Amazon CloudWatch User Guide. • AWS CloudTrail captures API calls and related events made by or on behalf of your AWS account and delivers the log files to an Amazon S3 bucket that you specify. You can identify which users and accounts called AWS, the source IP address from which the calls were made, and when the calls occurred. For more information, see the AWS CloudTrail User Guide. • Amazon CloudWatch Logs enables you to monitor, store, and access your log files from Amazon EC2 instances, CloudTrail, and other sources. CloudWatch Logs can monitor information in the log files and notify you when certain thresholds are met. You can also archive your log data in highly durable storage. For more information, see the Amazon CloudWatch Logs User Guide. • Amazon EventBridge can be used to automate your AWS services and respond automatically to system events, such as application availability issues or resource changes. Events from AWS services are delivered to EventBridge in near real time. You can write simple rules to indicate which events are of interest to you and which automated actions to take when an event matches a rule. For more information, see Amazon EventBridge User Guide. Topics • Logging AWS AppConfig API calls using AWS CloudTrail • Logging metrics for AWS AppConfig data plane calls • Monitoring deployments for automatic rollback 320 AWS AppConfig User Guide Logging AWS AppConfig API calls using AWS CloudTrail AWS AppConfig is integrated with AWS CloudTrail, a service that provides a record of actions taken by a user, role, or an AWS service. CloudTrail captures all API calls for AWS AppConfig as events. The calls captured include calls from the AWS AppConfig console and code calls to the AWS AppConfig API operations. Using the information collected by CloudTrail, you can determine the request that was made to AWS AppConfig, the IP address from which the request was made, when it was made, and additional details. Every event or log entry contains information about who generated the request. The identity information helps you determine the following: • Whether the request was made with root user or user credentials. • Whether the request was made on behalf of an IAM Identity Center user. • Whether the request was made with temporary security credentials for a role or federated user. • Whether the request was made by another AWS service. CloudTrail is active in your AWS account when you create the account and you automatically have access to the CloudTrail Event history. The CloudTrail Event history provides a viewable, searchable, downloadable, and immutable record of the past 90 days of recorded management events in an AWS Region. For more information, see Working with CloudTrail Event history in the AWS CloudTrail User Guide. There are no CloudTrail charges for viewing the Event history. For an ongoing record of events in your AWS account past 90 days, create a trail or a CloudTrail Lake event data store. CloudTrail trails A trail enables CloudTrail to deliver log files to an Amazon S3 bucket. All trails created using the AWS Management Console are multi-Region. You can create a single-Region or a multi-Region trail by using the AWS CLI. Creating a multi-Region trail is recommended because you capture activity in all AWS Regions in your account. If you create a single-Region trail, you can view only the events logged in the trail's AWS Region. For more information about trails, see Creating a trail for your AWS account and Creating a trail for an organization in the AWS CloudTrail User Guide. You can deliver one copy of your ongoing management events to your Amazon S3 bucket at no charge from CloudTrail by creating a trail, however, there are Amazon S3 storage charges. For CloudTrail logs 321 AWS AppConfig User Guide more information about CloudTrail pricing, see AWS CloudTrail Pricing. For information about Amazon S3 pricing, see Amazon S3 Pricing. CloudTrail Lake event data stores CloudTrail Lake lets you run SQL-based queries on your events. CloudTrail Lake converts existing events in row-based JSON format to Apache ORC format. ORC is a columnar storage format that is optimized for fast retrieval of data. Events are aggregated into event data stores, which are immutable collections of events based on criteria that you select by applying advanced event selectors. The selectors that you apply to an event data store control which events persist and are available for you to query. For more information about CloudTrail Lake, see Working with AWS CloudTrail Lake in the AWS CloudTrail User Guide. CloudTrail Lake event data stores and queries incur costs. When you create an event data store, you choose the pricing option you
appconfig-ug-080
appconfig-ug.pdf
80
format. ORC is a columnar storage format that is optimized for fast retrieval of data. Events are aggregated into event data stores, which are immutable collections of events based on criteria that you select by applying advanced event selectors. The selectors that you apply to an event data store control which events persist and are available for you to query. For more information about CloudTrail Lake, see Working with AWS CloudTrail Lake in the AWS CloudTrail User Guide. CloudTrail Lake event data stores and queries incur costs. When you create an event data store, you choose the pricing option you want to use for the event data store. The pricing option determines the cost for ingesting and storing events, and the default and maximum retention period for the event data store. For more information about CloudTrail pricing, see AWS CloudTrail Pricing. AWS AppConfig data events in CloudTrail Data events provide information about the resource operations performed on or in a resource (for example, retrieving the latest deployed configuration by calling GetLatestConfiguration). These are also known as data plane operations. Data events are often high-volume activities. By default, CloudTrail doesn’t log data events. The CloudTrail Event history doesn't record data events. Additional charges apply for data events. For more information about CloudTrail pricing, see AWS CloudTrail Pricing. You can log data events for the AWS AppConfig resource types by using the CloudTrail console, AWS CLI, or CloudTrail API operations. The table in this section shows the resource types available for AWS AppConfig. • To log data events using the CloudTrail console, create a trail or event data store to log data events, or update an existing trail or event data store to log data events. 1. Choose Data events to log data events. 2. From the Data event type list, choose AWS AppConfig. AWS AppConfig data events in CloudTrail 322 AWS AppConfig User Guide 3. Choose the log selector template you want to use. You can log all data events for the resource type, log all readOnly events, log all writeOnly events, or create a custom log selector template to filter on the readOnly, eventName, and resources.ARN fields. 4. For Selector name, enter AppConfigDataEvents. For information about enabling Amazon CloudWatch Logs for your data event trail, see Logging metrics for AWS AppConfig data plane calls. • To log data events using the AWS CLI, configure the --advanced-event-selectors parameter to set the eventCategory field equal to Data and the resources.type field equal to the resource type value (see table). You can add conditions to filter on the values of the readOnly, eventName, and resources.ARN fields. • To configure a trail to log data events, run the put-event-selectors command. For more information, see Logging data events for trails with the AWS CLI. • To configure an event data store to log data events, run the create-event-data-store command to create a new event data store to log data events, or run the update-event-data-store command to update an existing event data store. For more information, see Logging data events for event data stores with the AWS CLI. The following table lists the AWS AppConfig resource types. The Data event type (console) column shows the value to choose from the Data event type list on the CloudTrail console. The resources.type value column shows the resources.type value, which you would specify when configuring advanced event selectors using the AWS CLI or CloudTrail APIs. The Data APIs logged to CloudTrail column shows the API calls logged to CloudTrail for the resource type. Data event type (console) resources.type value Data APIs logged to CloudTrail* AWS AppConfig AWS::AppConfig::Co • GetLatestConfiguration nfiguration • StartConfigurationSession *You can configure advanced event selectors to filter on the eventName, readOnly, and resources.ARN fields to log only those events that are important to you. For more information about these fields, see AdvancedFieldSelector. AWS AppConfig data events in CloudTrail 323 AWS AppConfig User Guide AWS AppConfig management events in CloudTrail AWS AppConfig logs all AWS AppConfig control plane operations as management events. For a list of the AWS AppConfig control plane operations that AWS AppConfig logs to CloudTrail, see the AWS AppConfig API Reference. AWS AppConfig event examples An event represents a single request from any source and includes information about the requested API operation, the date and time of the operation, request parameters, and so on. CloudTrail log files aren't an ordered stack trace of the public API calls, so events don't appear in any specific order. The following example shows a CloudTrail event that demonstrates the StartConfigurationSession operation. { "eventVersion": "1.09", "userIdentity": { "type": "IAMUser", "principalId": "AIDACKCEVSQ6C2EXAMPLE", "arn": "arn:aws:iam::123456789012:user/Administrator", "accountId": "123456789012", "accessKeyId": "AKIAIOSFODNN7EXAMPLE", "sessionContext": { "sessionIssuer": {}, "attributes": { "creationDate": "2024-01-11T14:37:02Z", "mfaAuthenticated": "false" } } }, "eventTime": "2024-01-11T14:45:15Z", "eventSource": "appconfig.amazonaws.com", "eventName": "StartConfigurationSession", "awsRegion": "us-east-1", "sourceIPAddress": "203.0.113.0", "userAgent": "Boto3/1.34.11 md/Botocore#1.34.11 ua/2.0 os/macos#22.6.0 md/arch#x86_64 lang/python#3.11.4 md/pyimpl#CPython cfg/retry-mode#legacy
appconfig-ug-081
appconfig-ug.pdf
81
and includes information about the requested API operation, the date and time of the operation, request parameters, and so on. CloudTrail log files aren't an ordered stack trace of the public API calls, so events don't appear in any specific order. The following example shows a CloudTrail event that demonstrates the StartConfigurationSession operation. { "eventVersion": "1.09", "userIdentity": { "type": "IAMUser", "principalId": "AIDACKCEVSQ6C2EXAMPLE", "arn": "arn:aws:iam::123456789012:user/Administrator", "accountId": "123456789012", "accessKeyId": "AKIAIOSFODNN7EXAMPLE", "sessionContext": { "sessionIssuer": {}, "attributes": { "creationDate": "2024-01-11T14:37:02Z", "mfaAuthenticated": "false" } } }, "eventTime": "2024-01-11T14:45:15Z", "eventSource": "appconfig.amazonaws.com", "eventName": "StartConfigurationSession", "awsRegion": "us-east-1", "sourceIPAddress": "203.0.113.0", "userAgent": "Boto3/1.34.11 md/Botocore#1.34.11 ua/2.0 os/macos#22.6.0 md/arch#x86_64 lang/python#3.11.4 md/pyimpl#CPython cfg/retry-mode#legacy Botocore/1.34.11", "requestParameters": { "applicationIdentifier": "rrfexample", AWS AppConfig management events in CloudTrail 324 AWS AppConfig User Guide "environmentIdentifier": "mexampleqe0", "configurationProfileIdentifier": "3eexampleu1" }, "responseElements": null, "requestID": "a1b2c3d4-5678-90ab-cdef-aaaaaEXAMPLE", "eventID": "a1b2c3d4-5678-90ab-cdef-bbbbbEXAMPLE", "readOnly": false, "resources": [ { "accountId": "123456789012", "type": "AWS::AppConfig::Configuration", "ARN": "arn:aws:appconfig:us-east-1:123456789012:application/rrfexample/ environment/mexampleqe0/configuration/3eexampleu1" } ], "eventType": "AwsApiCall", "managementEvent": false, "recipientAccountId": "123456789012", "eventCategory": "Data", "tlsDetails": { "tlsVersion": "TLSv1.3", "cipherSuite": "TLS_AES_128_GCM_SHA256", "clientProvidedHostHeader": "appconfigdata.us-east-1.amazonaws.com" } } For information about CloudTrail record contents, see CloudTrail record contents in the AWS CloudTrail User Guide. Logging metrics for AWS AppConfig data plane calls If you configured AWS CloudTrail to log AWS AppConfig data events, you can enable Amazon CloudWatch Logs to log metrics for calls to the AWS AppConfig data plane. You can then search and filter log data in CloudWatch Logs by creating one or more metric filters. Metric filters define the terms and patterns to look for in log data as it is sent to CloudWatch Logs. CloudWatch Logs uses metric filters to turn log data into numerical CloudWatch metrics. You can graph metrics or configure them with an alarm. Before you begin Enable logging of AWS AppConfig data events in AWS CloudTrail. The following procedure describes how to enable metric logging for an existing AWS AppConfig trail in CloudTrail. For Logging metrics for AWS AppConfig data plane calls 325 AWS AppConfig User Guide information about how to enable CloudTrail logging for AWS AppConfig data plan calls, see AWS AppConfig data events in CloudTrail. Use the following procedure to enable CloudWatch Logs to log metrics for calls to the AWS AppConfig data plane. To enable CloudWatch Logs to log metrics for calls to the AWS AppConfig data plane 1. Open the CloudTrail console at https://console.aws.amazon.com/cloudtrail/. 2. On the dashboard, choose your AWS AppConfig trail. 3. In the CloudWatch Logs section, choose Edit. 4. Choose Enabled. 5. For Log group name, either leave the default name or enter a name. Make a note of the name. You will choose the log group in the CloudWatch Logs console later. 6. For Role name, enter a name. 7. Choose Save changes. Use the following procedure to create a metric and a metric filter for AWS AppConfig in CloudWatch Logs. The procedure describes how to create a metric filter for calls by operation and (optionally) calls by operation and Amazon Resource Name (ARN). To create a metric and a metric filter for AWS AppConfig in CloudWatch Logs 1. Open the CloudWatch console at https://console.aws.amazon.com/cloudwatch/. 2. In the navigation pane, choose Logs, and then choose Log groups. 3. Choose the checkbox beside the AWS AppConfig log group. 4. Choose Actions, and then choose Create metric filter. 5. 6. 7. For Filter name, enter a name. For Filter pattern, enter the following: { $.eventSource = "appconfig.amazonaws.com" } (Optional) In the Test pattern section, choose your log group from the Select log data to test list. If CloudTrail hasn't logged any calls, you can skip this step. 8. Choose Next. Logging metrics for AWS AppConfig data plane calls 326 AWS AppConfig User Guide 9. For Metric namespace, enter AWS AppConfig. 10. For Metric name, enter Calls. 11. For Metric value, enter 1. 12. Skip Default value and Unit. 13. For Dimension name, enter operation. 14. For Dimension value, enter $.eventName. (Optional) You can enter a second dimension that includes the Amazon Resource Name (ARN) making the call. To add a second dimension, for Dimension name, enter resource. For Dimension value, enter $.resources[0].ARN. Choose Next. 15. Review the details of the filter and Create metric filter. (Optional) You can repeat this procedure to create a new metric filter for a specific error code like AccessDenied. If you do, enter the following details: 1. 2. 3. 4. 5. 6. 7. For Filter name, enter a name. For Filter pattern, enter the following: { $.errorCode = "codename" } For example { $.errorCode = "AccessDenied" } For Metric namespace, enter AWS AppConfig. For Metric name, enter Errors. For Metric value, enter 1. For Default value, enter a zero (0). Skip Unit, Dimensions, and Alarms. After CloudTrail logs API calls, you can view metrics in CloudWatch. For more information, see Viewing your metrics and logs in the console in the Amazon CloudWatch User Guide. For information about how to locate
appconfig-ug-082
appconfig-ug.pdf
82
you do, enter the following details: 1. 2. 3. 4. 5. 6. 7. For Filter name, enter a name. For Filter pattern, enter the following: { $.errorCode = "codename" } For example { $.errorCode = "AccessDenied" } For Metric namespace, enter AWS AppConfig. For Metric name, enter Errors. For Metric value, enter 1. For Default value, enter a zero (0). Skip Unit, Dimensions, and Alarms. After CloudTrail logs API calls, you can view metrics in CloudWatch. For more information, see Viewing your metrics and logs in the console in the Amazon CloudWatch User Guide. For information about how to locate a metric you created, see Search for available metrics. Logging metrics for AWS AppConfig data plane calls 327 AWS AppConfig Note User Guide If you set up the error metric with no dimension, as described here, you can view those metrics on the Metrics with no dimension page. Creating an alarm for a CloudWatch metric After you create metrics, you can create metric alarms in CloudWatch. For example, you can create an alarm for the AWS AppConfig calls metric you created in the previous procedure. Specifically, you can create an alarm for calls to the AWS AppConfig StartConfigurationSession API action that surpass a threshold. For information about how to create an alarm for a metric, see Create a CloudWatch alarm based on a static threshold in the Amazon CloudWatch User Guide. For information about default limits for calls to the AWS AppConfig data plane, see Data plane default limits in the Amazon Web Services General Reference. Monitoring deployments for automatic rollback During a deployment, you can mitigate situations where malformed or incorrect configuration data causes errors in your application by using a combination of AWS AppConfig deployment strategies and automatic rollbacks based on Amazon CloudWatch alarms. Once configured, if one or more CloudWatch alarms go into the ALARM or INSUFFICIENT_DATAstate during a deployment, AWS AppConfig automatically rolls back your configuration data to the previous version, thereby preventing application outages or errors. You can also roll back a configuration by calling the StopDeployment API operation while a deployment is still in progress. Important For deployments that successfully complete, AWS AppConfig also supports reverting configuration data to a previous version by using the AllowRevert parameter with the StopDeployment API operation. For some customers, reverting to a previous configuration after a successful deployment guarantees the data will be the same as it was before the deployment. Reverting also ignores alarm monitors, which may prevent a roll forward from progressing during an application emergency. For more information, see Reverting a configuration. Creating an alarm for a CloudWatch metric 328 AWS AppConfig User Guide To configure automatic rollbacks, you specify the Amazon Resource Name (ARN) of one or more CloudWatch metrics in the CloudWatch alarms field when you create (or edit) an AWS AppConfig environment. For more information, see Creating environments for your application in AWS AppConfig. Note If you use a third-party monitoring solution (for example, Datadog), you can create an AWS AppConfig extension that checks for alarms at the AT_DEPLOYMENT_TICK action point and, as a safety guardrail, rolls back the deployment if it triggered an alarm. For more information about AWS AppConfig extensions, see Extending AWS AppConfig workflows using extensions. For more information about custom extensions, see Walkthrough: Creating custom AWS AppConfig extensions. To view a code sample of an AWS AppConfig extension that uses the AT_DEPLOYMENT_TICK action point to integrate with Datadog, see aws-samples / aws-appconfig-tick-extn-for-datadog on GitHub. Recommended metrics to monitor for automatic rollback The metrics you choose to monitor will depend on the hardware and software used by your applications. AWS AppConfig customers often monitor the following metrics. For a complete list of recommended metrics grouped by AWS service, see Recommended alarms in the Amazon CloudWatch User Guide. After you determine the metrics you want to monitor, use CloudWatch to configure alarms. For more information, see Using Amazon CloudWatch alarms. Service Metric Details Amazon API Gateway 4XXError This alarm detects a high rate of client-side errors. This can indicate an issue in the authorization or client request parameters. It could also mean that a resource was removed or a client is requesting one that doesn't exist. Consider enabling Recommended metrics to monitor for automatic rollback 329 AWS AppConfig Service Metric Details User Guide Amazon API Gateway 5XXError Amazon API Gateway Latency Amazon CloudWatch Logs and checking for any errors that may be causing the 4XX errors. Moreover, consider enabling detailed CloudWatc h metrics to view this metric per resource and method and narrow down the source of the errors. Errors could also be caused by exceeding the configured throttling limit. This alarm helps to detect a high rate of server-side errors. This can indicate that there is something wrong on the API backend, the network, or the integration between the
appconfig-ug-083
appconfig-ug.pdf
83
to monitor for automatic rollback 329 AWS AppConfig Service Metric Details User Guide Amazon API Gateway 5XXError Amazon API Gateway Latency Amazon CloudWatch Logs and checking for any errors that may be causing the 4XX errors. Moreover, consider enabling detailed CloudWatc h metrics to view this metric per resource and method and narrow down the source of the errors. Errors could also be caused by exceeding the configured throttling limit. This alarm helps to detect a high rate of server-side errors. This can indicate that there is something wrong on the API backend, the network, or the integration between the API gateway and the backend API. This alarm detects high latency in a stage. Find the IntegrationLatency metric value to check the API backend latency. If the two metrics are mostly aligned, the API backend is the source of higher latency and you should investigate there for issues. Consider also enabling CloudWatch Logs and checking for errors that might be causing the high latency. Recommended metrics to monitor for automatic rollback 330 AWS AppConfig Service Metric Details User Guide Amazon EC2 Auto Scaling GroupInServiceCapacity Amazon EC2 CPUUtilization Amazon ECS CPUReservation This alarm helps to detect when the capacity in the group is below the desired capacity required for your workload. To troubleshoot, check your scaling activitie s for launch failures and confirm that your desired capacity configuration is correct. This alarm helps to monitor the CPU utilization of an EC2 instance. Depending on the application, consistently high utilization levels might be normal. But if performance is degraded, and the applicati on is not constrained by disk I/O, memory, or network resources, then a maxed-out CPU might indicate a resource bottleneck or application performance problems. This alarm helps you detect a high CPU reservation of the ECS cluster. High CPU reservation might indicate that the cluster is running out of registered CPUs for the task. Recommended metrics to monitor for automatic rollback 331 AWS AppConfig Service Amazon ECS Metric Details User Guide HTTPCode_Target_5X X_Count Amazon EKS with Container insights node_cpu_utilization Amazon EKS with Container insights node_memory_utilization Amazon EKS with Container insights pod_cpu_utilization_over_po d_limit This alarm helps you detect a high server-side error count for the ECS service. This can indicate that there are errors that cause the server to be unable to serve requests. This alarm helps to detect high CPU utilization in worker nodes of the Amazon EKS cluster. If the utilization is consistently high, it might indicate a need for replacing your worker nodes with instances that have greater CPU or a need to scale the system horizontally. This alarm helps in detecting high memory utilization in worker nodes of the Amazon EKS cluster. If the utilization is consistently high, it might indicate a need to scale the number of pod replicas, or optimize your application. This alarm helps in detecting high CPU utilization in pods of the Amazon EKS cluster. If the utilization is consistently high, it might indicate a need to increase the CPU limit for the affected pod. Recommended metrics to monitor for automatic rollback 332 AWS AppConfig Service Metric Details User Guide Amazon EKS with Container insights pod_memory_utilization_over _pod_limit This alarm helps in detecting high CPU utilization in pods AWS Lambda Errors AWS Lambda Throttles Lambda Insights memory_utilization of the Amazon EKS cluster. If the utilization is consistently high, it might indicate a need to increase the CPU limit for the affected pod. This alarm detects high error counts. Errors includes the exceptions thrown by the code as well as exception s thrown by the Lambda runtime. This alarm detects a high number of throttled invocatio n requests. Throttling occurs when there is no concurrency is available for scale up. This alarm is used to detect if the memory utilization of a lambda function is approachi ng the configured limit. Recommended metrics to monitor for automatic rollback 333 AWS AppConfig Service Amazon S3 Metric 4xxErrors Amazon S3 5xxErrors User Guide Details This alarm helps us report the total number of 4xx error status codes that are made in response to client requests. 403 error codes might indicate an incorrect IAM policy, and 404 error codes might indicate mis- behaving client application, for example. This alarm helps you detect a high number of server- side errors. These errors indicate that a client made a request that the server couldn’t complete. This can help you correlate the issue your application is facing because of S3. Recommended metrics to monitor for automatic rollback 334 AWS AppConfig User Guide AWS AppConfig User Guide document history The following table describes the important changes to the documentation since the last release of AWS AppConfig. Current API version: 2019-10-09 Change IPv6 support Description Date April 23, 2025 All AWS AppConfig APIs now fully support IPv4 and IPv6 calls. For more informati on,
appconfig-ug-084
appconfig-ug.pdf
84
helps you detect a high number of server- side errors. These errors indicate that a client made a request that the server couldn’t complete. This can help you correlate the issue your application is facing because of S3. Recommended metrics to monitor for automatic rollback 334 AWS AppConfig User Guide AWS AppConfig User Guide document history The following table describes the important changes to the documentation since the last release of AWS AppConfig. Current API version: 2019-10-09 Change IPv6 support Description Date April 23, 2025 All AWS AppConfig APIs now fully support IPv4 and IPv6 calls. For more informati on, see Understanding IPv6 support. New topic: Saving a previous feature flag version to a new When you update a feature flag, AWS AppConfig April 15, 2025 version New topic: Feature flag samples for AWS AppConfig Agent local development mode automatically saves your changes to a new version. If you want to use a previous feature flag version, you must copy it to a draft version and then save it. You can't edit and save changes to a previous flag version without saving it to a new version. For more information, see Saving a previous feature flag version to a new version. AWS AppConfig Agent supports a local developme nt mode. If you enable local development mode, the agent reads configuration data from a specified directory on disk. It doesn't retrieve February 18, 2025 335 AWS AppConfig User Guide configuration data from AWS AppConfig. To help you better understand how to use local development mode, this guide now contains a topic with feature flag samples. For more information, see Feature flag samples for AWS AppConfig Agent local development mode. New topic: Creating a configuration profile for non- The topic describes the high level process for using an December 19, 2024 native data sources AWS AppConfig extension to retrieve configuration data from sources that are not natively supported, including other AWS services like Amazon RDS and Amazon DynamoDB, as well as 3rd- party sources like GitHub, GitLab, or a local repo. For more information, see Creating a configuration profile for non-native data sources 336 AWS AppConfig User Guide Updated topic: Fixed regex in feature flags type reference The json schema in the feature flag type reference December 18, 2024 previously showed the following regex pattern in various places: "^[a-z][a -zA-Z\\d-_]{0,63}$ " . The correct regex pattern is "^[a-z][a-zA-Z\\d_ -]{0,63}$" is listed after the underscor . The hyphen e. For more information, see Understanding the type reference for AWS.AppCo nfig.FeatureFlags Updated topics: Environment variable samples added The tables describing environment variable in the December 12, 2024 following topics were updated to include samples: • (Optional) Using environme nt variables to configure AWS AppConfig Agent for Amazon ECS and Amazon EKS • (Optional) Using environme nt variables to configure AWS AppConfig Agent for Amazon EC2 • Configuring the AWS AppConfig Agent Lambda extension 337 AWS AppConfig User Guide New section: Understanding the split operator A new section uses examples November 22, 2024 to explain how the split operator works for a multi- variant feature flag rule. For more information, see Understanding multi-variant feature flag rules. 338 AWS AppConfig User Guide New extension action point: AT_DEPLOYMENT_TICK AWS AppConfig launched a new action point for November 22, 2024 users who create custom extensions. The AT_DEPLOY MENT_TICK action point supports third-par ty monitoring integration. AT_DEPLOYMENT_TICK is invoked during configura tion deployment processin g orchestration. If you use a third-party monitorin g solution (for example, Datadog), you can create an AWS AppConfig extension that checks for alarms at the AT_DEPLOYMENT_TICK action point and, as a safety guardrail, rolls back the deployment if it triggered an alarm. For more informati on about AWS AppConfig extensions, see Extending AWS AppConfig workflows using extensions. For more information about custom extensions, see Walkthrou gh: Creating custom AWS AppConfig extensions. To view a code sample of an AWS AppConfig extension that uses the AT_DEPLOY MENT_TICK action point to integrate with Datadog, see aws-samples / aws-appco 339 AWS AppConfig User Guide nfig-tick-extn-for-datadog on GitHub. New topic: AWS AppConfig mobile use considerations A new topic in this guide describes important November 21, 2024 New feature: AWS AppConfig Deletion Protection considerations for using AWS AppConfig feature flags with mobiles devices. For more information, see AWS AppConfig mobile use considerations. AWS AppConfig now provides an account setting to help prevent users from unintenti onally deleting actively-used environments and configura tion profiles. For more information, see Configuri ng AWS AppConfig deletion protection. August 28, 2024 New version of AWS AppConfig Agent Lambda The agent has been updated with minor enhancements August 9, 2024 extension New code samples for retrieving flag variants and bug fixes. To view the new Amazon Resource Names (ARNs) for the extension, see Available versions of the AWS AppConfig Agent Lambda extension. For more information,
appconfig-ug-085
appconfig-ug.pdf
85
flags with mobiles devices. For more information, see AWS AppConfig mobile use considerations. AWS AppConfig now provides an account setting to help prevent users from unintenti onally deleting actively-used environments and configura tion profiles. For more information, see Configuri ng AWS AppConfig deletion protection. August 28, 2024 New version of AWS AppConfig Agent Lambda The agent has been updated with minor enhancements August 9, 2024 extension New code samples for retrieving flag variants and bug fixes. To view the new Amazon Resource Names (ARNs) for the extension, see Available versions of the AWS AppConfig Agent Lambda extension. For more information, see Using AWS AppConfig Agent to retrieve a feature flag with variants. August 9, 2024 340 AWS AppConfig User Guide New version of AWS AppConfig Agent Lambda extension July 23, 2024 The agent has been updated to support feature flag targets, variants, and splits. To view the new Amazon Resource Names (ARNs) for the extension, see Available versions of the AWS AppConfig Agent Lambda extension. New feature: Multi-variant feature flags Multi-variant feature flags enable you to define a set of July 23, 2024 possible flag values to return for a request. You can also configure different statuses (enabled or disabled) for multi-variant flags. When requesting a flag configured with variants, your applicati on provides context that AWS AppConfig evaluates against a set of user-defined rules. Depending on the context specified in the request and the rules defined for the variant, AWS AppConfig returns different flag values to the application. For more information, see Creating multi-variant feature flags. 341 AWS AppConfig User Guide New version of AWS AppConfig Agent Lambda The agent has been updated with minor enhancements February 28, 2024 extension and bug fixes. To view the new Amazon Resource Names (ARNs) for the extension, see Available versions of the AWS AppConfig Agent Lambda extension. AWS AppConfig custom extension samples The Walkthrough: Creating custom AWS AppConfig February 28, 2024 extensions topic now includes links to the following sample extensions on GitHub: • Sample extension that prevents deployments with a blocked day moratoriu m calendar using Systems Manager Change Calendar • Sample extension that prevents secrets from leaking into configuration data using git-secrets • Sample extension that prevents personally identifiable information (PII) from leaking into configuration data using Amazon Comprehend 342 AWS AppConfig User Guide New topic: Logging AWS AppConfig API calls using AWS AppConfig is integrate d with AWS CloudTrail, a AWS CloudTrail service that provides a record January 18, 2024 of actions taken by a user, role, or an AWS service in AWS AppConfig. CloudTrai l captures all API calls for AWS AppConfig as events. This new topic provides AWS AppConfig-specific content rather than linking to the corresponding content in the AWS Systems Manager User Guide. For more information, see Logging AWS AppConfig API calls using AWS CloudTrai l. AWS AppConfig now supports AWS PrivateLink You can use AWS PrivateLink to create a private connectio December 6, 2023 n between your VPC and AWS AppConfig. You can access AWS AppConfig as if it were in your VPC, without the use of an internet gateway, NAT device, VPN connection, or AWS Direct Connect connectio n. Instances in your VPC don't need public IP addresses to access AWS AppConfig. For more information, see Access AWS AppConfig using an interface endpoint (AWS PrivateLink). 343 AWS AppConfig User Guide Additional AWS AppConfig Agent retrieval features and a AWS AppConfig Agent offers the following additional new local development mode features to help you retrieve December 1, 2023 configurations for your applications. Additional retrieval features • Multi-account retrieval: Use AWS AppConfig Agent from a primary or retrieval AWS account to retrieve configuration data from multiple vendor accounts. • Write configuration copy to disk: Use AWS AppConfig Agent to write configura tion data to disk. This feature enables customers with applications that read configuration data from disk to integrate with AWS AppConfig. Note Write configuration to disk is not designed as a configuration backup feature. AWS AppConfig Agent doesn't read from the configura tion files copied to disk. If you want to back up configura 344 AWS AppConfig User Guide tions to disk, see the BACKUP_DIRECTORY and PRELOAD_B ACKUP environme nt variables for Using AWS AppConfig Agent with Amazon EC2 or Using AWS AppConfig Agent with Amazon ECS and Amazon EKS. Local development mode AWS AppConfig Agent supports a local developme nt mode. If you enable local development mode, the agent reads configuration data from a specified directory on disk. It doesn't retrieve configuration data from AWS AppConfig. You can simulate configuration deployments by updating files in the specified directory. We recommend local development mode for the following use cases: • Test different configuration versions before deploying them using AWS AppConfig . • Test different configuration options for a new feature before commiting changes to your
appconfig-ug-086
appconfig-ug.pdf
86
Agent with Amazon EC2 or Using AWS AppConfig Agent with Amazon ECS and Amazon EKS. Local development mode AWS AppConfig Agent supports a local developme nt mode. If you enable local development mode, the agent reads configuration data from a specified directory on disk. It doesn't retrieve configuration data from AWS AppConfig. You can simulate configuration deployments by updating files in the specified directory. We recommend local development mode for the following use cases: • Test different configuration versions before deploying them using AWS AppConfig . • Test different configuration options for a new feature before commiting changes to your code repository. 345 AWS AppConfig User Guide New code samples topic • Test different configura tion scenarios to verify they work as expected. Added a new code samples topic to this guide. The topic includes examples in Java, Python, and JavaScript for programmatically performin g six common AWS AppConfig actions. November 17, 2023 Revised table of contents to better reflect AWS AppConfig workflow Content in this user guide is now grouped under the headings Creating, Deploying November 7, 2023 Payload reference added New AWS predefined deployment strategy , Retrieving, and Extending workflows. This organization better reflects the workflow for using AWS AppConfig and aims to help make content more discoverable. The Creating a Lambda function for a custom AWS AppConfig extension topic now includes a request and response payload reference. AWS AppConfig now offers and recommends the AppConfig.Linear20 PercentEvery6Minut es predefined deployment strategy. For more informati on, see Predefined deploymen t strategies. November 7, 2023 August 11, 2023 346 AWS AppConfig User Guide AWS AppConfig integration with Amazon EC2 You can integrate AWS AppConfig with applications July 20, 2023 running on your Amazon Elastic Compute Cloud (Amazon EC2) Linux instances by using AWS AppConfig Agent. The agent supports x86_64 and ARM64 architect ures for Amazon EC2. For more information, see AWS AppConfig integration with Amazon EC2. AWS CloudFormation support for new AWS AppConfig AWS CloudFormation now supports the AWS::AppC resources and a feature flag onfig::Extension and example AWS::AppConfig::ExtensionAs April 12, 2023 sociation resources to help you get started with AWS AppConfig extensions. The AWS::AppConfig::Co nfigurationProfile and AWS::AppConfig::HostedConfi gurationVersion resources now include an example for creating a feature flag configuration profile in the AWS AppConfig hosted configuration store. 347 AWS AppConfig User Guide AWS AppConfig integration with AWS Secrets Manager AWS AppConfig integrates with AWS Secrets Manager. February 2, 2023 Secrets Manager helps you to securely encrypt, store, and retrieve credentials for your databases and other services. Instead of hardcoding credentials in your apps, you can make calls to Secrets Manager to retrieve your credentials whenever needed. Secrets Manager helps you protect access to your IT resources and data by enabling you to rotate and manage access to your secrets. When you create a freeform configuration profile, you can choose Secrets Manager as the source of your configura tion data. You must onboard with Secrets Manager and create a secret before you create the configuration profile. For more informati on about Secrets Manager, see What is AWS Secrets Manager? in the AWS Secrets Manager User Guide. For information about creating a configuration profile, see Creating a freeform configura tion profile. 348 AWS AppConfig User Guide AWS AppConfig integrati on with Amazon ECS and Amazon EKS December 2, 2022 You can integrate AWS AppConfig with Amazon Elastic Container Service (Amazon ECS) and Amazon Elastic Kubernetes Service (Amazon EKS) by using the AWS AppConfig agent. The agent functions as a sidecar container running alongside your Amazon ECS and Amazon EKS container applications. The agent enhances containerized application processing and management in the following ways: • The agent calls AWS AppConfig on your behalf by using an AWS Identity and Access Management (IAM) role and managing a local cache of configura tion data. By pulling configuration data from the local cache, your application requires fewer code updates to manage configuration data, retrieves configuration data in milliseconds, and isn't affected by network issues that can disrupt calls for such data. • The agent offers a native experience for retrievin 349 AWS AppConfig User Guide g and resolving AWS AppConfig feature flags. • Out of the box, the agent provides best practices for caching strategies, polling intervals, and local configuration data availability while tracking the configuration tokens needed for subsequent service calls. • While running in the background, the agent periodically polls the AWS AppConfig data plane for configuration data updates. Your containerized applicati on can retrieve the data by connecting to localhost on port 2772 (a customiza ble default port value) and calling HTTP GET to retrieve the data. • The AWS AppConfig agent updates configuration data in your containers without having to restart or recycle those containers. For more information, see AWS AppConfig integrati on with Amazon ECS and Amazon EKS. 350 AWS AppConfig
appconfig-ug-087
appconfig-ug.pdf
87
intervals, and local configuration data availability while tracking the configuration tokens needed for subsequent service calls. • While running in the background, the agent periodically polls the AWS AppConfig data plane for configuration data updates. Your containerized applicati on can retrieve the data by connecting to localhost on port 2772 (a customiza ble default port value) and calling HTTP GET to retrieve the data. • The AWS AppConfig agent updates configuration data in your containers without having to restart or recycle those containers. For more information, see AWS AppConfig integrati on with Amazon ECS and Amazon EKS. 350 AWS AppConfig User Guide New extension: AWS AppConfig extension for You can use Amazon CloudWatch Evidently to CloudWatch Evidently safely validate new features September 13, 2022 by serving them to a specified percentage of your users while you roll out the feature. You can monitor the performance of the new feature to help you decide when to ramp up traffic to your users. This helps you reduce risk and identify unintended consequences before you fully launch the feature. You can also conduct A/B experiments to make feature design decisions based on evidence and data. The AWS AppConfig extension for CloudWatch Evidently allows your application to assign variations to user sessions locally instead of by calling the EvaluateFeature operation. A local session mitigates the latency and availability risks that come with an API call. For informati on about how to configure and use the extension, see Perform launches and A/B experiments with CloudWatc h Evidently in the Amazon CloudWatch User Guide. 351 AWS AppConfig User Guide Deprecation of the GetConfiguration API action New version of the AWS AppConfig Agent Lambda extension September 13, 2022 August 23, 2022 On Nov 18, 2021, AWS AppConfig released a new data plane service. This service replaces the previous process of retrievin g configuration data by using the GetConfiguration API action. The data plane service uses two new API actions, StartConfigurationSession and GetLatestConfiguration. The data plane service also uses new endpoints. For more information, see About the AWS AppConfig data plane service. Version 2.0.122 of the AWS AppConfig Agent Lambda extension is now available . The new extension uses different Amazon Resource Names (ARNs). For more information, see AWS AppConfig Agent Lambda extension release notes. 352 AWS AppConfig User Guide Launch of AWS AppConfig extensions An extension augments your ability to inject logic or July 12, 2022 behavior at different points during the AWS AppConfig workflow of creating or deploying a configuration. You can use AWS-authored extensions or create your own. For more informati on, see Working with AWS AppConfig extensions. New version of the AWS AppConfig Agent Lambda Version 2.0.58 of the AWS AppConfig Agent May 3, 2022 extension Lambda extension is now available. The new extension uses different Amazon Resource Names (ARNs). For more information, see Available versions of the AWS AppConfig Lambda extension. 353 AWS AppConfig User Guide AWS AppConfig integration with Atlassian Jira Integrating with Atlassian Jira allows AWS AppConfig April 7, 2022 to create and update issues in the Atlassian console whenever you make changes to a feature flag in your AWS account for the specified AWS Region. Each Jira issue includes the flag name, application ID, configuration profile ID, and flag values. After you update, save, and deploy your flag changes, Jira updates the existing issues with the details of the change. For more informati on, see AWS AppConfig integration with Atlassian Jira. 354 AWS AppConfig User Guide General availability of feature flags and Lambda extension With AWS AppConfig feature flags, you can develop a March 15, 2022 support for ARM64 (Graviton new feature and deploy it 2) processors to production while hiding the feature from users. You start by adding the flag to AWS AppConfig as configura tion data. Once the feature is ready to be released, you can update the flag configuration data without deploying any code. This feature improves the safety of your dev-ops environment because you don't need to deploy new code to release the feature. For more information, see Creating a feature flag configuration profile. General availability of feature flags in AWS AppConfig includes the following enhancements: • The console includes an option to designate a flag as a short term flag. You can filter and sort the list of flags on short-term flags. • For customers using feature flags in AWS Lambda, the new Lambda extension allows you to call individua l feature flags by using an HTTP endpoint. For more information, see see 355 AWS AppConfig User Guide Retrieving one or more flags from a feature flag configuration. This update also provides support for AWS Lambda extensions developed for ARM64 (Graviton2) processor s. For more information, see see Available versions of the AWS AppConfig Lambda extension. The GetConfiguration API action is deprecated. Calls to receive
appconfig-ug-088
appconfig-ug.pdf
88
as a short term flag. You can filter and sort the list of flags on short-term flags. • For customers using feature flags in AWS Lambda, the new Lambda extension allows you to call individua l feature flags by using an HTTP endpoint. For more information, see see 355 AWS AppConfig User Guide Retrieving one or more flags from a feature flag configuration. This update also provides support for AWS Lambda extensions developed for ARM64 (Graviton2) processor s. For more information, see see Available versions of the AWS AppConfig Lambda extension. The GetConfiguration API action is deprecated. Calls to receive configuration data should use the StartConf and igurationSession GetLatestConfigura tion APIs instead. For more information about these APIs and how to use them, see Retrieving the configuration. January 28, 2022 The GetConfiguration API action is deprecated New region ARN for AWS AppConfig Lambda extension AWS AppConfig Lambda extension is available in the March 4, 2021 new Asia Pacific (Osaka) region. The Amazon Resource Name (ARN) is required to create a Lambda in the region. For more information about the Asia Pacific (Osaka) region ARN, see Adding the AWS AppConfig Lambda extension. 356 AWS AppConfig User Guide AWS AppConfig Lambda extension If you use AWS AppConfig to manage configurations October 8, 2020 for a Lambda function, then we recommend that you add the AWS AppConfig Lambda extension. This extension includes best practices that simplify using AWS AppConfig while reducing costs. Reduced costs result from fewer API calls to the AWS AppConfig service and, separately, reduced costs from shorter Lambda function processing times. For more information, see AWS AppConfig integrati on with Lambda extensions. Added a new section that provides instructions for setting up AWS AppConfig . For more information, see Setting up AWS AppConfig. Procedures in this user guide now include commandline steps for the AWS Command Line Interface (AWS CLI) and Tools for Windows PowerShel l. For more information, see Working with AWS AppConfig. September 30, 2020 September 30, 2020 New section Added commandline procedures 357 AWS AppConfig User Guide Launch of AWS AppConfig user guide Use AWS AppConfig, a tool in AWS Systems Manager, July 31, 2020 to create, manage, and quickly deploy applicati on configurations. AWS AppConfig supports controlle d deployments to applicati ons of any size and includes built-in validation checks and monitoring. You can use AWS AppConfig with applications hosted on EC2 instances, AWS Lambda, containers, mobile applications, or IoT devices. 358
appdiscovery-ug-001
appdiscovery-ug.pdf
1
User Guide AWS Application Discovery Service Copyright © 2025 Amazon Web Services, Inc. and/or its affiliates. All rights reserved. AWS Application Discovery Service User Guide AWS Application Discovery Service: User Guide Copyright © 2025 Amazon Web Services, Inc. and/or its affiliates. All rights reserved. Amazon's trademarks and trade dress may not be used in connection with any product or service that is not Amazon's, in any manner that is likely to cause confusion among customers, or in any manner that disparages or discredits Amazon. All other trademarks not owned by Amazon are the property of their respective owners, who may or may not be affiliated with, connected to, or sponsored by Amazon. AWS Application Discovery Service Table of Contents User Guide What is AWS Application Discovery Service? ................................................................................. 1 VMware Discovery ........................................................................................................................................ 2 Database discovery ....................................................................................................................................... 3 Compare Agentless Collector and Discovery Agent .............................................................................. 3 Assumptions ................................................................................................................................................... 6 Setting up ........................................................................................................................................ 8 Sign up for Amazon Web Services ........................................................................................................... 8 Create IAM users ........................................................................................................................................... 8 Creating an IAM Administrative User .................................................................................................. 9 Creating an IAM Non-Administrative User ......................................................................................... 9 Sign in to Migration Hub and choose a home Region ....................................................................... 10 Discovery Agent ............................................................................................................................. 11 How it works ............................................................................................................................................... 11 Data collected ............................................................................................................................................. 12 Prerequisites ................................................................................................................................................ 15 Installing Discovery Agent ........................................................................................................................ 16 Install on Linux ...................................................................................................................................... 16 Install on Microsoft Windows ............................................................................................................. 20 Managing the Discovery Agent process ................................................................................................ 24 Manage the process on Linux ............................................................................................................ 25 Manage the process on Microsoft Windows ................................................................................... 26 Uninstalling Discovery Agent ................................................................................................................... 27 Uninstall on Linux ................................................................................................................................. 27 Uninstall on Microsoft Windows ....................................................................................................... 27 Starting and stopping data collection ................................................................................................... 28 Troubleshooting Discovery Agent ........................................................................................................... 29 Troubleshooting Discovery Agent on Linux ..................................................................................... 29 Troubleshooting Discovery Agent on Microsoft Windows ............................................................ 30 Agentless Collector ........................................................................................................................ 32 Prerequisites ................................................................................................................................................ 32 Configure firewall ................................................................................................................................. 33 Deploying a collector ................................................................................................................................ 35 Create an IAM user ............................................................................................................................... 35 Download the collector ....................................................................................................................... 37 iii AWS Application Discovery Service User Guide Deploy the collector ............................................................................................................................. 38 Accessing the collector console .............................................................................................................. 40 Configuring the collector .......................................................................................................................... 40 (Optional) Configure a static IP address for the collector VM ..................................................... 42 (Optional) Reset the collector VM back to using DHCP ................................................................ 47 (Optional) Configure Kerberos ........................................................................................................... 49 Using the Network Data Collection module ......................................................................................... 50 Setting up the Network Data Collection module .......................................................................... 51 Network data collection attempts .................................................................................................... 53 Server status in the Network Data Collection module ................................................................. 53 Using the VMware data collection module .......................................................................................... 54 Setting up vCenter data collection ................................................................................................... 54 Viewing VMware data collection details .......................................................................................... 55 Controlling data collection scope ...................................................................................................... 56 Data collected by the VMware module ............................................................................................ 58 Using the database and analytics data collection module ................................................................ 62 Supported servers ................................................................................................................................. 63 Creating the AWS DMS data collector ............................................................................................. 64 Configuring data forwarding .............................................................................................................. 65 Adding your LDAP and OS servers .................................................................................................... 66 Discovering your databases ................................................................................................................ 68 Data collected by the database and analytics module ................................................................. 73 Viewing collected data .............................................................................................................................. 74 Accessing the Agentless Collector .......................................................................................................... 75 Collector dashboard ............................................................................................................................. 75 Editing collector settings .................................................................................................................... 78 Editing vCenter credentials ................................................................................................................. 78 Updating Agentless Collector .................................................................................................................. 79 Troubleshooting .......................................................................................................................................... 81 Fixing Unable to retrieve manifest or certificate file error ...................... 81 Addressing self-signed certification problems when configuring WinRM certificates ............. 81 Fixing Agentless Collector cannot reach AWS during setup ........................................................ 82 Fixing self-signed certification problems when connecting to the proxy host ......................... 84 Finding unhealthy collectors .............................................................................................................. 85 Fixing IP address issues ....................................................................................................................... 86 Fixing vCenter credentials issues ....................................................................................................... 86 iv AWS Application Discovery Service User Guide Fixing data forwarding issues ............................................................................................................ 87 Fixing connection issues ...................................................................................................................... 87 Standalone ESX host support ............................................................................................................ 89 Contacting AWS Support .................................................................................................................... 89 Importing data into Migration Hub ............................................................................................. 91 Supported import formats ....................................................................................................................... 91 RVTools ................................................................................................................................................... 92 Migration Hub import template ........................................................................................................ 92 Setting up import permissions ................................................................................................................ 97 Uploading your import file to Amazon S3 ......................................................................................... 100 Importing data ......................................................................................................................................... 102 Tracking your Migration Hub import requests .................................................................................. 104 View and explore data ................................................................................................................ 106 View collected data ................................................................................................................................. 106 Matching logic ..................................................................................................................................... 107 Exploring data in Athena ....................................................................................................................... 108 Turning on data exploration ............................................................................................................ 108 Exploring data ..................................................................................................................................... 110 Visualizing data ................................................................................................................................... 111 Using predefined queries .................................................................................................................. 112 Discovering data with the Migration Hub console .................................................................... 120 Viewing data in the dashboard ............................................................................................................ 120 Starting and stopping data collectors ................................................................................................. 121 Sorting data collectors ........................................................................................................................... 121 Viewing servers ........................................................................................................................................ 125 Sorting servers ......................................................................................................................................... 125 Tagging servers ........................................................................................................................................ 126 Exporting server data ............................................................................................................................. 127 Grouping servers ...................................................................................................................................... 129 Using the API to query discovered items ................................................................................... 131 Using the DescribeConfigurations action ................................................................................. 131 Using the ListConfigurations action .......................................................................................... 135 Eventual consistency ............................................................................................................................... 150 AWS PrivateLink .......................................................................................................................... 152 Considerations .......................................................................................................................................... 152 Create an interface endpoint ................................................................................................................ 152 v AWS Application Discovery Service User Guide Create an endpoint policy ..................................................................................................................... 153 Using the VPC endpoint for
appdiscovery-ug-002
appdiscovery-ug.pdf
2
Hub console .................................................................... 120 Viewing data in the dashboard ............................................................................................................ 120 Starting and stopping data collectors ................................................................................................. 121 Sorting data collectors ........................................................................................................................... 121 Viewing servers ........................................................................................................................................ 125 Sorting servers ......................................................................................................................................... 125 Tagging servers ........................................................................................................................................ 126 Exporting server data ............................................................................................................................. 127 Grouping servers ...................................................................................................................................... 129 Using the API to query discovered items ................................................................................... 131 Using the DescribeConfigurations action ................................................................................. 131 Using the ListConfigurations action .......................................................................................... 135 Eventual consistency ............................................................................................................................... 150 AWS PrivateLink .......................................................................................................................... 152 Considerations .......................................................................................................................................... 152 Create an interface endpoint ................................................................................................................ 152 v AWS Application Discovery Service User Guide Create an endpoint policy ..................................................................................................................... 153 Using the VPC endpoint for the Agentless Collector and AWS Application Discovery Agent ... 154 Security ........................................................................................................................................ 156 Identity and Access Management ........................................................................................................ 157 Audience ............................................................................................................................................... 157 Authenticating with identities ......................................................................................................... 158 Managing access using policies ....................................................................................................... 161 How AWS Application Discovery Service works with IAM .......................................................... 163 AWS managed policies ...................................................................................................................... 166 Identity-based policy examples ....................................................................................................... 171 Understanding and using service-linked roles ............................................................................. 178 Troubleshooting IAM .......................................................................................................................... 185 Logging API calls with CloudTrail ........................................................................................................ 186 Application Discovery Service information in CloudTrail ........................................................... 187 Understanding Application Discovery Service log file entries ................................................... 188 ARN formats ................................................................................................................................. 190 Quotas .......................................................................................................................................... 191 Troubleshooting ........................................................................................................................... 192 Stop data collection by data exploration ........................................................................................... 192 Remove the data collected by data exploration ............................................................................... 193 Fix common issues with data exploration in Amazon Athena ........................................................ 195 Data exploration in Amazon Athena fails to initiate because service-linked roles and required AWS resources can't be created ...................................................................................... 195 New Agent data doesn't show up in Amazon Athena ................................................................ 195 You have insufficient permissions to access Amazon S3, Amazon Data Firehose, or AWS Glue ....................................................................................................................................................... 197 Troubleshooting failed import records ................................................................................................ 197 Document History ........................................................................................................................ 200 AWS Glossary ............................................................................................................................... 205 Discovery Connector .................................................................................................................... 206 Collecting data with the Discovery Connector .................................................................................. 206 Collect connector data ...................................................................................................................... 210 Troubleshooting the Discovery Connector ......................................................................................... 212 Fixing Discovery Connector cannot reach AWS during setup .................................................... 212 Fixing unhealthy connectors ............................................................................................................ 213 Standalone ESX host support .......................................................................................................... 215 vi AWS Application Discovery Service User Guide Getting additional support for connector issues ......................................................................... 216 vii AWS Application Discovery Service User Guide What is AWS Application Discovery Service? AWS Application Discovery Service helps you plan your migration to the AWS cloud by collecting usage and configuration data about your on-premises servers and databases. Application Discovery Service is integrated with AWS Migration Hub and AWS Database Migration Service Fleet Advisor. Migration Hub simplifies your migration tracking as it aggregates your migration status information into a single console. You can view the discovered servers, group them into applications, and then track the migration status of each application from the Migration Hub console in your home Region. You can use DMS Fleet Advisor to assess migrations options for database workloads. All discovered data is stored in your AWS Migration Hub home Region. Therefore, you must set your home Region in the Migration Hub console or with CLI commands before performing any discovery and migration activities. Your data can be exported for analysis in Microsoft Excel or AWS analysis tools such as Amazon Athena and Amazon QuickSight. Using Application Discovery Service APIs, you can export the system performance and utilization data for your discovered servers. Input this data into your cost model to compute the cost of running those servers in AWS. Additionally, you can export data about the network connections that exist between servers. This information helps you determine the network dependencies between servers and group them into applications for migration planning. Note Your home Region must be set in AWS Migration Hub before you begin the process of discovery, because your data will be stored in your home Region. For more information about working with a home Region, see Home Region. Application Discovery Service offers three ways of performing discovery and collecting data about your on-premises servers: • Agentless discovery can be performed by deploying the Application Discovery Service Agentless Collector (Agentless Collector) (OVA file) through your VMware vCenter. After Agentless Collector is configured, it identifies virtual machines (VMs) and hosts associated with vCenter. Agentless Collector collects the following static configuration data: Server hostnames, IP addresses, MAC addresses, disk resource allocations, database engine versions, and database schemas. 1 AWS Application Discovery Service User Guide Additionally, it collects the utilization data for each VM and database providing the average and peak utilization for metrics such as CPU, RAM, and Disk I/O. • Agent-based discovery can be performed by deploying the AWS Application Discovery Agent (Discovery Agent) on each of your VMs and physical servers. The agent installer is available for Windows and Linux operating systems. It collects static configuration data, detailed time-series system-performance information, inbound and outbound network connections, and processes that are running. • File-based import allows you to import details of your on-premises environment directly into Migration Hub without using
appdiscovery-ug-003
appdiscovery-ug.pdf
3
Service User Guide Additionally, it collects the utilization data for each VM and database providing the average and peak utilization for metrics such as CPU, RAM, and Disk I/O. • Agent-based discovery can be performed by deploying the AWS Application Discovery Agent (Discovery Agent) on each of your VMs and physical servers. The agent installer is available for Windows and Linux operating systems. It collects static configuration data, detailed time-series system-performance information, inbound and outbound network connections, and processes that are running. • File-based import allows you to import details of your on-premises environment directly into Migration Hub without using the Agentless Collector or Discovery Agent, so you can perform migration assessment and planning directly from your imported data. The data ingested is dependent on the data provided. Application Discovery Service integrates with application discovery solutions from AWS Partner Network (APN) partners. These third-party solutions can help you import details about your on-premises environment directly into Migration Hub, without using any agentless collector or discovery agent. Third-party application discovery tools can query AWS Application Discovery Service, and they can write to the Application Discovery Service database using the public API. In this way, you can import data into Migration Hub and view it, so that you can associate applications with servers and track migrations. VMware Discovery If you have virtual machines (VMs) that are running in the VMware vCenter environment, you can use the Agentless Collector to collect system information without having to install an agent on each VM. Instead, you load this on-premises appliance into vCenter and allow it to discover all of its hosts and VMs. Agentless Collector captures system performance information and resource utilization for each VM running in the vCenter, regardless of what operating system is in use. However, it cannot “look inside” each of the VMs, and as such, cannot figure out what processes are running on each VM nor what network connections exist. Therefore, if you need this level of detail and want to take a closer look at some of your existing VMs in order to assist in planning your migration, you can install the Discovery Agent on an as-needed basis. Also, for VMs hosted on VMware, you can use both the Agentless Collector and Discovery Agent to perform discovery simultaneously. For details regarding the exact types of data each discovery tool will collect, see Using the VMware vCenter Agentless Collector data collection module. VMware Discovery 2 AWS Application Discovery Service Database discovery User Guide If you have database and analytics servers in your on-premises environment, then you can use the Agentless Collector to discover and inventory these servers. You can then collect performance metrics for each database server without the need to install Agentless Collector on each computer in your environment. The Agentless Collector database and analytics data collection module captures metadata and performance metrics that provide insight into your data infrastructure. The database and analytics data collection module uses LDAP in Microsoft Active Directory to gather information about the OS, database, and analytics servers in your network. Then, the data collection module periodically runs queries to collect actual utilization metrics of CPU, memory, and disk capacity for the databases and analytics servers. For details regarding the collected metrics, see Data collected by the database and analytics module. After Agentless Collector completes data collection from your environment, you can use the AWS DMS console for further analysis and for planning your migration. For example, to choose an optimal migration target in the AWS Cloud, you can generate target recommendations for your source databases. For more information, see Using the database and analytics data collection module. Compare Agentless Collector and Discovery Agent The following table provides a quick comparison of the data collection methods that Application Discovery Service supports. Agentless Collector Discovery Agent Migration Hub RVTools export template Supported server types VMware virtual machine Yes Physical server No Deployment Per server No Yes Yes Yes Yes Yes N/A Yes Yes No Database discovery 3 AWS Application Discovery Service User Guide Agentless Collector Yes No Per vCenter Per data center on the same network Collected data Server profile (static configura Yes tion) data Yes Server utilizati on metrics from Hypervisor (CPU, RAM, etc.) Server utilizati on metrics from Yes Discovery Agent Migration Hub RVTools export template No No Yes Yes N/A N/A Yes Yes Yes No Yes No Yes Yes No server (CPU, RAM, etc.) Server network connections (TCP only) Running processes Collection interval Yes No Yes Yes No No No No -60 minutes -15 seconds Single snapshot Single snapshot Server data use cases View server data in Migration Hub Yes Yes Profile only No Compare Agentless Collector and Discovery Agent 4 AWS Application Discovery Service User Guide Agentless Collector Discovery Agent Migration Hub RVTools export template Yes Yes Yes Yes Yes Yes Yes
appdiscovery-ug-004
appdiscovery-ug.pdf
4
utilizati on metrics from Yes Discovery Agent Migration Hub RVTools export template No No Yes Yes N/A N/A Yes Yes Yes No Yes No Yes Yes No server (CPU, RAM, etc.) Server network connections (TCP only) Running processes Collection interval Yes No Yes Yes No No No No -60 minutes -15 seconds Single snapshot Single snapshot Server data use cases View server data in Migration Hub Yes Yes Profile only No Compare Agentless Collector and Discovery Agent 4 AWS Application Discovery Service User Guide Agentless Collector Discovery Agent Migration Hub RVTools export template Yes Yes Yes Yes Yes Yes Yes No Generate Amazon EC2 recommend ation based on server profile Generate Amazon EC2 recommend ation based on utilization data Yes Yes Yes Yes Yes No No No No No No No No Yes No No Yes Export of latest utilization snapshot data Export of time series utilization No data Network data use cases Yes No Visualization in Migration Hub Export to Amazon Athena for further exploration Export to CSV file Database use cases Compare Agentless Collector and Discovery Agent 5 AWS Application Discovery Service User Guide Agentless Collector Discovery Agent Migration Hub RVTools export template Yes No No No Database server profile (static configuration) data Supported database engines Oracle, SQL Server, MySQL, PostgreSQL None None None Yes No No No Database schema complexity and duplicates Database schema objects Yes Platform support No No No Any OS running in VMware Any Linux or Windows server Any Linux or Windows server Any Linux server, Windows server, center v5.5 or newer versions or VMware v5.5 or newer versions Supported operating systems Assumptions To use Application Discovery Service, the following is assumed: • You have signed up for AWS. For more information, see Setting up Application Discovery Service. • You have selected a Migration Hub home Region. For more information, see the documentation regarding home Regions. Here's what to expect: Assumptions 6 AWS Application Discovery Service User Guide • The Migration Hub home Region is the only Region where Application Discovery Service stores your discovery and planning data. • Discovery agents, connectors, and imports can be used in your selected Migration Hub home Region only. • For a list of AWS Regions where you can use Application Discovery Service, see the Amazon Web Services General Reference. Assumptions 7 AWS Application Discovery Service User Guide Setting up Application Discovery Service Before you use AWS Application Discovery Service for the first time, complete the following tasks: Sign up for Amazon Web Services Create IAM users Sign in to the Migration Hub console and choose a home Region Sign up for Amazon Web Services If you do not have an AWS account, complete the following steps to create one. To sign up for an AWS account 1. Open https://portal.aws.amazon.com/billing/signup. 2. Follow the online instructions. Part of the sign-up procedure involves receiving a phone call and entering a verification code on the phone keypad. When you sign up for an AWS account, an AWS account root user is created. The root user has access to all AWS services and resources in the account. As a security best practice, assign administrative access to a user, and use only the root user to perform tasks that require root user access. Create IAM users When you create an AWS account, you get a single sign-in identity that has complete access to all of the AWS services and resources in the account. This identity is called the AWS account root user. Signing in to the AWS Management Console using the email address and password that you used to create the account gives you complete access to all of the AWS resources in your account. We strongly recommend that you not use the root user for everyday tasks, even the administrative ones. Instead, follow the security best practice Create Individual IAM Users and create an AWS Identity and Access Management (IAM) administrator user. Then securely lock away the root user credentials and use them to perform only a few account and service management tasks. Sign up for Amazon Web Services 8 AWS Application Discovery Service User Guide In addition to creating an administrative user you'll also need to create non-administrative IAM users. The following topics explain how to create both types of IAM users. Topics • Creating an IAM Administrative User • Creating an IAM Non-Administrative User Creating an IAM Administrative User By default, an administrator account inherits all of the policies required for accessing Application Discovery Service. To create an administrator user • Create an administrator user in your AWS account. For instructions, see Creating Your First IAM User and Administrators Group in the IAM User Guide. Creating an IAM Non-Administrative User When creating non-administrative IAM users, follow the security best practice Grant Least Privilege, granting users minimum permissions. Use IAM managed
appdiscovery-ug-005
appdiscovery-ug.pdf
5
following topics explain how to create both types of IAM users. Topics • Creating an IAM Administrative User • Creating an IAM Non-Administrative User Creating an IAM Administrative User By default, an administrator account inherits all of the policies required for accessing Application Discovery Service. To create an administrator user • Create an administrator user in your AWS account. For instructions, see Creating Your First IAM User and Administrators Group in the IAM User Guide. Creating an IAM Non-Administrative User When creating non-administrative IAM users, follow the security best practice Grant Least Privilege, granting users minimum permissions. Use IAM managed policies to define the level of access to Application Discovery Service by non- administrative IAM users. For information about Application Discovery Service managed policies, see AWS managed policies for AWS Application Discovery Service. To create a non-administrator IAM user 1. In AWS Management Console, navigate to the IAM console. 2. Create a non-administrator IAM user by following the instructions for creating a user with the console as described in Creating an IAM user in your AWS account in the IAM User Guide. While following the instructions in the IAM User Guide: • When on the step about selecting the type of access, select Programmatic access. Note, while not recommended, only select AWS Management Console access if you plan to use the same IAM user credentials for accessing the AWS console. Creating an IAM Administrative User 9 AWS Application Discovery Service User Guide • When on the step about the Set permission page, choose the option to Attach existing policies to user directly. Then select a managed IAM policy for Application Discovery Service from the list of policies. For information about Application Discovery Service managed policies, see AWS managed policies for AWS Application Discovery Service. • When on the step about viewing the user's access keys (access key IDs and secret access keys), follow the guidance in the Important note about saving the user's new access key ID and secret access key in a safe and secure place. Sign in to the Migration Hub console and choose a home Region You need to choose an AWS Migration Hub home Region in the AWS account that you're using for the AWS Application Discovery Service. To choose a home Region 1. Using your AWS account, sign in to the AWS Management Console and open the Migration Hub console at https://console.aws.amazon.com/migrationhub/. 2. In the Migration Hub console navigation pane, choose Settings and the choose a home Region. Your Migration Hub data is stored in your home Region for purposes of discovery, planning, and migration tracking. For more information, see The Migration Hub Home Region. Sign in to Migration Hub and choose a home Region 10 AWS Application Discovery Service User Guide AWS Application Discovery Agent The AWS Application Discovery Agent (Discovery Agent) is software that you install on on-premises servers and VMs targeted for discovery and migration. Agents capture system configuration, system performance, running processes, and details of the network connections between systems. Agents support most Linux and Windows operating systems, and you can deploy them on physical on-premises servers, Amazon EC2 instances, and virtual machines. Note Before you deploy the Discovery Agent, you must choose a Migration Hub home Region. You must register your agent in your home Region. The Discovery Agent runs in your local environment and requires root privileges. When you start the Discovery Agent, it connects securely with your home region and registers with Application Discovery Service. • For example, if eu-central-1 is your home Region, it registers arsenal-discovery.eu- central-1.amazonaws.com with Application Discovery Service. • Or substitute your home Region as needed for all other Regions except us-west-2. • If us-west-2 is your home Region, it registers arsenal.us-west-2.amazonaws.com with Application Discovery Service. How it works After registration, the agent starts collecting data for the host or VM where it resides. The agent pings the Application Discovery Service at 15-minute intervals for configuration information. The collected data includes system specifications, times series utilization or performance data, network connections, and process data. You can use this information to map your IT assets and their network dependencies. All of these data points can help you determine the cost of running these servers in AWS and also plan for migration. Data is transmitted securely by the Discovery Agents to Application Discovery Service using Transport Layer Security (TLS) encryption. Agents are configured to upgrade automatically when new versions become available. You can change this configuration setting if desired. How it works 11 AWS Application Discovery Service User Guide Tip Before downloading and beginning Discovery Agent installation, be sure to read through all of the required prerequisites in Prerequisites for Discovery Agent Data collected by Discovery Agent AWS Application Discovery Agent (Discovery Agent) is software that you install on on-premises servers and VMs. Discovery Agent collects
appdiscovery-ug-006
appdiscovery-ug.pdf
6
AWS and also plan for migration. Data is transmitted securely by the Discovery Agents to Application Discovery Service using Transport Layer Security (TLS) encryption. Agents are configured to upgrade automatically when new versions become available. You can change this configuration setting if desired. How it works 11 AWS Application Discovery Service User Guide Tip Before downloading and beginning Discovery Agent installation, be sure to read through all of the required prerequisites in Prerequisites for Discovery Agent Data collected by Discovery Agent AWS Application Discovery Agent (Discovery Agent) is software that you install on on-premises servers and VMs. Discovery Agent collects system configuration, times series utilization or performance data, process data, and Transmission Control Protocol (TCP) network connections. This section describes the data that's collected. Table legend for Discovery Agent collected data: • The term host refers to either a physical server or a VM. • Collected data is in measurements of kilobytes (KB) unless stated otherwise. • Equivalent data in the Migration Hub console is reported in megabytes (MB). • The polling period is in intervals of approximately 15 seconds and is sent to AWS every 15 minutes. • Data fields denoted with an asterisk (*) are only available in the .csv files that are produced from the agent's API export function. Data field Description agentAssignedProcessId* Process ID of processes discovered by the agent agentId Unique ID of agent agentProvidedTimeStamp* cmdLine* cpuType Data collected Date and time of agent observation (mm/dd/ yyyy hh:mm:ss am/pm) Process entered at the command line Type of CPU (central processing unit) used in host 12 AWS Application Discovery Service User Guide Data field destinationIp* destinationPort* family* freeRAM (MB) gateway* hostName hypervisor ipAddress ipVersion* isSystem* macAddress name* netMask* osName osVersion path Description IP address of device to which packet is being sent Port number to which the data/request is to be sent Protocol of routing family Free RAM and cached RAM that can be made immediately available to applications, measured in MB Node address of network Name of host data was collected on Type of hypervisor IP address of the host IP version number Boolean attribute to indicate if a process is owned by the OS MAC address of the host Name of the host, network, metrics, etc. data is being collected for IP address prefix that a network host belongs to Operating system name on host Operating system version on host Path of the command sourced from the command line Data collected 13 AWS Application Discovery Service User Guide Data field sourceIp* sourcePort* timestamp* totalCpuUsagePct Description IP address of the device sending the IP packet Port number from which the data/request originates from Date and time of reported attribute logged by agent Percentage of CPU usage on host during polling period totalDiskBytesReadPerSecond (Kbps) Total kilobits read per second across all disks totalDiskBytesWrittenPerSecond (Kbps) Total kilobits written per second across all disks totalDiskFreeSize (GB) Free disk space expressed in GB totalDiskReadOpsPerSecond Total number of read I/O operations per second totalDiskSize (GB) Total capacity of disk expressed in GB totalDiskWriteOpsPerSecond totalNetworkBytesReadPerSecond (Kbps) totalNetworkBytesWrittenPerSecond (Kbps) totalNumCores totalNumCpus totalNumDisks Total number of write I/O operations per second Total amount of throughput of bytes read per second Total amount of throughput of bytes written per second Total number of independent processing units within CPU Total number of central processing units The number of physical hard disks on a host Data collected 14 AWS Application Discovery Service User Guide Data field Description totalNumLogicalProcessors* Total number of physical cores times the number of threads that can run on each core totalNumNetworkCards Total count of network cards on server totalRAM (MB) transportProtocol* Total amount of RAM available on host Type of transport protocol used Prerequisites for Discovery Agent The following are the prerequisites and the tasks that you must perform before you can successfully install the AWS Application Discovery Agent (Discovery Agent). • You must set an AWS Migration Hub home region before you begin installing Discovery Agent. • If you have a 1.x version of the agent installed, it must be removed before installing the latest version. • If the host that the agent is being installed on runs Linux, then verify that the host at least supports the Intel i686 CPU architecture (also known as the P6 micro architecture). • Verify that your operating system (OS) environment is supported: Linux Amazon Linux 2012.03, 2015.03 Amazon Linux 2 (9/25/2018 update and later) Ubuntu 12.04, 14.04, 16.04, 18.04, 20.04 Red Hat Enterprise Linux 5.11, 6.10, 7.3, 7.7, 8.1 CentOS 5.11, 6.9, 7.3 SUSE 11 SP4, 12 SP5, 15 SP5 Windows Windows Server 2003 R2 SP2 Windows Server 2008 R1 SP2, 2008 R2 SP1 Windows Server 2012 R1, 2012 R2 Windows Server 2016 Prerequisites 15 AWS Application Discovery Service User Guide Windows Server 2019 Windows Server 2022 • If outbound connections from your network
appdiscovery-ug-007
appdiscovery-ug.pdf
7
architecture (also known as the P6 micro architecture). • Verify that your operating system (OS) environment is supported: Linux Amazon Linux 2012.03, 2015.03 Amazon Linux 2 (9/25/2018 update and later) Ubuntu 12.04, 14.04, 16.04, 18.04, 20.04 Red Hat Enterprise Linux 5.11, 6.10, 7.3, 7.7, 8.1 CentOS 5.11, 6.9, 7.3 SUSE 11 SP4, 12 SP5, 15 SP5 Windows Windows Server 2003 R2 SP2 Windows Server 2008 R1 SP2, 2008 R2 SP1 Windows Server 2012 R1, 2012 R2 Windows Server 2016 Prerequisites 15 AWS Application Discovery Service User Guide Windows Server 2019 Windows Server 2022 • If outbound connections from your network are restricted, you'll need to update your firewall settings. Agents require access to arsenal over TCP port 443. They don't require any inbound ports to be open. For example, if your home Region is eu-central-1, you'd use https://arsenal- discovery.eu-central-1.amazonaws.com:443 • Access to Amazon S3 in your home region is required for auto-upgrade to function. • Create an AWS Identity and Access Management (IAM) user in the console and attach the existing AWSApplicationDiscoveryAgentAccess IAM managed policy. This policy allows the user to perform necessary agent actions on your behalf. For more information about managed policies, see AWS managed policies for AWS Application Discovery Service. • Check the time skew from your Network Time Protocol (NTP) servers and correct if necessary. Incorrect time synchronization causes the agent registration call to fail. Note The Discovery Agent has a 32-bit agent executable, which works on 32-bit and 64-bit operating systems. The number of installation packages needed for deployment is reduced by having a single executable. This executable agent works for Linux and for Windows OS. It is addressed in their respective installation sections that follow. Installing Discovery Agent This page covers how to install the Discovery Agent on Linux and Microsoft Windows. Install Discovery Agent on Linux Complete the following procedure on Linux. Be sure that your Migration Hub home region has been set before you begin this procedure. Note If you are using a non-current Linux version, see Considerations with older Linux platforms. Installing Discovery Agent 16 AWS Application Discovery Service User Guide To install AWS Application Discovery Agent in your data center 1. Sign in to your Linux-based server or VM and create a new directory to contain your agent components. 2. Switch to the new directory and download the installation script from either the command line or the console. a. To download from the command line, run the following command. curl -o ./aws-discovery-agent.tar.gz https://s3-region.amazonaws.com/aws- discovery-agent.region/linux/latest/aws-discovery-agent.tar.gz b. To download from the Migration Hub console, do the following: i. ii. iii. Sign in to the AWS Management Console and open the Migration Hub console at https://console.aws.amazon.com/migrationhub/. In the left navigation page, under Discover, choose Tools. In the AWS Discovery Agent box, choose Download agents, then choose Download for Linux. Your download begins immediately. 3. Verify the cryptographic signature of the installation package with the following three commands: curl -o ./agent.sig https://s3.region.amazonaws.com/aws-discovery-agent.region/ linux/latest/aws-discovery-agent.tar.gz.sig curl -o ./discovery.gpg https://s3.region.amazonaws.com/aws-discovery-agent.region/ linux/latest/discovery.gpg gpg --no-default-keyring --keyring ./discovery.gpg --verify agent.sig aws- discovery-agent.tar.gz The agent public key (discovery.gpg) fingerprint is 7638 F24C 6717 F97C 4F1B 3BC0 5133 255E 4DF4 2DA2. 4. Extract from the tarball as shown following. tar -xzf aws-discovery-agent.tar.gz 5. To install the agent, choose one of the following installation methods. Install on Linux 17 AWS Application Discovery Service User Guide To... Do this... Install Discovery Agent To install the agent, run the agent install command as shown in the following example. In the example, replace your- home-region with the name of your home region, aws-access-key-id with your access key id, and aws-secret- access-key with your secret access key. sudo bash install -r your-home- region -k aws-access-key-id -s aws- secret-access-key By default, agents automatically download and apply updates as they become available . We recommend using this default configura tion. However, if you don't want agents to download and apply updates automatic ally, include the -u false parameter when running the agent install command. Install on Linux 18 AWS Application Discovery Service User Guide To... Do this... (Optional) Install Discovery Agent and configure a non-transparent proxy To configure a non-transparent proxy, add the following parameters to the agent install command: • -e The proxy password. • -f The proxy port number. • -g The proxy scheme. • -i The proxy username. The following is an example of the agent install command using the non-transparent proxy parameters. sudo bash install -r your-home- region -k aws-access-key-id -s aws- secret-access-key -d myproxy.m ycompany.com -e mypassword - f proxy-port-number -g https - i myusername If your proxy doesn't require authentication, then leave out the -e and -i parameters. The example install command uses https, if your proxy uses HTTP, specify http for the -g parameter value. 6. If outbound connections from your network are restricted, you'll need to update your firewall settings. Agents
appdiscovery-ug-008
appdiscovery-ug.pdf
8
port number. • -g The proxy scheme. • -i The proxy username. The following is an example of the agent install command using the non-transparent proxy parameters. sudo bash install -r your-home- region -k aws-access-key-id -s aws- secret-access-key -d myproxy.m ycompany.com -e mypassword - f proxy-port-number -g https - i myusername If your proxy doesn't require authentication, then leave out the -e and -i parameters. The example install command uses https, if your proxy uses HTTP, specify http for the -g parameter value. 6. If outbound connections from your network are restricted, you'll need to update your firewall settings. Agents require access to arsenal over TCP port 443. They don't require any inbound ports to be open. For example, if your home Region is eu-central-1, you'd use https://arsenal- discovery.eu-central-1.amazonaws.com:443 Install on Linux 19 AWS Application Discovery Service User Guide Considerations with older Linux platforms Some older Linux platforms such as SUSE 10, CentOS 5, and RHEL 5 are either at end of life or only minimally supported. These platforms can suffer from out-of-date cipher suites that prevent the agent update script from downloading installation packages. Curl The Application Discovery agent requires curl for secure communications with the AWS server. Some old versions of curl are not able to communicate securely with a modern web service. To use the version of curl included with the Application Discovery agent for all operations, run the installation script with the -c true parameter. Certificate Authority Bundle Older Linux systems might have an out-of-date Certificate Authority (CA) bundle, which is critical to secure internet communication. To use the CA bundle included with the Application Discovery agent for all operations, run the installation script with the -b true parameter. These installation script options can be used together. In the following example command, both of the script parameters are passed to the installation script: sudo bash install -r your-home_region -k aws-access-key-id -s aws-secret-access-key -c true -b true Install Discovery Agent on Microsoft Windows Complete the following procedure to install an agent on Microsoft Windows. Be sure that your Migration Hub home region has been set before you begin this procedure. To install AWS Application Discovery Agent in your data center 1. Download the Windows agent installer but do not double-click to run the installer within Windows. Install on Microsoft Windows 20 AWS Application Discovery Service User Guide Important Do not double-click to run the installer within Windows as it will fail to install. Agent installation only works from the command prompt. (If you already double-clicked on the installer, you must go to Add/Remove Programs and uninstall the agent before continuing on with the remaining installation steps.) If the Windows agent installer doesn't detect any version of the Visual C++ x86 runtime on the host, it automatically installs the Visual C++ x86 2015–2019 runtime before installing the agent software. 2. Open a command prompt as an administrator and navigate to the location where you saved the installation package. 3. To install the agent, choose one of the following installation methods. To... Do this... Install Discovery Agent To install the agent, run the agent install command as shown in the following example. In the example, replace your- home-region with the name of your home region, aws-access-key-id with your access key ID, and aws-secret- access-key with your secret access key. Optionally, you can set the agent installat ion location by specifying the folder path C:\install-location for the INSTALLLOCATION parameter. For example, INSTALLLOCATION=" C:\install- location ". The resulting folder hierarchy will be [INSTALLLOCATION path]\AWS Discovery. By default, the install location is the Program Files folder. Optionally, you can use LOGANDCON FIGLOCATION to override the default Install on Microsoft Windows 21 AWS Application Discovery Service User Guide To... Do this... directory (ProgramData) for the agent logs folder and configuration file. The resulting folder hierarchy is [LOGANDCON FIGLOCATION path ]\AWS Discovery . .\AWSDiscoveryAgentInstalle r.exe REGION=" your-home-region " KEY_ID="aws-access-key-id " KEY_SECRET=" aws-secret-access- key " /quiet By default, agents automatically download and apply updates as they become available . We recommend using this default configura tion. However, if you don't want agents to download and apply updates automatic ally, include the following parameter when running the agent install command: AUTO_UPDATE=false Warning Disabling auto-upgrades will prevent the latest security patches from being installed. Install on Microsoft Windows 22 AWS Application Discovery Service User Guide To... Do this... (Optional) Install Discovery Agent and configure a non-transparent proxy To configure a non-transparent proxy, add the following public properties to the agent install command: • PROXY_HOST – The name of the proxy host • PROXY_SCHEME – The proxy scheme • PROXY_PORT – The proxy port number • PROXY_USER – The proxy user name • PROXY_PASSWORD – The proxy user password The following is an example of the agent install command using the non-transparent proxy properties. .\AWSDiscoveryAgentInstalle r.exe REGION=" your-home-region
appdiscovery-ug-009
appdiscovery-ug.pdf
9
the latest security patches from being installed. Install on Microsoft Windows 22 AWS Application Discovery Service User Guide To... Do this... (Optional) Install Discovery Agent and configure a non-transparent proxy To configure a non-transparent proxy, add the following public properties to the agent install command: • PROXY_HOST – The name of the proxy host • PROXY_SCHEME – The proxy scheme • PROXY_PORT – The proxy port number • PROXY_USER – The proxy user name • PROXY_PASSWORD – The proxy user password The following is an example of the agent install command using the non-transparent proxy properties. .\AWSDiscoveryAgentInstalle r.exe REGION=" your-home-region " KEY_ID="aws-access-key-id " KEY_SECRET=" aws-secret-access- key " PROXY_HOST=" myproxy.m ycompany.com " PROXY_SCHEME="http s" PROXY_PORT=" proxy-port-number " PROXY_USER=" myusername " PROXY_PAS SWORD=" mypassword " /quiet If your proxy doesn't require authentic ation, then omit the PROXY_USER and PROXY_PASSWORD properties. The example install command uses https. If your proxy uses HTTP, specify http for the PROXY_SCHEME value. Install on Microsoft Windows 23 AWS Application Discovery Service User Guide 4. If outbound connections from your network are restricted, you must update your firewall settings. Agents require access to arsenal over TCP port 443. They don't require any inbound ports to be open. For example, if your home Region is eu-central-1, you'd use the following: https:// arsenal-discovery.eu-central-1.amazonaws.com:443 Package signing and automatic upgrades For Windows Server 2008 and later, Amazon cryptographically signs the Application Discovery Service agent installation package with an SHA256 certificate. For SHA2-signed autoupdates on Windows Server 2008 SP2, ensure that hosts have a hotfix installed to support SHA2 signature authentication. Microsoft's latest support hotfix helps support SHA2 authentication on Windows Server 2008 SP2. Note The hotfixes for SHA256 support for Windows 2003 are no longer publicly available from Microsoft. If these fixes are not already installed in your Windows 2003 host, manual upgrades are necessary. To perform upgrades manually 1. Download the Windows Agent Updater. 2. Open command prompt as an administrator. 3. Navigate to the location where the updater was saved. 4. Run the following command. AWSDiscoveryAgentUpdater.exe /Q Managing the Discovery Agent process This page covers how to manage the Discovery Agent on Linux and Microsoft Windows. Managing the Discovery Agent process 24 AWS Application Discovery Service User Guide Manage the Discovery Agent process on Linux You can manage the behavior of the Discovery Agent at the system level using the systemd, Upstart, or System V init tools. The following tabs outline the commands for the supported tasks in each of the respective tools. systemd Management Commands for the Application Discovery Agent Task Command Verify that an agent is running sudo systemctl status aws-discovery-daem on.service Start an agent sudo systemctl start aws-discovery-daem on.service Stop an agent sudo systemctl stop aws-discovery-daem on.service Restart an agent sudo systemctl restart aws-discovery-daem on.service Upstart Management commands for the Application Discovery Agent Task Command Verify that an agent is running sudo initctl status aws-discovery-daemon Start an agent Stop an agent sudo initctl start aws-discovery-daemon sudo initctl stop aws-discovery-daemon Restart an agent sudo initctl restart aws-discovery-daem on Manage the process on Linux 25 AWS Application Discovery Service System V init User Guide Management commands for the Application Discovery Agent Task Command Verify that an agent is running sudo /etc/init.d/aws-discovery-daemon status Start an agent sudo /etc/init.d/aws-discovery-daemon start Stop an agent sudo /etc/init.d/aws-discovery-daemon stop Restart an agent sudo /etc/init.d/aws-discovery-daemon restart Manage the Discovery Agent process on Microsoft Windows You can manage the behavior of the Discovery Agent at the system level through the Windows Server Manager Services console. The following table describes how. Task Service Name Service Status/Action Verify that an agent is running AWS Discovery Agent Started AWS Discovery Updater Start an agent AWS Discovery Agent Choose Start AWS Discovery Updater Stop an agent AWS Discovery Agent Choose Stop AWS Discovery Updater Restart an agent AWS Discovery Agent Choose Restart AWS Discovery Updater Manage the process on Microsoft Windows 26 AWS Application Discovery Service User Guide Uninstalling Discovery Agent This page covers how to uninstall the Discovery Agent on Linux and Microsoft Windows. Uninstall Discovery Agent on Linux This section describes how to uninstall Discovery Agent on Linux. To uninstall an agent if you're using the yum package manager • Use the following command to uninstall an agent if using yum. rpm -e --nodeps aws-discovery-agent To uninstall an agent if you're using the apt-get package manager • Use the following command to uninstall an agent if using apt-get. apt-get remove aws-discovery-agent:i386 To uninstall an agent if you're using the zypper package manager • Use the following command to uninstall an agent if using zypper. zypper remove aws-discovery-agent Uninstall Discovery Agent on Microsoft Windows This section describes how to uninstall Discovery Agent on Microsoft Windows. To uninstall a discovery agent on Windows 1. Open the Control Panel in Windows. 2. Choose Programs. 3. Choose Programs and Features. 4. Select
appdiscovery-ug-010
appdiscovery-ug.pdf
10
if using yum. rpm -e --nodeps aws-discovery-agent To uninstall an agent if you're using the apt-get package manager • Use the following command to uninstall an agent if using apt-get. apt-get remove aws-discovery-agent:i386 To uninstall an agent if you're using the zypper package manager • Use the following command to uninstall an agent if using zypper. zypper remove aws-discovery-agent Uninstall Discovery Agent on Microsoft Windows This section describes how to uninstall Discovery Agent on Microsoft Windows. To uninstall a discovery agent on Windows 1. Open the Control Panel in Windows. 2. Choose Programs. 3. Choose Programs and Features. 4. Select AWS Discovery Agent. Uninstalling Discovery Agent 27 AWS Application Discovery Service 5. Choose Uninstall. Note User Guide If you choose to reinstall the agent after uninstalling it, run the following command with the /repair and /norestart options. .\AWSDiscoveryAgentInstaller.exe REGION="your-home-region" KEY_ID="aws- access-key-id" KEY_SECRET="aws-secret-access-key" /quiet /repair /norestart To uninstall a discovery agent on Windows using the command line 1. Right-click Start. 2. Choose Command Prompt. 3. Use the following command to uninstall a discovery agent on Windows. wmic product where name='AWS Discovery Agent' call uninstall Note If the .exe file is present on the server, you can uninstall the agent completely from the server by using the following command. If you use this command to uninstall, you don't need to use the /repair and /norestart options when you reinstall the agent. .\AWSDiscoveryAgentInstaller.exe /quiet /uninstall Starting and stopping Discovery Agent data collection After the Discovery Agent is deployed and configured, if data collections stops you can restart it. You can start or stop data collection through the console by following the steps in Starting and stopping data collectors in the AWS Migration Hub console, or by making API calls through the AWS CLI. Starting and stopping data collection 28 AWS Application Discovery Service User Guide To install the AWS CLI and start or stop data collection 1. If you have not already done so, install the AWS CLI appropriate to your OS type (Windows or Mac/Linux). See the AWS Command Line Interface User Guide for instructions. 2. Open the Command prompt (Windows) or Terminal (MAC/Linux). a. b. c. Type aws configure and press Enter. Enter your AWS Access Key ID and AWS Secret Access Key. Enter your home Region for the Default Region Name, for example us-west-2. (We are assuming that us-west-2 is your home Region in this example.) d. Enter text for Default Output Format. 3. To find the ID of the agent you want to stop or start data collection for, type the following command: aws discovery describe-agents 4. To start data collection by the agent, type the following command: aws discovery start-data-collection-by-agent-ids --agent-ids <agent ID> To stop data collection by the agent, type the following command: aws discovery stop-data-collection-by-agent-ids --agent-ids <agent ID> Troubleshooting Discovery Agent This page covers troubleshooting the Discovery Agent on Linux and Microsoft Windows. Troubleshooting Discovery Agent on Linux If you encounter problems while installing or using the Discovery Agent on Linux, consult the following guidance about logging and configuration. When helping to troubleshoot potential issues with the agent or its connection to the Application Discovery Service, AWS Support often requests these files. • Log files Troubleshooting Discovery Agent 29 AWS Application Discovery Service User Guide Log files for Discovery Agent are located in the following directory. /var/log/aws/discovery/ Log files are named to indicate whether they are generated by the main daemon, the automatic upgrader, or the installer. • Configuration files Configuration files for Discovery Agent version 2.0.1617.0 or newer are located in the following directory. /etc/opt/aws/discovery/ Configuration files for versions of Discovery Agent before 2.0.1617.0 are located in the following directory. /var/opt/aws/discovery/ • For instructions on how to remove older versions of the Discovery Agent, see Prerequisites for Discovery Agent. Troubleshooting Discovery Agent on Microsoft Windows If you encounter problems while installing or using the AWS Application Discovery Agent on Microsoft Windows, consult the following guidance about logging and configuration. AWS Supportoften requests these files when helping to troubleshoot potential issues with the agent or its connection to the Application Discovery Service. • Installation logging In some cases, the agent install command appears to fail. For example, a failure can appear with the Windows Services Manager showing that the discovery services are not being created. In this case, add /log install.log to the command to generate a verbose installation log. • Operational logging Troubleshooting Discovery Agent on Microsoft Windows 30 AWS Application Discovery Service User Guide On Windows Server 2008 and later, agent log files can be found under the following directory. C:\ProgramData\AWS\AWS Discovery\Logs On Windows Server 2003, agent log files can be found under the following directory. C:\Documents and Settings\All Users\Application Data\AWS\AWS Discovery\Logs Log files are named to indicate whether generated by the main service, automatic upgrades, or the installer. • Configuration file On Windows
appdiscovery-ug-011
appdiscovery-ug.pdf
11
showing that the discovery services are not being created. In this case, add /log install.log to the command to generate a verbose installation log. • Operational logging Troubleshooting Discovery Agent on Microsoft Windows 30 AWS Application Discovery Service User Guide On Windows Server 2008 and later, agent log files can be found under the following directory. C:\ProgramData\AWS\AWS Discovery\Logs On Windows Server 2003, agent log files can be found under the following directory. C:\Documents and Settings\All Users\Application Data\AWS\AWS Discovery\Logs Log files are named to indicate whether generated by the main service, automatic upgrades, or the installer. • Configuration file On Windows Server 2008 and later, the agent configuration file can be found at the following location. C:\ProgramData\AWS\AWS Discovery\config On Windows Server 2003, the agent configuration file can be found at the following location. C:\Documents and Settings\All Users\Application Data\AWS\AWS Discovery\config • For instructions on how to remove earlier versions of the Discovery Agent, see Prerequisites for Discovery Agent. Troubleshooting Discovery Agent on Microsoft Windows 31 AWS Application Discovery Service User Guide Application Discovery Service Agentless Collector Application Discovery Service Agentless Collector (Agentless Collector) is an on-premises application that collects information through agentless methods about your on-premises environment, including server profile information (for example, OS, number of CPUs, amount of RAM), database metadata, utilization metrics, and data about network traffic among on-premises servers. You install the Agentless Collector as a virtual machine (VM) in your VMware vCenter Server environment using an Open Virtualization Archive (OVA) file. Agentless Collector has a modular architecture, which allows for the use of multiple agentless collection methods. Agentless Collector provides modules for data collection from VMware VMs and from database and analytics servers. It also provides a module for collecting data about network traffic among your on-premises servers. Agentless Collector supports data collection for AWS Application Discovery Service (Application Discovery Service) by collecting usage and configuration data about your on-premises servers and databases, as well as data about network traffic among your on-premises servers. Application Discovery Service is integrated with AWS Migration Hub, a service that simplifies your migration tracking as it aggregates your migration status information into a single console. You can view the discovered servers, obtain Amazon EC2 recommendations, visualize network connections, group servers into applications, and then track the migration status of each application from the Migration Hub console in your home Region. The Agentless Collector database and analytics data collection module is integrated with AWS Database Migration Service (AWS DMS). This integration helps plan your migration to the AWS Cloud. You can use the database and analytics data collection module to discover database and analytics servers in your environment and build an inventory of servers that you want to migrate to the AWS Cloud. This data collection module collects database metadata and actual utilization metrics of CPU, memory, and disk capacity. After you collect these metrics, you can use the AWS DMS console to generate target recommendations for your source databases. Prerequisites for Agentless Collector The following are the prerequisites for using Application Discovery Service Agentless Collector (Agentless Collector): • One or more AWS accounts. Prerequisites 32 AWS Application Discovery Service User Guide • An AWS account with the AWS Migration Hub home Region set, see Sign in to the Migration Hub console and choose a home Region. Your Migration Hub data is stored in your home Region for purposes of discovery, planning, and migration tracking. • An AWS account IAM user that is set up to use the AWS managed policy AWSApplicationDiscoveryAgentlessCollectorAccess. To use the database and analytics data collection module, this IAM user must also use two customer managed IAM policies DMSCollectorPolicy and FleetAdvisorS3Policy. For more information, see Deploying Application Discovery Service Agentless Collector. The IAM user must be created in an AWS account with Migration Hub home Region set. • VMware vCenter Server V5.5, V6, V6.5, 6.7 or 7.0. Note The Agentless Collector supports all of these versions of VMware, but we currently test against version 6.7 and 7.0. • For VMware vCenter Server setup, make sure that you can provide vCenter credentials with Read and View permissions set for the System group. • Agentless Collector requires outbound access over TCP port 443 to several AWS domains. For a list of these domains, see Configure firewall for outbound access to AWS domains. • To use the database and analytics data collection module, create an Amazon S3 bucket in the AWS Region that you set as your Migration Hub home Region. The database and analytics data collection modules stores inventory metadata in this Amazon S3 bucket. For more information, see Creating a bucket in the Amazon S3 User Guide. • Agentless Collector version 2 requires ESXi 6.5 or a later version. Configure firewall for outbound access to AWS domains If outbound connections from your network are restricted, you must update your firewall
appdiscovery-ug-012
appdiscovery-ug.pdf
12
these domains, see Configure firewall for outbound access to AWS domains. • To use the database and analytics data collection module, create an Amazon S3 bucket in the AWS Region that you set as your Migration Hub home Region. The database and analytics data collection modules stores inventory metadata in this Amazon S3 bucket. For more information, see Creating a bucket in the Amazon S3 User Guide. • Agentless Collector version 2 requires ESXi 6.5 or a later version. Configure firewall for outbound access to AWS domains If outbound connections from your network are restricted, you must update your firewall settings to allow outbound access to the AWS domains that Agentless Collector requires. Which AWS domains require outbound access depend on if your Migration Hub home Region is US West (Oregon) Region, us-west-2, or some other Region. Configure firewall 33 AWS Application Discovery Service User Guide The following domains require outbound access if your AWS account home Region is us-west-2: • arsenal-discovery.us-west-2.amazonaws.com – The collector uses this domain to validate that it is configured with the required IAM user credentials. The collector also uses it for sending and storing collected data since the home Region is us-west-2. • migrationhub-config.us-west-2.amazonaws.com – The collector uses this domain to determine which home Region the collector sends data to based on the provided IAM user credentials. • api.ecr-public.us-east-1.amazonaws.com – The collector uses this domain to discover available updates. • public.ecr.aws – The collector uses this domain for downloading the updates. • dms.your-migrationhub-home-region.amazonaws.com – The collector uses this domain to connect to the AWS DMS data collector. • s3.amazonaws.com – The collector uses this domain to upload data that is collected by the database and analytics data collection module to your Amazon S3 bucket. • sts.amazonaws.com – The collector uses this domain to understand what account the collector has been configured with. The following domains require outbound access if your AWS account home Region is not us- west-2: • arsenal-discovery.us-west-2.amazonaws.com – The collector uses this domain to validate that it is configured with the required IAM user credentials. • arsenal-discovery.your-migrationhub-home-region.amazonaws.com – The collector uses this domain for sending and storing collected data. • migrationhub-config.us-west-2.amazonaws.com – The collector uses this domain to determine which home Region the collector should send data to based on the provided IAM user credentials. • api.ecr-public.us-east-1.amazonaws.com – The collector uses this domain to discover available updates. • public.ecr.aws – The collector uses this domain for downloading the updates. • dms.your-migrationhub-home-region.amazonaws.com – The collector uses this domain to connect to the AWS DMS data collector. Configure firewall 34 AWS Application Discovery Service User Guide • s3.amazonaws.com – The collector uses this domain to upload data that is collected by the database and analytics data collection module to your Amazon S3 bucket. • sts.amazonaws.com – The collector uses this domain to understand what account the collector has been configured with. When setting up Agentless Collector, you might receive errors such as Setup failed – Check your credentials and try again or AWS cannot be reached. Please verify network settings. These errors can be caused by a failed attempt by the Agentless Collector to establish an HTTPS connection to one of the AWS domains that it needs outbound access to. If a connection to AWS cannot be established, Agentless Collector cannot collect data from your on-premises environment. For information about how to fix the connection to AWS, see Fixing Agentless Collector cannot reach AWS during setup. Deploying Application Discovery Service Agentless Collector To deploy Application Discovery Service Agentless Collector, you must first create an IAM user and download the collector. This page walks you through the steps to take to deploy a collector. Create an IAM user for Agentless Collector To use Agentless Collector, in the AWS account that you used in Sign in to the Migration Hub console and choose a home Region, you must create an AWS Identity and Access Management (IAM) user. Then, set up this IAM user to use the following AWS managed policy AWSApplicationDiscoveryAgentlessCollectorAccess. You attach this IAM policy when you create the IAM user. To use the database and analytics data collection module, create two customer managed IAM policies. These policies provide access your Amazon S3 bucket and the AWS DMS API. For more information, see Create a customer managed policy in the IAM User Guide. • Use the following JSON code to create the DMSCollectorPolicy policy. { "Version": "2012-10-17", "Statement": [{ "Effect": "Allow", Deploying a collector 35 AWS Application Discovery Service "Action": [ "dms:DescribeFleetAdvisorCollectors", "dms:ModifyFleetAdvisorCollectorStatuses", "dms:UploadFileMetadataList" ], "Resource": "*" }] } • Use the following JSON code to create the FleetAdvisorS3Policy policy. User Guide { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "s3:GetObject*", "s3:GetBucket*", "s3:List*", "s3:DeleteObject*", "s3:PutObject*" ], "Resource": [ "arn:aws:s3:::bucket_name", "arn:aws:s3:::bucket_name/*" ] } ] } In the preceding example, replace bucket_name with the name
appdiscovery-ug-013
appdiscovery-ug.pdf
13
the AWS DMS API. For more information, see Create a customer managed policy in the IAM User Guide. • Use the following JSON code to create the DMSCollectorPolicy policy. { "Version": "2012-10-17", "Statement": [{ "Effect": "Allow", Deploying a collector 35 AWS Application Discovery Service "Action": [ "dms:DescribeFleetAdvisorCollectors", "dms:ModifyFleetAdvisorCollectorStatuses", "dms:UploadFileMetadataList" ], "Resource": "*" }] } • Use the following JSON code to create the FleetAdvisorS3Policy policy. User Guide { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "s3:GetObject*", "s3:GetBucket*", "s3:List*", "s3:DeleteObject*", "s3:PutObject*" ], "Resource": [ "arn:aws:s3:::bucket_name", "arn:aws:s3:::bucket_name/*" ] } ] } In the preceding example, replace bucket_name with the name of the Amazon S3 bucket that you created in the prerequisites step. We recommend that you create a non-administrative IAM user to use with Agentless Collector. When creating non-administrative IAM users, follow the security best practice Grant Least Privilege, granting users minimum permissions. Create an IAM user 36 AWS Application Discovery Service User Guide To create a non-administrator IAM user to use with Agentless Collector 1. In AWS Management Console, navigate to the IAM console, using the AWS account that you used to set the home Region in Sign in to the Migration Hub console and choose a home Region. 2. Create a non-administrator IAM user by following the instructions for creating a user with the console as described in Creating an IAM user in your AWS account in the IAM User Guide. While following the instructions in the IAM User Guide: • When on the step about selecting the type of access, select Programmatic access. Note, while not recommended, only select AWS Management Console access if you plan to use the same IAM user credentials for accessing the AWS console. • When on the step about the Set permission page, choose the option to Attach existing policies to user directly. Then select the AWSApplicationDiscoveryAgentlessCollectorAccess AWS managed policy from the list of policies. Next, select the DMSCollectorPolicy and FleetAdvisorS3Policy customer managed IAM policies. • When on the step about viewing the user's access keys (access key IDs and secret access keys), follow the guidance in the Important note about saving the user's new access key ID and secret access key in a safe and secure place. You'll need these access keys in Configuring Agentless Collector. It's an AWS security best practice to rotate access keys. For information about rotating keys, see Rotate access keys regularly for use cases that require long-term credentials in the IAM User Guide. Download the Agentless Collector To set up the Application Discovery Service Agentless Collector (Agentless Collector), you must download and deploy the Agentless Collector Open Virtualization Archive (OVA) file. The Agentless Collector is a virtual appliance that you install in your on-premises VMware environment. This step describes how to download the collector OVA file and the next step describes how to deploy it. Download the collector 37 AWS Application Discovery Service User Guide To download the collector OVA file and verify its checksum 1. Sign in to vCenter as a VMware administrator and switch to the directory where you want to download the Agentless Collector OVA file. 2. Download the OVA file from the following URL: Agentless Collector OVA 3. Depending on which hashing algorithm you use in your system environment, download either the MD5 or SHA256 to get the file containing the checksum value. Use the downloaded value to verify the ApplicationDiscoveryServiceAgentlessCollector file downloaded in the preceding step. 4. Depending on your variation of Linux, run the version appropriate MD5 command or SHA256 command to verify that the cryptographic signature of the ApplicationDiscoveryServiceAgentlessCollector.ova file matches the value in the respective MD5/SHA256 file that you downloaded. $ md5sum ApplicationDiscoveryServiceAgentlessCollector.ova $ sha256sum ApplicationDiscoveryServiceAgentlessCollector.ova Deploy Agentless Collector Application Discovery Service Agentless Collector (Agentless Collector) is a virtual appliance that you install in your on-premises VMware environment. This section describes how to deploy the Open Virtualization Archive (OVA) file that you downloaded in your VMware environment. Agentless Collector virtual machine specifications Agentless Collector version 2 • Operating System – Amazon Linux 2023 • RAM – 16 GB • CPU – 4 cores • VMware requirements – See VMware host requirements for running AL2023 on VMware Deploy the collector 38 AWS Application Discovery Service Agentless Collector version 1 • Operating System – Amazon Linux 2 • RAM – 16 GB • CPU – 4 cores User Guide The following procedure steps you through deploying the Agentless Collector OVA file in your VMware environment. To deploy Agentless Collector 1. Sign in to vCenter as a VMware administrator. 2. Use one of the following ways to install the OVA file: • • Use the UI: Choose File, choose Deploy OVF Template, select the collector OVA file you downloaded in the previous section, and then complete the wizard. Ensure the proxy settings in the server management dashboard are configured correctly. Use
appdiscovery-ug-014
appdiscovery-ug.pdf
14
• Operating System – Amazon Linux 2 • RAM – 16 GB • CPU – 4 cores User Guide The following procedure steps you through deploying the Agentless Collector OVA file in your VMware environment. To deploy Agentless Collector 1. Sign in to vCenter as a VMware administrator. 2. Use one of the following ways to install the OVA file: • • Use the UI: Choose File, choose Deploy OVF Template, select the collector OVA file you downloaded in the previous section, and then complete the wizard. Ensure the proxy settings in the server management dashboard are configured correctly. Use the command line: To install the collector OVA file from the command line, download and use the VMware Open Virtualization Format Tool (ovftool). To download ovftool, select a release from the OVF Tool Documentation page. The following is an example of using the ovftool command line tool to install the collector OVA file. ovftool --acceptAllEulas --name=AgentlessCollector --datastore=datastore1 -dm=thin ApplicationDiscoveryServiceAgentlessCollector.ova 'vi://username:password@vcenterurl/Datacenter/host/esxi/' The following describe the replaceable values in the example • The name is the name that you want to use for your Agentless Collector VM. • The datastore is the name of the datastore in your vCenter. • The OVA file name is the name of the downloaded collector OVA file. • The username/password are your vCenter credentials. • The vcenterurl is the URL of your vCenter. • The vi path is the path to your VMware ESXi host. Deploy the collector 39 AWS Application Discovery Service User Guide 3. Locate the deployed Agentless Collector in your vCenter. Right-click the VM, and then choose Power, Power On. 4. After a few minutes, the IP address of the collector displays in vCenter. You use this IP address to connect to the collector. Accessing the Agentless Collector console The following procedure describes how to access the Application Discovery Service Agentless Collector (Agentless Collector) console. To access the Agentless Collector console 1. Open a web browser, and then type the following URL in the address bar: https://<ip_address>/, where <ip_address> is the IP address of the collector from Deploy Agentless Collector. 2. Choose Get Started the first time you access Agentless Collector. Thereafter, you'll be asked to Log in. If you're accessing the Agentless Collector console for the first time, next you'll Configuring Agentless Collector. Otherwise, next you'll see The Agentless Collector dashboard. Configuring Agentless Collector Application Discovery Service Agentless Collector (Agentless Collector) is an Amazon Linux 2 based virtual machine (VM). The following section describes how to configure a collector VM on the Agentless Collector console's Configure Agentless Collector page. To configure a collector VM on the Configure Agentless Collector page 1. For Collector name, enter a name for the collector to identify it. The name can contain spaces but it cannot contain special characters. 2. Under Data synchronization, enter the AWS access key and secret key for the AWS account IAM user to specify as the destination account to receive the data discovered by the collector. For information about the requirements for the IAM user, see Deploying Application Discovery Service Agentless Collector. Accessing the collector console 40 AWS Application Discovery Service User Guide a. b. For AWS access-key, enter the access key of the AWS account IAM user that you're specifying as the destination account. For AWS secret-key, enter the secret key of the AWS account IAM user that you are you're specifying as the destination account. c. (Optional) If your network requires the use of a proxy to access AWS, enter the proxy host, proxy port, and, optionally, the credentials needed to authenticate with your existing proxy server. 3. Under Agentless Collector password, set up a password to use to authenticate access to Agentless Collector. • Passwords are case-sensitive • Passwords must be between 8 and 64 characters in length • Passwords must contain at least one character from each of the following four categories: • Lowercase letters (a-z) • Uppercase letters (A-Z) • Numbers (0-9) • Non-alphanumeric characters (@$!#%*?&) • Passwords cannot contain special characters other than the following ones: @$!#%*?& a. For Agentless Collector password, enter a password to use to authenticate access to the collector. b. For Re-enter Agentless Collector password, for verification, enter the password again. 4. Under Other settings, read the License Agreement. If you agree to accept it, select the check box. 5. To enable automatic updates for Agentless Collector, under Other settings, select Automatically update Agentless Collector. If you do not select this checkbox, you'll need to manually update Agentless Collector as described in Manually updating Application Discovery Service Agentless Collector. 6. Choose Save configurations. The following topics describe optional collector configuration tasks. Optional Configuration Tasks Configuring the collector 41 AWS Application Discovery Service User Guide • (Optional) Configure a static IP address for the Agentless Collector VM • (Optional) Reset the Agentless Collector
appdiscovery-ug-015
appdiscovery-ug.pdf
15
Under Other settings, read the License Agreement. If you agree to accept it, select the check box. 5. To enable automatic updates for Agentless Collector, under Other settings, select Automatically update Agentless Collector. If you do not select this checkbox, you'll need to manually update Agentless Collector as described in Manually updating Application Discovery Service Agentless Collector. 6. Choose Save configurations. The following topics describe optional collector configuration tasks. Optional Configuration Tasks Configuring the collector 41 AWS Application Discovery Service User Guide • (Optional) Configure a static IP address for the Agentless Collector VM • (Optional) Reset the Agentless Collector VM back to using DHCP • (Optional) Configure the Kerberos authentication protocol (Optional) Configure a static IP address for the Agentless Collector VM The following steps describe how to configure a static IP address for the Application Discovery Service Agentless Collector (Agentless Collector) VM. When first installed, the collector VM is configured to use the Dynamic Host Configuration Protocol (DHCP). Note The Agentless Collector supports IPv4. It does not support IPv6. Agentless Collector version 2 To configure a static IP address for the collector VM 1. Collect the following network information from VMware vCenter: • Static IP address – An unsigned IP address in the subnet. For example, 192.168.1.138. • CIDR netmask – To get the CIDR netmask, check the IP address setting of the VMware vCenter host that hosts the collector VM. For example, /24. • Default Gateway – To get the default gateway, check the IP address setting of the VMware vCenter host that hosts the collector VM. For example, 192.168.1.1. • Primary DNS – To get the primary DNS, check the IP address setting of the VMware vCenter host that hosts the collector VM. For example, 192.168.1.1. • (Optional) Secondary DNS • (Optional) Local domain name – This allows the collector to reach the vCenter host URL without the domain name. 2. Open the collector’s VM console and sign in as ec2-user using the password collector as shown in the following example. username: ec2-user password: collector (Optional) Configure a static IP address for the collector VM 42 AWS Application Discovery Service User Guide 3. Disable the network interface, by entering the following command in the remote terminal. sudo ip link set ens192 down 4. Update the interface configuration by using the following steps. a. Open 10-cloud-init-ens192.network in the vi editor by using the following command. sudo vi /etc/systemd/network/10-cloud-init-ens192.network b. Update the values, as shown in the following example, with the information that you collected in the Collect network information step. [Match] Name=ens192 [Network] DHCP=no Address=static-ip-value/CIDR-netmask Gateway=gateway-value DNS=dnsserver-value 5. Update the Domain Name System (DNS) using the following steps. a. Open the resolv.conf file in vi using the following command. sudo vi /etc/resolv.conf b. Update the resolv.conf file in vi using the following command. search localdomain-name options timeout:2 attempts:5 nameserver dnsserver-value The following example shows an edited resolv.conf file. search vsphere.local options timeout:2 attempts:5 nameserver 192.168.1.1 6. Enable the network interface, by entering the following command. (Optional) Configure a static IP address for the collector VM 43 AWS Application Discovery Service User Guide sudo ip link set ens192 up 7. Reboot the VM as shown in the following example. sudo reboot 8. Verify your network settings using the following steps. a. Check if the IP address is configured correctly, by entering the following commands. ifconfig ip addr show b. Check that the gateway was added correctly, by entering the following command. route -n The output should be similar to the following example. Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0 172.17.0.0 0.0.0.0 255.255.0.0 U 0 0 0 docker0 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 c. Verify that you can ping a public URL, by entering the following command. ping www.google.com d. Verify that you can ping the vCenter IP address or host name as shown in the following example. ping vcenter-host-url (Optional) Configure a static IP address for the collector VM 44 AWS Application Discovery Service Agentless Collector version 1 User Guide To configure a static IP address for the collector VM 1. Collect the following network information from VMware vCenter: • Static IP address – An unsigned IP address in the subnet. For example, 192.168.1.138. • Network mask – To get the network mask, check the IP address setting of the VMware vCenter host that hosts the collector VM. For example, 255.255.255.0. • Default Gateway – To get the default gateway, check the IP address setting of the VMware vCenter host that hosts the collector VM. For example, 192.168.1.1. • Primary DNS – To get the primary DNS, check the IP address setting of the VMware vCenter host that hosts the collector VM. For example, 192.168.1.1. • (Optional) Secondary DNS • (Optional) Local domain name
appdiscovery-ug-016
appdiscovery-ug.pdf
16
An unsigned IP address in the subnet. For example, 192.168.1.138. • Network mask – To get the network mask, check the IP address setting of the VMware vCenter host that hosts the collector VM. For example, 255.255.255.0. • Default Gateway – To get the default gateway, check the IP address setting of the VMware vCenter host that hosts the collector VM. For example, 192.168.1.1. • Primary DNS – To get the primary DNS, check the IP address setting of the VMware vCenter host that hosts the collector VM. For example, 192.168.1.1. • (Optional) Secondary DNS • (Optional) Local domain name – This allows the collector to reach the vCenter host URL without the domain name. 2. Open the collector’s VM console and sign in as ec2-user using the password collector as shown in the following example. username: ec2-user password: collector 3. Disable the network interface, by entering the following command in the remote terminal. sudo /sbin/ifdown eth0 4. Update the interface eth0 configuration using the following steps. a. Open ifcfg-eth0 in the vi editor using the following command. sudo vi /etc/sysconfig/network-scripts/ifcfg-eth0 b. Update the interface values, as shown in the following example, with the information that you collect in the Collect network information step. DEVICE=eth0 BOOTPROTO=static ONBOOT=yes (Optional) Configure a static IP address for the collector VM 45 AWS Application Discovery Service User Guide IPADDR=static-ip-value NETMASK=netmask-value GATEWAY=gateway-value TYPE=Ethernet USERCTL=yes PEERDNS=no RES_OPTIONS="timeout:2 attempts:5" 5. Update the Domain Name System (DNS) using the following steps. a. Open the resolv.conf file in vi using the following command. sudo vi /etc/resolv.conf b. Update the resolv.conf file in vi using the following command. search localdomain-name options timeout:2 attempts:5 nameserver dnsserver-value The following example shows an edited resolv.conf file. search vsphere.local options timeout:2 attempts:5 nameserver 192.168.1.1 6. Enable the network interface, by entering the following command. sudo /sbin/ifup eth0 7. Reboot the VM as shown in the following example. sudo reboot 8. Verify your network settings using the following steps. a. Check if the IP address is configured correctly, by entering the following commands. ifconfig ip addr show b. Check that the gateway was added correctly, by entering the following command. (Optional) Configure a static IP address for the collector VM 46 AWS Application Discovery Service User Guide route -n The output should be similar to the following example. Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0 172.17.0.0 0.0.0.0 255.255.0.0 U 0 0 0 docker0 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 c. Verify that you can ping a public URL, by entering the following command. ping www.google.com d. Verify that you can ping the vCenter IP address or host name as shown in the following example. ping vcenter-host-url (Optional) Reset the Agentless Collector VM back to using DHCP The following steps describe how to reconfigure the Agentless Collector VM to use DHCP. Agentless Collector version 2 To configure the collector VM to use DHCP 1. Disable the network interface by running the following command in the remote terminal. sudo ip link set ens192 down 2. Update the interface configuration by using the following steps. a. Open the 10-cloud-init-ens192.network file in the vi editor by using the following command. (Optional) Reset the collector VM back to using DHCP 47 AWS Application Discovery Service User Guide sudo vi /etc/systemd/network/10-cloud-init-ens192.network b. Update the values as shown in the following example. [Match] Name=ens192 [Network] DHCP=yes [DHCP] ClientIdentifier=mac 3. Reset the DNS setting, by entering the following command. echo "" | sudo tee /etc/resolv.conf 4. Enable the network interface, by entering the following command. sudo ip link set ens192 up 5. Reboot the collector VM as shown in the following example. sudo reboot Agentless Collector version 1 To configure the collector VM to use DHCP 1. Disable the network interface by running the following command in the remote terminal. sudo /sbin/ifdown eth0 2. Update the network configuration by using the following steps. a. Open the ifcfg-eth0 file in the vi editor using the following command. sudo /sbin/ifdown eth0 b. Update the values in the ifcfg-eth0 file as shown in the following example. (Optional) Reset the collector VM back to using DHCP 48 AWS Application Discovery Service User Guide DEVICE=eth0 BOOTPROTO=dhcp ONBOOT=yes TYPE=Ethernet USERCTL=yes PEERDNS=yes DHCPV6C=yes DHCPV6C_OPTIONS=-nw PERSISTENT_DHCLIENT=yes RES_OPTIONS="timeout:2 attempts:5" 3. Reset the DNS setting by entering the following command. echo "" | sudo tee /etc/resolv.conf 4. Enable the network interface by entering the following command. sudo /sbin/ifup eth0 5. Reboot the collector VM as shown in the following example. sudo reboot (Optional) Configure the Kerberos authentication protocol If your OS server supports the Kerberos authentication protocol, then you can use this protocol to connect to your server. To do so, you must configure the Application Discovery Service Agentless Collector VM. The following steps describe how to configure the Kerberos
appdiscovery-ug-017
appdiscovery-ug.pdf
17
BOOTPROTO=dhcp ONBOOT=yes TYPE=Ethernet USERCTL=yes PEERDNS=yes DHCPV6C=yes DHCPV6C_OPTIONS=-nw PERSISTENT_DHCLIENT=yes RES_OPTIONS="timeout:2 attempts:5" 3. Reset the DNS setting by entering the following command. echo "" | sudo tee /etc/resolv.conf 4. Enable the network interface by entering the following command. sudo /sbin/ifup eth0 5. Reboot the collector VM as shown in the following example. sudo reboot (Optional) Configure the Kerberos authentication protocol If your OS server supports the Kerberos authentication protocol, then you can use this protocol to connect to your server. To do so, you must configure the Application Discovery Service Agentless Collector VM. The following steps describe how to configure the Kerberos authentication protocol on your Application Discovery Service Agentless Collector VM. To configure the Kerberos authentication protocol on your collector VM 1. Open the collector’s VM console and sign in as ec2-user using the password collector as shown in the following example. username: ec2-user password: collector (Optional) Configure Kerberos 49 AWS Application Discovery Service User Guide 2. Open the krb5.conf configuration file in the /etc folder. To do so, you can use the following code example. cd /etc sudo nano krb5.conf 3. Update the krb5.conf configuration file with the following information. [libdefaults] forwardable = true dns_lookup_realm = true dns_lookup_kdc = true ticket_lifetime = 24h renew_lifetime = 7d default_realm = default_Kerberos_realm [realms] default_Kerberos_realm = { kdc = KDC_hostname server_name = server_hostname default_domain = domain_to_expand_hostnames } [domain_realm] .domain_name = default_Kerberos_realm domain_name = default_Kerberos_realm Save the file and exit the text editor. 4. Reboot the collector VM as shown in the following example. sudo reboot Using the Agentless Collector Network Data Collection module The Network Data Collection module makes it possible for you to discover dependencies among servers in your on-premises data center. This network data accelerates your migration planning by providing visibility into how applications communicate across servers. The Network Data Collection module connects to the servers that the VMware vCenter module identifies, and analyzes source IP to destination IP/port traffic for those servers. Using the Network Data Collection module 50 AWS Application Discovery Service Topics • Setting up the Network Data Collection module • Network data collection attempts • Server status in the Network Data Collection module User Guide Setting up the Network Data Collection module The Network Data Collection module collects network data for the server inventory that comes from the VMware vCenter module. Therefore, to use the Network Data Collection module, first set up the VMware vCenter module. For instructions, follow the guidance in the following topics: 1. the section called “Deploying a collector” 2. the section called “Accessing the collector console” 3. the section called “Configuring the collector” 4. the section called “Using the VMware data collection module” To set up the Network Data Collection module 1. On the Agentless Collector dashboard, in the Network Data Collection section, choose View network connections. 2. On the Network connections page, choose Edit collector. 3. In the credentials section, enter at least one set of credentials. You can enter up to 10 sets of credentials. The first time the module attempts to collect data for a server, it tries all of the credentials until it finds a set of credentials that works; it then saves that set and uses it again in subsequent attempts. For information about setting up credentials, see the section called “Setting up credentials”. 4. In the Data collection preferences section, to automatically start collecting data when a server reboots, select Start data collection automatically. 5. If you haven't set up WinRM certificates, select Disable WinRM certificate checks. 6. Choose Save. 7. Collection happens on the servers every 15 seconds. To see the details of the collection attempts for a given server, select the checkbox to the left of the server in the Servers table. Setting up the Network Data Collection module 51 AWS Application Discovery Service Setting up credentials User Guide The Network Data Collection module uses WinRM to collect data from Windows servers. It uses SNMPv2 and SNMPv3 to collect data from Linux servers. WinRM credentials: • Specify the username and password of a Windows account that has the following: • Read access to the \root\standardcimv2 namespace • Read permissions for MSFT_NetTCPConnection class • Remote WMI access • We recommend that you create a dedicated service account with minimal required permissions. • Avoid using domain administrator or local administrator accounts. • Port 5986 (HTTPS) must be open between collector and target servers. • Avoid disabling WinRM certificate check. For information about setting up WinRM certificates, see the section called “Addressing self-signed certification problems when configuring WinRM certificates”. SNMPv2 credentials: • Provide a read-only community string that can access 1.3.6.1.2.1.6.13.* OID • SNMPv3 is preferable to SNMPv2 because of the improved security in SNMPv3 • Port 161/UDP must be open between collector and target servers • Use complex, non-default community strings • Avoid common strings like "public" or
appdiscovery-ug-018
appdiscovery-ug.pdf
18
with minimal required permissions. • Avoid using domain administrator or local administrator accounts. • Port 5986 (HTTPS) must be open between collector and target servers. • Avoid disabling WinRM certificate check. For information about setting up WinRM certificates, see the section called “Addressing self-signed certification problems when configuring WinRM certificates”. SNMPv2 credentials: • Provide a read-only community string that can access 1.3.6.1.2.1.6.13.* OID • SNMPv3 is preferable to SNMPv2 because of the improved security in SNMPv3 • Port 161/UDP must be open between collector and target servers • Use complex, non-default community strings • Avoid common strings like "public" or "private" • Treat community strings like passwords SNMPv3 credentials • Provide a username/password and auth/privacy details with read-only permission that can access 1.3.6.1.2.1.6.13.* OID. • Port 161/UDP must be open between collector and target servers • Enable both authentication and privacy • Use strong authentication protocols (SHA preferred over MD5) Setting up the Network Data Collection module 52 AWS Application Discovery Service User Guide • Use strong encryption protocols (AES preferred over DES) • Use complex passwords for both auth and privacy • Use unique usernames (avoid common names) General best practices for Credential Management • Store credentials securely • Regularly rotate all credentials • Use password managers or secure vaults • Monitor credential usage • Follow the principle of least privilege and only grant the minimum necessary permissions needed Network data collection attempts When a new server is discovered, the collector attempts each configured credential for each IP address. After the collector finds a valid credential, it only uses that credential. After two consecutive failures, the collector attempts to collect networking data for a server after 30 minutes, 2 hours, 8 hours, and then 24 hours. After 6 failed attempts, the collector continues to try all configured credentials once every day. To resolve the issue, either edit the current credentials or add additional ones by choosing Edit collector, or make changes to the target server being monitored. Server status in the Network Data Collection module The following table explains the collection status values. Status Meaning Collecting or Collected Erroring or Errored The last collection attempt for network connections was successful. The last collection attempt for network connections failed due to either a networkin g or permissions problem. For additional information, select the checkbox to the left of the server that has the error. Network data collection attempts 53 AWS Application Discovery Service User Guide Status Skipped No data Pending Meaning Servers for which no valid credentials were provided. Update or configure additional server credentials. Data collection for the server has not started. To start collecting data, choose Start collector . Collection has been started but no collectio n attempts have been made. Wait a few minutes, and then refresh the list. Using the VMware vCenter Agentless Collector data collection module This section describes the Application Discovery Service Agentless Collector (Agentless Collector) VMware vCenter data collection module, which is used to collect server inventory, profile, and utilization data from your VMware VMs. Topics • Setting up the Agentless Collector data collection module for VMware vCenter • Viewing VMware data collection details • Controlling the scope of vCenter data collection • Data collected by the Agentless Collector VMware vCenter data collection module Setting up the Agentless Collector data collection module for VMware vCenter This section describes how to set up the Agentless Collector VMware vCenter data collection module to collect server inventory, profile, and utilization data from your VMware VMs. Using the VMware data collection module 54 AWS Application Discovery Service User Guide Note Before starting vCenter setup, make sure you can provide vCenter credentials with Read and View permissions set for the System group. To set up the VMware vCenter data collection module 1. On the Agentless Collector dashboard page, under Data collection, choose Set up in the VMware vCenter section. 2. On the Set up VMware vCenter data collection page, perform the following: a. Under vCenter credentials: i. ii. For vCenter URL/IP, enter the IP address of your VMware vCenter Server host. For vCenter Username, enter the name of a local or domain user that the collector uses to communicate with vCenter. For domain users, use the form domain\username or username@domain. iii. For vCenter Password, enter the local or domain user password. b. Under Data collection preferences: • To automatically start collecting data immediately following a successful setup, select Start data collection automatically. c. Choose Set up. Next, you'll see the VMware data collection details page, which is described in the next topic. Viewing VMware data collection details The VMware data collection details page shows details about the vCenter you set up in Setting up the Agentless Collector data collection module for VMware vCenter. Under Discovered vCenter servers, the vCenter you set up is listed with the following information
appdiscovery-ug-019
appdiscovery-ug.pdf
19
or username@domain. iii. For vCenter Password, enter the local or domain user password. b. Under Data collection preferences: • To automatically start collecting data immediately following a successful setup, select Start data collection automatically. c. Choose Set up. Next, you'll see the VMware data collection details page, which is described in the next topic. Viewing VMware data collection details The VMware data collection details page shows details about the vCenter you set up in Setting up the Agentless Collector data collection module for VMware vCenter. Under Discovered vCenter servers, the vCenter you set up is listed with the following information about the vCenter: • The IP address of the vCenter server. • The number of servers in the vCenter. Viewing VMware data collection details 55 AWS Application Discovery Service User Guide • The status of the data collection. • How long since the last update. Choose Remove vCenter server to remove the displayed vCenter server and return you to the Set up VMware vCenter data collection page. If you did not choose to start data collection automatically, you can start data collection by using the Start data collection button on this page. After data collection starts, the start button changes to Stop data collection. If the Collection status column shows Collecting, data collection has started. You view the collected data in the AWS Migration Hub console. If you’re collecting data for a VMware vCenter server inventory, you can access data that appears in the console approximately 15 minutes after turning on data collection. You can choose View servers in Migration Hub on this page to open the Migration Hub console, if your access to the internet is not blocked. Whether you choose this button or not, for information about how to access the Migration Hub console, see Viewing your collected data. The following are the guidelines for recommended length of data collection according to migration planning activities: • TCO (total cost of ownership) - 2 to 4 weeks • Migration planning - 2 to 6 weeks Controlling the scope of vCenter data collection The vCenter user requires read-only permissions on each ESX host or VM to inventory using Application Discovery Service. Using the permission settings, you can control which hosts and VMs are included in the data collection. You can either allow all hosts and VMs under the current vCenter to be inventoried, or grant permissions on a case-by-case basis. Note As a security best practice, we recommend against granting additional, unneeded permissions to the vCenter user of the Application Discovery Service. Controlling data collection scope 56 AWS Application Discovery Service User Guide The following procedures describe configuration scenarios ordered from least granular to most granular. These procedures are for vSphere Client v6.7.0.2. The procedures for other versions of the client might be different, depending on which version of the vSphere client you are using. To discover data about all ESX hosts and VMs under the current vCenter 1. In your VMware vSphere client, choose vCenter and then choose either Hosts and Clusters or VMs and Templates. 2. Choose a datacenter resource and then choose Permissions. 3. Choose the vCenter user and then choose the symbol to add, edit, or remove a user role. 4. Choose Read-only from the Role menu. 5. Choose Propagate to children and then choose OK. To discover data about a specific ESX host and all of its child objects 1. In your VMware vSphere client, choose vCenter and then choose either Hosts and Clusters or VMs and Templates. 2. Choose Related Objects, Hosts. 3. Open the context (right-click) menu for the host name and choose All vCenter Actions, Add Permission. 4. Under Add Permission, add the vCenter user to the host. For Assigned Role, choose Read- only. 5. Choose Propagate to children, OK. To discover data about a specific ESX host or child VM 1. In your VMware vSphere client, choose vCenter and then choose either Hosts and Clusters or VMs and Templates. 2. Choose Related Objects. 3. Choose Hosts (showing a list of ESX hosts known to vCenter) or Virtual Machines (showing a list of VMs across all ESX hosts). 4. Open the context (right-click) menu for the host or VM name and choose All vCenter Actions, Add Permission. 5. Under Add Permission, add the vCenter user to the host or VM. For Assigned Role, choose Read-only, . Controlling data collection scope 57 AWS Application Discovery Service 6. Choose OK. Note User Guide If you chose Propagate to children, you can still remove the read-only permission from ESX hosts and VMs on a case-by-case basis. This option has no effect on inherited permissions applying to other ESX hosts and VMs. Data collected by the Agentless Collector VMware vCenter data collection module The following information describes the data that's collected by the Application Discovery Service
appdiscovery-ug-020
appdiscovery-ug.pdf
20
All vCenter Actions, Add Permission. 5. Under Add Permission, add the vCenter user to the host or VM. For Assigned Role, choose Read-only, . Controlling data collection scope 57 AWS Application Discovery Service 6. Choose OK. Note User Guide If you chose Propagate to children, you can still remove the read-only permission from ESX hosts and VMs on a case-by-case basis. This option has no effect on inherited permissions applying to other ESX hosts and VMs. Data collected by the Agentless Collector VMware vCenter data collection module The following information describes the data that's collected by the Application Discovery Service Agentless Collector (Agentless Collector) VMware vCenter data collection module. For information about setting up data collection, see Setting up the Agentless Collector data collection module for VMware vCenter. Table legend for Agentless Collector VMware vCenter collected data: • Collected data is in measurements of kilobytes (KB) unless stated otherwise. • Equivalent data in the Migration Hub console is reported in megabytes (MB). • Data fields denoted with an asterisk (*) are available only in the .csv files that are produced from the Application Discovery Service API export function. The Agentless Collector supports data export using the AWS CLI. To export collected data using the AWS CLI, follow the instructions described under Export System Performance Data for All Servers on the page Export Collected Data in the Application Discovery Service User Guide. • The polling period is in intervals of approximately 60 minutes. • Data fields denoted with a double asterisk (**) currently return a null value. Data field Description applicationConfigurationId* ID of the migration application the VM is grouped under. Data collected by the VMware module 58 AWS Application Discovery Service User Guide Data field avgCpuUsagePct avgDiskBytesReadPerSecond avgDiskBytesWrittenPerSecond avgDiskReadOpsPerSecond** avgDiskWriteOpsPerSecond** Description Average percentage of CPU usage over polling period. Average number of bytes read from disk over polling period. Average number of bytes written to disk over polling period. Average number of read I/O operations per second null. Average number of write I/O operations per second. avgFreeRAM Average free RAM expressed in MB. avgNetworkBytesReadPerSecond avgNetworkBytesWrittenPerSecond Average amount of throughput of bytes read per second. Average amount of throughput of bytes written per second. computerManufacturer Vendor reported by the ESXi host. computerModel configId configType connectorId cpuType datacenterId hostId* Computer model reported by the ESXi host. ID assigned by Application Discovery Service to the discovered VM. Type of resource discovered. ID of the virtual appliance. vCPU for a VM, actual model for a host. ID of the vCenter. ID of the VM host. Data collected by the VMware module 59 AWS Application Discovery Service User Guide Data field hostName hypervisor id lastModifiedTimeStamp* macAddress manufacturer maxCpuUsagePct maxDiskBytesReadPerSecond maxDiskBytesWrittenPerSecond maxDiskReadOpsPerSecond** maxDiskWriteOpsPerSecond** maxNetworkBytesReadPerSecond maxNetworkBytesWrittenPerSecond memoryReservation* Description Name of host running the virtualization software. Type of hypervisor. ID of server. Latest date and time of data collection before data export. MAC address of the VM. Maker of the virtualization software. Max. percentage of CPU usage during polling period. Max. number of bytes read from disk over polling period. Max. number of bytes written to disk over polling period. Max. number of read I/O operations per second. Max. number of write I/O operations per second. Max. amount of throughput of bytes read per second. Max. amount of throughput of bytes written per second. Limit to avoid overcommitment of memory on VM. Data collected by the VMware module 60 AWS Application Discovery Service User Guide Data field moRefId name* numCores numCpus numDisks** Description Unique vCenter Managed Object Reference ID. Name of VM or network (user specified). Number of CPU cores assigned to VM. Number of CPU sockets on the ESXi host. Number of disks on VM. numNetworkCards** Number of network cards on VM. osName osVersion portGroupId* portGroupName* powerState* serverId smBiosId* state* toolsStatus totalDiskFreeSize totalDiskSize totalRAM type Operating system name on VM. Operating system version on VM. ID of group of member ports of VLAN. Name of group of member ports of VLAN. Status of power. Application Discovery Service assigned ID to the discovered VM. ID/version of the system management BIOS. Status of the virtual appliance. Operational state of VMware tools Free disk space expressed in MB. Available for vCenter Server 7.0 and later versions. Total capacity of disk expressed in MB. Total amount of RAM available on VM in MB. Type of host. Data collected by the VMware module 61 AWS Application Discovery Service User Guide Data field vCenterId vCenterName* virtualSwitchName* vmFolderPath vmName Description Unique ID number of a VM. Name of the vCenter host. Name of the virtual switch. Directory path of VM files. Name of the virtual machine. Using the database and analytics data collection module This section describes how to set up, configure, and use a database and analytics data collection module. You can use this data collection module to connect to your data environment
appdiscovery-ug-021
appdiscovery-ug.pdf
21
expressed in MB. Total amount of RAM available on VM in MB. Type of host. Data collected by the VMware module 61 AWS Application Discovery Service User Guide Data field vCenterId vCenterName* virtualSwitchName* vmFolderPath vmName Description Unique ID number of a VM. Name of the vCenter host. Name of the virtual switch. Directory path of VM files. Name of the virtual machine. Using the database and analytics data collection module This section describes how to set up, configure, and use a database and analytics data collection module. You can use this data collection module to connect to your data environment and collect metadata and performance metrics from your on-premises databases and analytics servers. For information about the metrics that you can collect with this module, see Data collected by the Agentless Collector database and analytics data collection module. At a high level, when using the database and analytics data collection module, you take the following steps. 1. Complete the prerequisite steps, configure your IAM user, and create the AWS DMS data collector. 2. Configure data forwarding to make sure that your data collection module can send the collected metadata and performance metrics to AWS. 3. Add your LDAP servers and use them to discover OS servers in your data environment. Alternatively, add your OS servers manually or use the Using the VMware data collection module. 4. Configure connection credentials to your OS servers and then use them to discover database servers. 5. Configure connection credentials to your database and analytics servers and then run the data collection. For more information, see Database and analytics data collection. 6. View collected data in the AWS DMS console and use it to generate target recommendations for a migration to the AWS Cloud. For more information, see Database and analytics data collection. Using the database and analytics data collection module 62 AWS Application Discovery Service Topics • Supported OS, database, and analytics servers • Creating the AWS DMS data collector • Configuring data forwarding • Adding your LDAP and OS servers • Discovering your database servers User Guide • Data collected by the Agentless Collector database and analytics data collection module Supported OS, database, and analytics servers The database and analytics data collection module in the Agentless Collector supports Microsoft Active Directory LDAP servers. This data collection module supports the following OS servers. • Amazon Linux 2 • CentOS Linux version 6 and higher • Debian version 10 and higher • Red Hat Enterprise Linux version 7 and higher • SUSE Linux Enterprise Server version 12 and higher • Ubuntu version 16.01 and higher • Windows Server 2012 and higher • Windows XP and higher Also, the database and analytics data collection module supports the following database servers. • Microsoft SQL Server version 2012 and up to 2019 • MySQL version 5.6 and up to 8 • Oracle version 11g Release 2 and up to 12c, 19c, and 21c • PostgreSQL version 9.6 and up to 13 Supported servers 63 AWS Application Discovery Service User Guide Creating the AWS DMS data collector Your database and analytics data collection module uses an AWS DMS data collector to interact with the AWS DMS console. You can view the collected data in the AWS DMS console, or use it to determine the right-sized AWS target engine. For more information, see Using the AWS DMS Fleet Advisor Target Recommendations feature. Before you create an AWS DMS data collector, create an IAM role that your AWS DMS data collector uses to access your Amazon S3 bucket. You created this Amazon S3 bucket when you completed the prerequisites in Prerequisites for Agentless Collector. To create an IAM role for your AWS DMS data collector to access Amazon S3 1. Sign in to the AWS Management Console and open the IAM console at https:// console.aws.amazon.com/iam/. 2. In the navigation pane, choose Roles, then choose Create role. 3. On the Select trusted entity page, for Trusted entity type, choose AWS Service. For Use cases for other AWS services, choose DMS. 4. Select the DMS check box and choose Next. 5. On the Add permissions page, choose FleetAdvisorS3Policy that you created before. Choose Next. 6. On the Name, review, and create page, enter FleetAdvisorS3Role for Role name, then choose Create role. 7. Open the role that you created, and choose the Trust relationships tab. Choose Edit trust policy. 8. On the Edit trust policy page, paste the following JSON into the editor, replacing the existing code. { "Version": "2012-10-17", "Statement": [{ "Sid": "", "Effect": "Allow", "Principal": { "Service": [ "dms.amazonaws.com", "dms-fleet-advisor.amazonaws.com" Creating the AWS DMS data collector 64 AWS Application Discovery Service User Guide ] }, "Action": "sts:AssumeRole" }] } 9. Choose Update policy. Now, create a data collector in the AWS DMS console. To create an AWS DMS data collector 1. Sign
appdiscovery-ug-022
appdiscovery-ug.pdf
22
FleetAdvisorS3Role for Role name, then choose Create role. 7. Open the role that you created, and choose the Trust relationships tab. Choose Edit trust policy. 8. On the Edit trust policy page, paste the following JSON into the editor, replacing the existing code. { "Version": "2012-10-17", "Statement": [{ "Sid": "", "Effect": "Allow", "Principal": { "Service": [ "dms.amazonaws.com", "dms-fleet-advisor.amazonaws.com" Creating the AWS DMS data collector 64 AWS Application Discovery Service User Guide ] }, "Action": "sts:AssumeRole" }] } 9. Choose Update policy. Now, create a data collector in the AWS DMS console. To create an AWS DMS data collector 1. Sign in to the AWS Management Console and open the AWS DMS console at https:// console.aws.amazon.com/dms/v2/. 2. Choose the AWS Region that you set as your Migration Hub home Region. For more information, see Sign in to Migration Hub and choose a home Region. 3. In the navigation pane, choose Data collectors under Discover. The Data collectors page opens. 4. Choose Create data collector. The Create data collector page opens. 5. 6. For Name in the General configuration section, enter a name of your data collector. In the Connectivity section, choose Browse S3. Choose the Amazon S3 bucket that you created before from the list. 7. For IAM role, choose FleetAdvisorS3Role that you created before. 8. Choose Create data collector. Configuring data forwarding After you create the required AWS resources, configure data forwarding from the database and analytics data collection module to your AWS DMS collector. To configure data forwarding 1. Open the Agentless Collector console. For more information, see Accessing the collector console. 2. Choose View Database and analytics collector. 3. On the Dashboard page, choose Configure data forwarding in the Data forwarding section. Configuring data forwarding 65 AWS Application Discovery Service User Guide 4. 5. For AWS Region, IAM access key ID, and IAM secret access key, your Agentless Collector uses the values that you configured before. For more information, see Sign in to Migration Hub and choose a home Region and Deploying a collector. For Connected DMS data collector, choose your data collector that you created in the AWS DMS console. 6. Choose Save. After you configure data forwarding, check the Data forwarding section on the Dashboard page. Make sure that your database and analytics data collection module displays Connected for Access to DMS and Access to S3. Adding your LDAP and OS servers The database and analytics data collection module uses LDAP in Microsoft Active Directory to gather information about the OS, database, and analytics servers in your network. Lightweight Directory Access Protocol (LDAP) is an open standard application protocol. You can use this protocol to access and maintain distributed directory information services over your IP network. You can add an existing LDAP server into your database and analytics data collection module to automatically discover OS servers in your network. If you don't use LDAP, you can add OS servers manually. To add an LDAP server to your database and analytics data collection module 1. Open the Agentless Collector console. For more information, see Accessing the collector console. 2. Choose View Database and analytics collector, then choose LDAP servers under Discovery in the navigation pane. 3. Choose Add LDAP server. The Add LDAP server page opens. 4. 5. 6. 7. For Hostname, enter the hostname of your LDAP server. For Port, enter the port number that is used for LDAP requests. For User name, enter the user name that you use to connect to your LDAP server. For Password, enter the password that you use to connect to your LDAP server. Adding your LDAP and OS servers 66 AWS Application Discovery Service User Guide 8. (Optional) Choose Verify connection to make sure that you added your LDAP server credentials correctly. Alternatively, you can verify your LDAP server connection credentials later, from the list on the LDAP servers page. 9. Choose Add LDAP server. 10. On the LDAP servers page, select your LDAP server from the list and choose Discover OS servers. Important For OS discovery, the data collection module needs credentials for the domain server to run requests using the LDAP protocol. The database and analytics data collection module connects to your LDAP server and discovers your OS servers. After the data collection module completes the OS servers discovery, you can see the list of discovered OS servers by choosing View OS servers. Alternatively, you can add your OS servers manually or import the list of servers from a comma- separated values (CSV) file. Also, you can use the VMware vCenter Agentless Collector data collection module to discover your OS servers. For more information, see Using the VMware data collection module. To add an OS server to your database and analytics data collection module 1. On the Database and analytics collector page, choose OS servers under Discovery
appdiscovery-ug-023
appdiscovery-ug.pdf
23
OS servers. After the data collection module completes the OS servers discovery, you can see the list of discovered OS servers by choosing View OS servers. Alternatively, you can add your OS servers manually or import the list of servers from a comma- separated values (CSV) file. Also, you can use the VMware vCenter Agentless Collector data collection module to discover your OS servers. For more information, see Using the VMware data collection module. To add an OS server to your database and analytics data collection module 1. On the Database and analytics collector page, choose OS servers under Discovery in the navigation pane. 2. Choose Add OS server. The Add OS server page opens. 3. Provide your OS server credentials. a. For OS type, choose the operating system of your server. b. For Hostname / IP, enter the hostname or IP address of your OS server. c. For Port, enter the port number that is used for remote queries. d. For Authentication type, choose the authentication type that your OS server uses. e. For User name, enter the user name that you use to connect to your OS server. f. For Password, enter the password that you use to connect to your OS server. g. Choose Verify to make sure that you added your OS server credentials correctly. Adding your LDAP and OS servers 67 AWS Application Discovery Service User Guide 4. (Optional) Add multiple OS servers from a CSV file. a. Choose Bulk import OS servers from CSV. b. Choose Download template to save a CSV file that includes a template that you can customize. c. Enter the connection credentials for your OS servers into the file according to the template. The following example shows how you can provide OS server connection credentials in a CSV file. OS type,Hostname/IP,Port,Authentication type,Username,Password Linux,192.0.2.0,22,Key-based authentication,USER-EXAMPLE,ANPAJ2UCCR6DPCEXAMPLE Windows,203.0.113.0,,NTLM,USER2-EXAMPLE,AKIAIOSFODNN7EXAMPLE Save your CSV file after you add credentials for all your OS servers. d. Choose Browse, then choose your CSV file. 5. Choose Add OS server. 6. After you add credentials for all OS servers, select your OS servers and choose Discover database servers. Discovering your database servers This section guides you through the steps you must take to configure your operating system and database servers. Then, you'll discover your servers and have the option to add a database or analytics server manually. For database discovery, you must create users for your source databases with the minimum permissions required for the data collection module. For more information, see Creating database users for AWS DMS Fleet Advisor in the AWS DMS User Guide. Configuring set up To discover the databases running on the previously added OS Servers, the data collection module requires access to the operating system and database servers. This page outlines the steps you need to take to make sure that your database is accessible at the port that you specified in connection settings. You'll also turn on the remote authentication on your database server and provide your data collection module with permissions. Discovering your databases 68 AWS Application Discovery Service Configure set up on Linux User Guide Complete the following procedure to configure set up to discover database servers on Linux. To configure Linux to discover database servers 1. Provide sudo access to the ss and netstat commands. The following code example grants sudo access to the ss and netstat commands. sudo bash -c "cat << EOF >> /etc/sudoers.d/username username ALL=(ALL) NOPASSWD: /usr/bin/ss username ALL=(ALL) NOPASSWD: /usr/bin/netstat EOF" In the preceding example, replace username with the name of the Linux user that you specified in OS server connection credentials. The preceding example uses the /usr/bin/ path to the ss and netstat commands. This path might be different in your environment. To determine the path to the ss and netstat commands, run the which ss and which netstat commands. 2. Configure your Linux servers to allow running remote SSH scripts and allow the Internet Control Message Protocol (ICMP) traffic. Configure set up on Microsoft Windows Complete the following procedure to configure set up to discover database servers on Microsoft Windows. To configure Microsoft Windows to discover database servers 1. Provide credentials with grants to run Windows Management Instrumentation (WMI) and WMI Query Language (WQL) queries and read the registry. 2. Add the Windows user that you specified in OS server connection credentials to the following groups: Distributed COM Users, Performance Log Users, Performance Monitor Users, and Event Log Readers. To do so, use the following code example. net localgroup "Distributed COM Users" username /ADD net localgroup "Performance Log Users" username /ADD net localgroup "Performance Monitor Users" username /ADD Discovering your databases 69 AWS Application Discovery Service User Guide net localgroup "Event Log Readers" username /ADD In the preceding example, replace username with the name of the Windows user that you specified in OS server
appdiscovery-ug-024
appdiscovery-ug.pdf
24
queries and read the registry. 2. Add the Windows user that you specified in OS server connection credentials to the following groups: Distributed COM Users, Performance Log Users, Performance Monitor Users, and Event Log Readers. To do so, use the following code example. net localgroup "Distributed COM Users" username /ADD net localgroup "Performance Log Users" username /ADD net localgroup "Performance Monitor Users" username /ADD Discovering your databases 69 AWS Application Discovery Service User Guide net localgroup "Event Log Readers" username /ADD In the preceding example, replace username with the name of the Windows user that you specified in OS server connection credentials. 3. Grant the required permissions for the Windows user that you specified in OS server connection credentials. • For Windows Management and Instrumentation Properties, choose Local Launch and Remote Activation. • For WMI Control, choose the Execute Methods, Enable Account, Remote Enable, and Read Security permissions for the CIMV2, DEFAULT, StandartCimv2, and WMI namespaces. • For WMI plug-in, run winrm configsddl default and then choose Read and Execute. 4. Configure your Windows host by using the following code example. netsh advfirewall firewall add rule name="Open Ports for WinRM incoming traffic" dir=in action=allow protocol=TCP localport=5985, 5986 # Opens ports for WinRM netsh advfirewall firewall add rule name="All ICMP V4" protocol=icmpv4:any,any dir=in action=allow # Allows ICPM traffic Enable-PSRemoting -Force # Enables WinRM Set-Service WinRM -StartMode Automatic # Allows WinRM service to run on host startup Set-Item WSMan:\localhost\Client\TrustedHosts -Value {IP} -Force # Sets the specific IP from which the access to WinRM is allowed winrm set winrm/config/service '@{Negotiation="true"}' # Allow Negosiate auth usage winrm set winrm/config/service '@{AllowUnencrypted="true"}' # Allow unencrypted connection Discovering a database server Complete the following set of tasks to discover and add database servers on the console. To start the discovery of your database servers 1. On the Database and analytics collector page, choose OS servers under Discovery in the navigation pane. Discovering your databases 70 AWS Application Discovery Service User Guide 2. Select the OS servers that include your database and analytics servers, then choose Verify connection on the Actions menu. 3. For servers that have the Connectivity status of Failed, edit the connection credentials. a. Select a single server or multiple servers when they have identical credentials, then choose Edit on the Actions menu. The Edit OS server page opens. b. For Port, enter the port number that is used for remote queries. c. For Authentication type, choose the authentication type that your OS server uses. d. For User name, enter the user name that you use to connect to your OS server. e. For Password, enter the password that you use to connect to your OS server. f. Choose Verify connection to make sure that you updated your OS server credentials correctly. Next, choose Save. 4. After you update credentials for all OS servers, select your OS servers and choose Discover database servers. The database and analytics data collection module connects to your OS servers and discovers the supported database and analytics servers. After the data collection module completes the discovery, you can see the list of discovered database and analytics servers by choosing View database servers. Alternatively, you can add your database and analytics servers to inventory manually. Also, you can import the list of servers from a CSV file. You can skip this step if you already added all your database and analytics servers to the inventory. To add a database or analytics server manually 1. On the Database and analytics collector page, choose Data collection in the navigation pane. 2. Choose Add database server. The Add database server page opens. 3. Provide your database server credentials. a. For Database engine, choose the database engine of your server. For more information, see Supported OS, database, and analytics servers. b. For Hostname / IP, enter the hostname or IP address of your database or analytics server. c. For Port, enter the port where your server runs. d. For Authentication type, choose the authentication type that your database or analytics server uses. Discovering your databases 71 AWS Application Discovery Service User Guide e. For User name, enter the user name that you use to connect to your server. f. For Password, enter the password that you use to connect to your server. g. Choose Verify to make sure that you added your database or analytics server credentials correctly. 4. (Optional) Add multiple servers from a CSV file. a. Choose Bulk import database servers from CSV. b. Choose Download template to save a CSV file that includes a template that you can customize. c. Enter the connection credentials for your database and analytics servers into the file according to the template. The following example shows how you can provide database or analytics server connection credentials in a CSV file. Database engine,Hostname/IP,Port,Authentication type,Username,Password,Oracle service name,Database,Allow public key
appdiscovery-ug-025
appdiscovery-ug.pdf
25
you use to connect to your server. g. Choose Verify to make sure that you added your database or analytics server credentials correctly. 4. (Optional) Add multiple servers from a CSV file. a. Choose Bulk import database servers from CSV. b. Choose Download template to save a CSV file that includes a template that you can customize. c. Enter the connection credentials for your database and analytics servers into the file according to the template. The following example shows how you can provide database or analytics server connection credentials in a CSV file. Database engine,Hostname/IP,Port,Authentication type,Username,Password,Oracle service name,Database,Allow public key retrieval,Use SSL,Trust server certificate Oracle,192.0.2.1,1521,Login/Password authentication,USER- EXAMPLE,AKIAI44QH8DHBEXAMPLE,orcl,,,, PostgreSQL,198.51.100.1,1533,Login/Password authentication,USER2- EXAMPLE,bPxRfiCYEXAMPLE,,postgre,,TRUE, MSSQL,203.0.113.1,1433,Login/Password authentication,USER3- EXAMPLE,h3yCo8nvbEXAMPLE,,,,,TRUE MySQL,2001:db8:4006:812:ffff:200e,8080,Login/Password authentication,USER4- EXAMPLE,APKAEIVFHP46CEXAMPLE,,mysql,TRUE,TRUE, Save your CSV file after you add credentials for all your database and analytics servers. d. Choose Browse, then choose your CSV file. 5. Choose Add database server. 6. After you add credentials for all OS servers, select your OS servers and choose Discover database servers. After you add all your database and analytics servers into the data collection module, add them to the inventory. The database and analytics data collection module can connect to the servers from the inventory and collects metadata and performance metrics. Discovering your databases 72 AWS Application Discovery Service User Guide To add your database and analytics servers to the inventory 1. On the Database and analytics collector page, choose Database servers under Discovery in the navigation pane. 2. Select the database and analytics servers, for which you want to collect metadata and performance metrics. 3. Choose Add to inventory. After you add all database and analytics servers to your inventory, you can start collecting metadata and performance metrics. For more information, see Database and analytics data collection. Data collected by the Agentless Collector database and analytics data collection module The Application Discovery Service Agentless Collector (Agentless Collector) database and analytics data collection module collects the following metrics from your data environment. For information about setting up data collection, see Using the database and analytics data collection module. When you use the database and analytics data collection module to collect Metadata and database capacity, it captures the following metrics. • Available memory on your OS servers • Available storage on your OS servers • Database version and edition • Number of CPUs on your OS servers • Number of schemas • Number of stored procedures • Number of tables • Number of triggers • Number of views • Schema structure After you launch the schema analysis in the AWS DMS console, your data collection module analyzes and displays the following metrics. Data collected by the database and analytics module 73 AWS Application Discovery Service • Database support dates • Number of lines of code • Schema complexity • Similarity of schemas User Guide When you use the database and analytics data collection module to collect Metadata, database capacity, and resource utilization, it captures the following metrics. • I/O throughput on your database servers • Input/output operations per second (IOPS) on your database servers • Number of CPUs that your OS servers use • Memory usage on your OS servers • Storage usage on your OS servers You can use the database and analytics data collection module to collect metadata, capacity, and utilization metrics from your Oracle and SQL Server databases. At the same time, for PostgreSQL and MySQL databases, the data collection module can collect only metadata. Viewing your collected data You can view the data that your Application Discovery Service Agentless Collector (Agentless Collector) collected in the Migration Hub console by following the steps in Viewing servers in the AWS Migration Hub console. You can also view the collected metrics for database and analytics servers in the AWS DMS console by taking the following steps. To view the data discovered by the database and analytics data collection module in the AWS DMS console 1. Sign in to the AWS Management Console and open the AWS DMS console at https:// console.aws.amazon.com/dms/v2/. 2. Choose Inventory under Discover. The Inventory page opens. 3. Choose Analyze inventories to determine database schema properties, such as similarity and complexity. Viewing collected data 74 AWS Application Discovery Service User Guide 4. Choose the Schemas tab to see the results of analysis. You can use the AWS DMS console to identify duplicate schemas, determine the migration complexity, and export the inventory information for the future analysis. For more information, see Using inventories for analysis in AWS DMS Fleet Advisor. Accessing the Agentless Collector This section describes how to use the Application Discovery Service Agentless Collector (Agentless Collector). Topics • The Agentless Collector dashboard • Editing Agentless Collector settings • Editing VMware vCenter credentials The Agentless Collector dashboard On the Application Discovery Service Agentless Collector (Agentless Collector) dashboard page you can see the status of the collector
appdiscovery-ug-026
appdiscovery-ug.pdf
26
to see the results of analysis. You can use the AWS DMS console to identify duplicate schemas, determine the migration complexity, and export the inventory information for the future analysis. For more information, see Using inventories for analysis in AWS DMS Fleet Advisor. Accessing the Agentless Collector This section describes how to use the Application Discovery Service Agentless Collector (Agentless Collector). Topics • The Agentless Collector dashboard • Editing Agentless Collector settings • Editing VMware vCenter credentials The Agentless Collector dashboard On the Application Discovery Service Agentless Collector (Agentless Collector) dashboard page you can see the status of the collector and choose a method of data collection as described in the following topics. Topics • Collector status • Data collection Collector status Collector status gives you status information about the collector. The collector name, the status of the collector's connection to AWS, the Migration Hub home Region, and the version. If you have AWS connection issues, you might need to edit Agentless Collector configuration settings. To edit the collector configuration settings, choose Edit collector settings and follow the instructions described in Editing Agentless Collector settings. Accessing the Agentless Collector 75 AWS Application Discovery Service Data collection User Guide Under Data collection you can choose a data collection method. Application Discovery Service Agentless Collector (Agentless Collector) currently supports data collection from VMware VMs and from database and analytics servers. Future modules will support collection from additional virtualization platforms, and operating system level collection. Topics • VMware vCenter data collection • Database and analytics data collection VMware vCenter data collection To collect server inventory, profile, and utilization data from your VMware VMs, set up connections to your vCenter servers. To set up the connections, choose Set up in the VMware vCenter section and follow the instructions described in Using the VMware vCenter Agentless Collector data collection module. After you set up vCenter data collection, from the dashboard you can perform the following: • View data collection status • Start data collection • Stop data collection Note On the dashboard page, after you set up vCenter data collection, the Set up button in the VMware vCenter section is replaced with data collection status information, a Stop data collection button, and a View and edit button. Database and analytics data collection You can run your database and analytics data collection module in the following two modes. Collector dashboard 76 AWS Application Discovery Service Metadata and database capacity User Guide The data collection module collects such information as schemas, versions, editions, CPU, memory, and disk capacity from your database and analytics servers. You can use this collected information to compute target recommendations in the AWS DMS console. If your source database is overprovisioned or underprovisioned, then the target recommendations also will be overprovisioned or underprovisioned. This is the default mode. Metadata, database capacity, and resource utilization In addition to metadata and database capacity information, the data collection module collects actual utilization metrics of CPU, memory, and disk capacity for the databases and analytics servers. This mode provides more accurate target recommendations than the default mode because the recommendations are based on the actual database workloads. In this mode, the data collection module collects performance metrics every minute. To start collecting metadata and performance metrics from your database and analytics servers 1. On the Database and analytics collector page, choose Data collection in the navigation pane. 2. From the Database inventory list, select the database and analytics servers for which you want to collect metadata and performance metrics. 3. Choose Run data collection. The Data collection type dialog box opens. 4. Choose how to collect data for analysis. If you choose the Metadata, database capacity, and resource utilization option, then set the period of data collection. You can collect data during the Next 7 days or set the Custom range of 1–60 days. 5. Choose Run data collection. The Data collection page opens. 6. Choose the Collection health tab to see the status of data collection. After completing the data collection, your data collection module uploads collected data to your Amazon S3 bucket. Then, you can view this collected data as described in Viewing your collected data. Collector dashboard 77 AWS Application Discovery Service User Guide Editing Agentless Collector settings You configured the collector when you first set up Application Discovery Service Agentless Collector (Agentless Collector) as described in Configuring Agentless Collector. The following procedure describes how to edit Agentless Collector configuration settings. To edit the collector configuration settings • Choose the Edit collector settings button on the Agentless Collector dashboard. On the Edit collector settings page, perform the following: a. For Collector name, enter a name to identify the collector. The name can contain spaces but it cannot contain special characters. b. Under Destination AWS account for discovery data, enter the AWS access key and
appdiscovery-ug-027
appdiscovery-ug.pdf
27
Editing Agentless Collector settings You configured the collector when you first set up Application Discovery Service Agentless Collector (Agentless Collector) as described in Configuring Agentless Collector. The following procedure describes how to edit Agentless Collector configuration settings. To edit the collector configuration settings • Choose the Edit collector settings button on the Agentless Collector dashboard. On the Edit collector settings page, perform the following: a. For Collector name, enter a name to identify the collector. The name can contain spaces but it cannot contain special characters. b. Under Destination AWS account for discovery data, enter the AWS access key and secret key for the AWS account to specify as the destination account to receive the data discovered by the collector. For information about the requirements for the IAM user, see Deploying Application Discovery Service Agentless Collector. i. ii. For AWS access-key, enter the access key of the AWS account IAM user that you're specifying as the destination account. For AWS secret-key, enter the secret key of the AWS account IAM user that you're specifying as the destination account. c. Under Agentless Collector password, change the password to use to authenticate access to the Agentless Collector. i. For Agentless Collector password, enter a password to use to authenticate access to the Agentless Collector. ii. For Re-enter Agentless Collector password, for verification enter the password again. d. Choose Save configurations. Next, you'll see The Agentless Collector dashboard. Editing VMware vCenter credentials To collect server inventory, profile, and utilization data from your VMware VMs, set up connections to your vCenter servers. For information about setting up VMware vCenter connections, see Using the VMware vCenter Agentless Collector data collection module. Editing collector settings 78 AWS Application Discovery Service User Guide This section describes how to edit the vCenter credentials. Note Before editing vCenter credentials, make sure you can provide vCenter credentials with Read and View permissions set for the System group. To edit the VMware vCenter credentials On the Viewing VMware data collection details page, choose Edit vCenter servers. • On the Edit vCenter page, perform the following: a. Under vCenter credentials: i. ii. For vCenter URL/IP, enter the IP address of your VMware vCenter Server host. For vCenter Username, enter the name of a local or domain user that the connector uses to communicate with vCenter. For domain users, use the form domain\username or username@domain. iii. For vCenter Password, enter the local or domain user password. b. Choose Save. Manually updating Application Discovery Service Agentless Collector When you configure Application Discovery Service Agentless Collector (Agentless Collector), you can choose to enable automatic updates as described in Configuring Agentless Collector. If you do not enable automatic updates, you'll need to manually update Agentless Collector. The following procedure describes how to manually update Agentless Collector. To manually update Agentless Collector 1. Obtain the latest Agentless Collector Open Virtualization Archive (OVA) file. 2. (Optional) We recommend that you delete the previous Agentless Collector OVA file, before you deploy the latest one. 3. Follow steps in Deploy Agentless Collector. Updating Agentless Collector 79 AWS Application Discovery Service User Guide The previous procedure only updates the Agentless Collector. It is your responsibility to keep the OS up to date. To update your Amazon EC2 instance 1. Get the IP address of the Agentless Collector from VMware vCenter. 2. Open the collector’s VM console and sign in as ec2-user using the password collector as shown in the following example. username: ec2-user password: collector 3. Follow the instructions in Update instance software on your AL2 instance in the Amazon Linux 2 User Guide. Kernel Live Patching Agentless Collector version 2 The Agentless Collector version 2 virtual machine uses Amazon Linux 2023 as described in Deploy Agentless Collector. To enable and use Live Patching for Amazon Linux 2023, see Kernel Live Patching on AL2023 in the Amazon EC2 User Guide. Agentless Collector version 1 The Agentless Collector version 1 virtual machine uses Amazon Linux 2 as described in Deploy Agentless Collector. To enable and use Live Patching for Amazon Linux 2, see Kernel Live Patching on AL2 in the Amazon EC2 User Guide. To upgrade from Agentless Collector version 1 to version 2 1. 2. Install a new Agentless Collector OVA by using the latest image. Set up credentials. 3. Delete the old virtual appliance. Updating Agentless Collector 80 AWS Application Discovery Service User Guide Troubleshooting Agentless Collector This section contains topics that can help you troubleshoot known issues with Application Discovery Service Agentless Collector (Agentless Collector). Topics • Fixing Unable to retrieve manifest or certificate file error • Addressing self-signed certification problems when configuring WinRM certificates • Fixing Agentless Collector cannot reach AWS during setup • Fixing self-signed certification problems when connecting to the proxy host • Finding unhealthy collectors • Fixing IP address issues • Fixing vCenter credentials issues
appdiscovery-ug-028
appdiscovery-ug.pdf
28
by using the latest image. Set up credentials. 3. Delete the old virtual appliance. Updating Agentless Collector 80 AWS Application Discovery Service User Guide Troubleshooting Agentless Collector This section contains topics that can help you troubleshoot known issues with Application Discovery Service Agentless Collector (Agentless Collector). Topics • Fixing Unable to retrieve manifest or certificate file error • Addressing self-signed certification problems when configuring WinRM certificates • Fixing Agentless Collector cannot reach AWS during setup • Fixing self-signed certification problems when connecting to the proxy host • Finding unhealthy collectors • Fixing IP address issues • Fixing vCenter credentials issues • Fixing data forwarding issues in the database and analytics data collection module • Fixing connection issues in the database and analytics data collection module • Standalone ESX host support • Contacting AWS Support for Agentless Collector issues Fixing Unable to retrieve manifest or certificate file error If you receive this error when you try to deploy the OVA from the Amazon S3 URL in the VMware vCenter UI, ensure that your vCenter server meets the following requirements: • VMware vCenter Server version 8.0 update 1 or later • VMware vCenter Server 7.0 Update 3q (ISO Build 23788036) or later Addressing self-signed certification problems when configuring WinRM certificates If you enable WinRM certificate checks, you might need to import a self-signed certificate authority into the Agentless Collector. Troubleshooting 81 AWS Application Discovery Service User Guide To import a self-signed certificate authority 1. Open the collector’s VM web console in VMware vCenter and sign in as ec2-user with the password collector as shown in the following example. username: ec2-user password: collector 2. Make sure that every self-signed CA certificate that is used to sign WinRM certificates is under the directory /etc/pki/ca-trust/source/anchors. For example: /etc/pki/ca-trust/source/anchors/https-winrm-ca-1.pem 3. To install the new certificates, run the following command. sudo update-ca-trust 4. Restart the Agentless Collector by running the following command sudo shutdown -r now 5. (Optional) To verify that certificates have been successfully imported, you can run the following command. sudo trust list --filter=ca-anchors | less Fixing Agentless Collector cannot reach AWS during setup Agentless Collector requires outbound access over TCP port 443 to several AWS domains. When configuring Agentless Collector in the console you can get the following error message. Could Not Reach AWS AWS cannot be reached. Please verify network settings. This error occurs because of a failed attempt by Agentless Collector to establish an HTTPS connection to an AWS domain that the collector needs to communicate with during the setup process. The Agentless Collector configuration fails if a connection can't be established. Fixing Agentless Collector cannot reach AWS during setup 82 AWS Application Discovery Service To fix the connection to AWS User Guide 1. Check with your IT admin to see if your company firewall is blocking outbound traffic on port 443 to any of the AWS domains that require outbound access. Which AWS domains require outbound access depend on if your home Region is US West (Oregon) Region, us-west-2, or some other Region. The following domains require outbound access if your AWS account home Region is us- west-2: • arsenal-discovery.us-west-2.amazonaws.com • migrationhub-config.us-west-2.amazonaws.com • api.ecr-public.us-east-1.amazonaws.com • public.ecr.aws The following domains require outbound access if your AWS account home Region is not us-west-2: • arsenal-discovery.us-west-2.amazonaws.com • arsenal-discovery.your-home-region.amazonaws.com • migrationhub-config.us-west-2.amazonaws.com • api.ecr-public.us-east-1.amazonaws.com • public.ecr.aws If your firewall is blocking outbound access to the AWS domains that Agentless Collector needs to communicate with, configure a proxy host in the Data synchronization section under Collector configuration. 2. If updating the firewall does not resolve the connection issue, use the following steps to ensure that the collector virtual machine has outbound network connectivity to the domains listed in the previous step. a. Get the IP address of the Agentless Collector from VMware vCenter. b. Open the collector’s VM web console and sign in as ec2-user using the password collector as shown in the following example. username: ec2-user Fixing Agentless Collector cannot reach AWS during setup 83 AWS Application Discovery Service User Guide password: collector c. Test the connection to the listed domains by running telnet on ports 443 as shown in the following example. telnet migrationhub-config.us-west-2.amazonaws.com 443 3. If telnet cannot resolve the domain, try configuring a static DNS server using the instructions for Amazon Linux 2. 4. If the error continues, for further support, see Contacting AWS Support for Agentless Collector issues. Fixing self-signed certification problems when connecting to the proxy host If communication with the optionally provided proxy is via HTTPS and the proxy has a self-signed certificate, you might need to provide a certificate. 1. Get the IP address of the Agentless Collector from VMware vCenter. 2. Open the collector’s VM web console and sign in as ec2-user with the password collector as shown in the following example. username: ec2-user password: collector 3. Paste
appdiscovery-ug-029
appdiscovery-ug.pdf
29
static DNS server using the instructions for Amazon Linux 2. 4. If the error continues, for further support, see Contacting AWS Support for Agentless Collector issues. Fixing self-signed certification problems when connecting to the proxy host If communication with the optionally provided proxy is via HTTPS and the proxy has a self-signed certificate, you might need to provide a certificate. 1. Get the IP address of the Agentless Collector from VMware vCenter. 2. Open the collector’s VM web console and sign in as ec2-user with the password collector as shown in the following example. username: ec2-user password: collector 3. Paste the body of the certificate that is associated with the secure proxy, including both ----- BEGIN CERTIFICATE----- and -----END CERTIFICATE-----, into the following file: /etc/pki/ca-trust/source/anchors/https-proxy-ca.pem 4. To install the new certificate, run the following commands: sudo update-ca-trust 5. Restart the Agentless Collector by running the following command: sudo shutdown -r now Fixing self-signed certification problems when connecting to the proxy host 84 AWS Application Discovery Service User Guide Finding unhealthy collectors Status information for every collector is found on the Data collectors page of the AWS Migration Hub (Migration Hub) console. You can identify collectors with problems by finding any collectors with a Status of Requires attention. The following procedure describes how to access the Agentless Collector console to identify health issues. To access the Agentless Collector console 1. Using your AWS account, sign in to the AWS Management Console and open the Migration Hub console at https://console.aws.amazon.com/migrationhub/. 2. 3. 4. In the Migration Hub console navigation pane under Discover, choose Data collectors. From the Agentless collectors tab, make a note of the IP address for each connector that has a status of Requires attention. To open the Agentless Collector console, open a web browser. Then type the following URL in the address bar: https://<ip_address>/, where ip_address is the IP address of an unhealthy collector. 5. Choose Log in, and then enter the Agentless Collector password, which was set up when the collector was configured in Configuring Agentless Collector. 6. On the Agentless Collector dashboard page, under Data collection, choose View and edit in the VMware vCenter section. 7. Follow the instructions in Editing VMware vCenter credentials to correct the URL and credentials. After correcting the health issues, the collector will re-establish connectivity with vCenter server, and the collector's status will change to the Collecting state. If the issues persist, see Contacting AWS Support for Agentless Collector issues. The most common causes for unhealthy collectors are IP address and credentials issues. Fixing IP address issues and Fixing vCenter credentials issues can help you resolve these issues and return a collector to a healthy state. Finding unhealthy collectors 85 AWS Application Discovery Service Fixing IP address issues User Guide A collector can go into an unhealthy state if the vCenter endpoint provided during collector setup is malformed, invalid, or if the vCenter server is currently down and not reachable. In this case, you'll receive a Connection error message . The following procedure can help you resolve IP address issues. To fix collector IP address issues 1. Get the IP address of the Agentless Collector from VMware vCenter. 2. Open the Agentless Collector console by opening a web browser, and then type the following URL in the address bar: https://<ip_address>/, where ip_address is the IP address of the collector from Deploy Agentless Collector. 3. Choose Log in, and then enter the Agentless Collector password, which was set up when the collector was configured in Configuring Agentless Collector. 4. On the Agentless Collector dashboard page, under Data collection, choose View and edit in the VMware vCenter section. 5. On the VMware data collection details page, under Discovered vCenter servers, make a note of the IP address in the vCenter column. 6. Using a separate command line tool like ping or traceroute, validate that the associated vCenter server is active and the IP is reachable from the collector VM. • If the IP address is incorrect and the vCenter service is active, then update the IP address in the collector console, and choose Next. • If the IP address is correct but the vCenter server is inactive, activate it. • If the IP address is correct and the vCenter server is active, check if it is blocking ingress network connections due to firewall issues. If yes, update your firewall settings to allow incoming connections from the collector VM. Fixing vCenter credentials issues Collectors can go into an unhealthy state if the vCenter user credentials provided when configuring a collector are invalid, or do not have vCenter Read and View account privileges. If you experience issues related to vCenter credentials, check to make sure that you have vCenter Read and View permissions set for the System group. Fixing IP address issues 86 AWS Application Discovery
appdiscovery-ug-030
appdiscovery-ug.pdf
30
is correct and the vCenter server is active, check if it is blocking ingress network connections due to firewall issues. If yes, update your firewall settings to allow incoming connections from the collector VM. Fixing vCenter credentials issues Collectors can go into an unhealthy state if the vCenter user credentials provided when configuring a collector are invalid, or do not have vCenter Read and View account privileges. If you experience issues related to vCenter credentials, check to make sure that you have vCenter Read and View permissions set for the System group. Fixing IP address issues 86 AWS Application Discovery Service User Guide For information about editing vCenter credentials, see Editing VMware vCenter credentials. Fixing data forwarding issues in the database and analytics data collection module The home page of the database and analytics data collection module in Agentless Collector displays the connection status for Access to DMS and Access to S3. If you see No access for Access to DMS and Access to S3, then configure data forwarding. For more information, see Configuring data forwarding. If you experience this issue after you configure data forwarding, then check to make sure that your data collection module can access to the internet. Then, make sure that you added the DMSCollectorPolicy and FleetAdvisorS3Policy policies to your IAM user. For more information, see Deploying Application Discovery Service Agentless Collector. If your data collection module can't connect to AWS, then provide outbound access to the following domains. • dms.your-home-region.amazonaws.com • s3.amazonaws.com Fixing connection issues in the database and analytics data collection module The database and analytics data collection module in Agentless Collector connects to your LDAP servers to discover OS servers in your data environment. Then, the data collection module connects to your OS servers to discover database and analytics servers. From these database servers, the data collection module gathers capacity and performance metrics. If your data collection module can't connect to these servers, then verify that you can connect to your servers. In the following examples, replace replaceable values with your values. • To verify that you can connect to your LDAP server, install the ldap-util package. To do so, run the following command. sudo apt-get install ldap-util Then, run the following command. Fixing data forwarding issues 87 AWS Application Discovery Service User Guide ldapsearch -x -D "CN=user,CN=Users,DC=example,DC=com" -w "password" -b "dc=example,dc=com" -h • To verify that you can connect to a Linux OS server, use the following commands. ssh -i C:\Users\user\private_key.pem -p 22 username@my-linux-host.domain.com Run the previous example as an administrator in Windows. ssh username@my-linux-host.domain.com Run the previous example in Linux. • To verify that you can connect to a Windows OS server, use the following commands. winrs -r:[hostname or ip] -u:username -p:password cmd Run the previous example as an administrator in Windows. sudo apt install -y winrm winrm --user=username --password=password [http or https]://[hostname or ip]:[port] "[cmd.exe or any other CLI command]" Run the previous example in Linux. • To verify that you can connect to a SQL Server database, use the following commands. sqlcmd -S [hostname or IP] -U username -P 'password' SELECT GETDATE() AS sysdate • To verify that you can connect to a MySQL database, use the following commands. mysql -u username -p 'password' -h [hostname or IP] -P [port] SELECT NOW() FROM DUAL • To verify that you can connect to an Oracle database, use the following commands. sqlplus username/password@[hostname or IP]:port/servicename SELECT SYSDATE FROM DUAL Fixing connection issues 88 AWS Application Discovery Service User Guide • To verify that you can connect to a PostgreSQL database, use the following commands. psql -U username -h [hostname or IP] -p port -d database SELECT CURRENT_TIMESTAMP AS sysdate If you can't connect to your database and analytics servers, then make sure that you provide the required permissions. For more information, see Discovering your database servers. Standalone ESX host support The Agentless Collector does not support a standalone ESX host. The ESX host must be part of the vCenter Server instance. Contacting AWS Support for Agentless Collector issues If you encounter issues with Application Discovery Service Agentless Collector (Agentless Collector) and need help, contact AWS Support You'll be contacted and might be asked to send the collector logs. To obtain Agentless Collector logs 1. Get the IP address of the Agentless Collector from VMware vCenter. 2. Open the collector’s VM web console and sign in as ec2-user using the password collector as shown in the following example. username: ec2-user password: collector 3. Use the following command to navigate to the log folder. cd /var/log/aws/collector 4. Zip the log files by using the following commands. sudo cp /local/agentless_collector/compose.log . docker inspect $(docker ps --format {{.Names}}) | sudo tee docker_inspect.log >/ dev/null sudo tar czf logs_$(date '+%d-%m-%Y_%H.%M.%S').tar.gz --exclude='db.mv*' * 5. Copy the log file from the Agentless Collector VM. Standalone ESX host support
appdiscovery-ug-031
appdiscovery-ug.pdf
31
Collector logs 1. Get the IP address of the Agentless Collector from VMware vCenter. 2. Open the collector’s VM web console and sign in as ec2-user using the password collector as shown in the following example. username: ec2-user password: collector 3. Use the following command to navigate to the log folder. cd /var/log/aws/collector 4. Zip the log files by using the following commands. sudo cp /local/agentless_collector/compose.log . docker inspect $(docker ps --format {{.Names}}) | sudo tee docker_inspect.log >/ dev/null sudo tar czf logs_$(date '+%d-%m-%Y_%H.%M.%S').tar.gz --exclude='db.mv*' * 5. Copy the log file from the Agentless Collector VM. Standalone ESX host support 89 AWS Application Discovery Service User Guide scp logs*.tar.gz targetuser@targetaddress 6. Give the tar.gz file to AWS Enterprise Support. Contacting AWS Support 90 AWS Application Discovery Service User Guide Importing data into Migration Hub AWS Migration Hub (Migration Hub) import allows you to import details of your on-premises environment directly into Migration Hub without using the Application Discovery Service Agentless Collector (Agentless Collector) or AWS Application Discovery Agent (Discovery Agent), so you can perform migration assessment and planning directly from your imported data. You also can group your devices as applications and track their migration status. This page describes the steps to complete an import request. First, you use one of the following two options to prepare your on-premises server data. • Use common third-party tools to generate a file that contains your on-premises server data. • Download our comma separated value (CSV) import template, and populate it with your on- premises server data. After you use one of the two previously described methods to create your on-premises data file, you upload the file to Migration Hub by using the Migration Hub console, AWS CLI, or one of the AWS SDKs. For more information about the two options, see the section called “Supported import formats”. You can submit multiple import requests. Each request is processed sequentially. You can check the status of your import requests at any time, through the console or import APIs. After an import request is complete, you can view the details of individual imported records. View utilization data, tags, and application mappings directly from within the Migration Hub console. If errors were encountered during the import, you can review the count of successful and failed records, and you can see the error details for each failed record. Handling errors: A link is provided to download the error log and failed records files as CSV files in a compressed archive. Use these files to resubmit your import request after correcting the errors. Limits apply to the number of imported records, imported servers, and deleted records you can keep. For more information, see AWS Application Discovery Service Quotas. Supported import formats Migration Hub supports the following import formats. Supported import formats 91 AWS Application Discovery Service • RVTools • Migration Hub import template RVTools User Guide Migration Hub supports importing exports of VMware vSphere via RVTools. When saving data from RVTools, first choose the Export all to csv option or the Export all to Excel option, then ZIP the folder, and import the ZIP file into Migration Hub. The following files are required in the ZIP: vInfo, vNetwork, vCpu, vMemory, vDisk, vPartition, vSource, vTools, vHost, vNic, vSC_VMK. Migration Hub import template Migration Hub import allows you to import data from any source. The data provided must be in the supported format for a CSV file, and the data must contain only the supported fields with the supported ranges for those fields. An asterisk (*) next to an import field name in the following table denotes that it is a required field. Each record of your import file must have at least one or more of those required fields populated to uniquely identify a server or application. Otherwise, a record without any of the required fields will fail to be imported. A caret (^) next to an import filed name in the following table denotes that it is a readonly if a serverId is provided. Note If you're using either VMware.MoRefId or VMWare.VCenterId, to identify a record, you must have both fields in the same record. Import Field Name Description Examples ExternalId*^ A custom identifier that allows you to mark each record as unique. For example, ExternalId can be the inventory ID for the server in your data center. Inventory Id 1 Server 2 CMBD Id 3 RVTools 92 AWS Application Discovery Service User Guide Import Field Name Description Examples SMBiosId^ IPAddress*^ MACAddress*^ HostName*^ System management BIOS (SMBIOS) ID. A comma-delimited list of IP addresses of the server, in 192.0.0.2 quotes. "10.12.31.233, 10.12.32.11" A comma-delimited list of MAC address of the server, in quotes. 00:1B:44:11:3A:B7 "00-15-E9-2B-99-3C, 00-14-22-01-23-45" The host name of the server. We recommend using the fully qualified domain name (FQDN) for this value. ip-1-2-3-4 localhost.domain VMware.MoRefId*^ VMware.VCenterId*^
appdiscovery-ug-032
appdiscovery-ug.pdf
32
mark each record as unique. For example, ExternalId can be the inventory ID for the server in your data center. Inventory Id 1 Server 2 CMBD Id 3 RVTools 92 AWS Application Discovery Service User Guide Import Field Name Description Examples SMBiosId^ IPAddress*^ MACAddress*^ HostName*^ System management BIOS (SMBIOS) ID. A comma-delimited list of IP addresses of the server, in 192.0.0.2 quotes. "10.12.31.233, 10.12.32.11" A comma-delimited list of MAC address of the server, in quotes. 00:1B:44:11:3A:B7 "00-15-E9-2B-99-3C, 00-14-22-01-23-45" The host name of the server. We recommend using the fully qualified domain name (FQDN) for this value. ip-1-2-3-4 localhost.domain VMware.MoRefId*^ VMware.VCenterId*^ The managed object reference ID. Must be provided with a VMware.VC enterId. Virtual machine unique identifier. Must be provided with a VMware.MoRefId. CPU.NumberOfProcessors^ The number of CPUs. CPU.NumberOfCores^ The total number of physical cores. 4 8 Migration Hub import template 93 AWS Application Discovery Service User Guide Import Field Name Description Examples CPU.NumberOfLogicalCores^ The total number of threads that can run concurren 16 OS.Name^ OS.Version^ VMware.VMName^ RAM.TotalSizeInMB^ tly on all CPUs in a server. Some CPUs support multiple threads to run concurrently on a single CPU core. In those cases, this number will be larger than the number of physical (or virtual) cores. The name of the operating system. Linux The version of the operating system. The name of the virtual machine. The total RAM available on the server, in MB. Windows.Hat 16.04.3 NT 6.2.8 Corp1 64 128 64 128 64 128 45 23.9 RAM.UsedSizeInMB.Avg^ The average amount of used RAM on the server, in MB. RAM.UsedSizeInMB.Max^ CPU.UsagePct.Avg^ The maximum amount of used RAM available on the server, in MB. The average CPU utilization when the discovery tool was collecting data. Migration Hub import template 94 AWS Application Discovery Service User Guide Import Field Name Description Examples CPU.UsagePct.Max^ The maximum CPU utilization when the discovery tool was collecting data. DiskReadsPerSecond InKB.Avg^ The average number of disk reads per second, in KB. DiskWritesPerSecondInKB.Avg ^ The average number of disk writes per second, in KB. DiskReadsPerSecond InKB.Max^ The maximum number of disk reads per second, in KB. DiskWritesPerSecon dInKB.Max^ The maximum number of disk writes per second, in KB. DiskReadsOpsPerSec ond.Avg^ The average number of disk read operations per second. DiskWritesOpsPerSe cond.Avg^ The average number of disk write operations per second. DiskReadsOpsPerSec ond.Max^ The maximum number of disk read operations per second. DiskWritesOpsPerSe cond.Max^ The maximum number of disk write operations per second. NetworkReadsPerSec ondInKB.Avg^ The average number of network read operations per second, in KB. 55.34 24 1159 84506 199 6197 37892 869962 18436 1808 45 28 8 3 1083 176 535 71 45 28 Migration Hub import template 95 AWS Application Discovery Service User Guide Import Field Name Description Examples 8 3 1083 176 535 71 Application1 "Application2, Application3" NetworkWritesPerSe condInKB.Avg^ The average number of network write operations per second, in KB. NetworkReadsPerSec ondInKB.Max^ The maximum number of network read operations per second, in KB. NetworkWritesPerSe condInKB.Max^ The maximum number of network write operations per second, in KB. A comma-delimited list of applications that include this server, in quotes. This value can include existing applicati ons and/or new applications that are created upon import. The migration wave for this server. Applications ApplicationWave Tags^ A comma-delimited list of tags formatted as name:valu "zone:1, critical:yes" e. "zone:3, critical:no, zone:1" Important Do not store sensitive information (like personal data) in tags. ServerId The server identifier as seen in the Migration Hub server list. d-server-01kk9i6yw waxmp Migration Hub import template 96 AWS Application Discovery Service User Guide You can import data even if you don’t have data populated for all the fields defined in the import template, so long as each record has at least one of the required fields within it. Duplicates are managed across multiple import requests by using either an external or internal matching key. If you populate your own matching key, External ID, this field is used to uniquely identify and import the records. If no matching key is specified, import uses an internally generated matching key that is derived from some of the columns in the import template. For more information on this matching, see Matching logic for discovered servers and applications. Note Migration Hub import does not support any fields outside of those defined in the import template. Any custom fields supplied will be ignored and will not be imported. Setting up import permissions Before you can import your data, ensure that your IAM user has the necessary Amazon S3 permissions to upload (s3:PutObject) your import file to Amazon S3, and to read the object (s3:GetObject). You also must establish programmatic access (for the AWS CLI) or console access, by creating an IAM policy and attaching it to the IAM user that performs imports in your AWS account. Console Permissions Use the following procedure to edit the permissions
appdiscovery-ug-033
appdiscovery-ug.pdf
33
any fields outside of those defined in the import template. Any custom fields supplied will be ignored and will not be imported. Setting up import permissions Before you can import your data, ensure that your IAM user has the necessary Amazon S3 permissions to upload (s3:PutObject) your import file to Amazon S3, and to read the object (s3:GetObject). You also must establish programmatic access (for the AWS CLI) or console access, by creating an IAM policy and attaching it to the IAM user that performs imports in your AWS account. Console Permissions Use the following procedure to edit the permissions policy for the IAM user that will make import requests in your AWS account using the console. To edit a user's attached managed policies 1. Sign in to the AWS Management Console and open the IAM console at https:// console.aws.amazon.com/iam/. 2. In the navigation pane, choose Users. 3. Choose the name of the user whose permissions policy you want to change. 4. Choose the Permissions tab and choose Add permissions. 5. Choose Attach existing policies directly, and then choose Create policy. Setting up import permissions 97 AWS Application Discovery Service User Guide a. In the Create policy page that opens, choose JSON, and paste in the following policy. Remember to replace the name of your bucket with the actual name of the bucket that the IAM user will upload the import files into. { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "s3:GetBucketLocation", "s3:ListAllMyBuckets" ], "Resource": "*" }, { "Effect": "Allow", "Action": ["s3:ListBucket"], "Resource": ["arn:aws:s3:::importBucket"] }, { "Effect": "Allow", "Action": [ "s3:PutObject", "s3:GetObject", "s3:DeleteObject" ], "Resource": ["arn:aws:s3:::importBucket/*"] } ] } b. Choose Review policy. c. Give your policy a new Name and optional description, before reviewing the summary of the policy. d. Choose Create policy. 6. Return to the Grant permissions IAM console page for the user that will make import requests in your AWS account. 7. Refresh the table of policies, and search for the name of the policy you just created. 8. Choose Next: Review. Setting up import permissions 98 AWS Application Discovery Service User Guide 9. Choose Add permissions. Now that you've added the policy to your IAM user, you're ready to start the import process. AWS CLI Permissions Use the following procedure to create the managed policies necessary to give an IAM user the permissions to make import data requests using the AWS CLI. To create and attach the managed policies 1. Use the aws iam create-policy AWS CLI command to create an IAM policy with the following permissions. Remember to replace the name of your bucket with the actual name of the bucket that the IAM user will upload the import files into. { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": ["s3:ListBucket"], "Resource": ["arn:aws:s3:::importBucket"] }, { "Effect": "Allow", "Action": [ "s3:PutObject", "s3:GetObject", "s3:DeleteObject" ], "Resource": ["arn:aws:s3:::importBucket/*"] } ] } For more information on using this command, see create-policy in the AWS CLI Command Reference. 2. Use the aws iam create-policy AWS CLI command to create an additional IAM policy with the following permissions. { Setting up import permissions 99 AWS Application Discovery Service User Guide "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "discovery:ListConfigurations", "discovery:CreateApplication", "discovery:UpdateApplication", "discovery:AssociateConfigurationItemsToApplication", "discovery:DisassociateConfigurationItemsFromApplication", "discovery:GetDiscoverySummary", "discovery:StartImportTask", "discovery:DescribeImportTasks", "discovery:BatchDeleteImportData" ], "Resource": "*" } ] } 3. Use the aws iam attach-user-policy AWS CLI command to attach the policies you created in the previous two steps to the IAM user that will be performing import requests in your AWS account using the AWS CLI. For more information on using this command, see attach-user-policy in the AWS CLI Command Reference. Now that you've added the policies to your IAM user, you're ready to start the import process. Remember that when the IAM user uploads objects to the Amazon S3 bucket that you specified, they must leave the default permissions for the objects set so that the user can read the object. Uploading your import file to Amazon S3 Next, you must upload your CSV formatted import file into Amazon S3 so it can be imported. Before you begin, you should have an Amazon S3 bucket that will house your import file created and/or chosen ahead of time. Uploading your import file to Amazon S3 100 AWS Application Discovery Service Console S3 Upload To upload your import file to Amazon S3 User Guide 1. Sign in to the AWS Management Console and open the Amazon S3 console at https:// console.aws.amazon.com/s3/. 2. In the Bucket name list, choose the name of the bucket that you want to upload your object to. 3. Choose Upload. 4. In the Upload dialog box, choose Add files to choose the file to upload. 5. Choose a file to upload, and then choose Open. 6. Choose Upload. 7. Once your file has been uploaded, choose the name of
appdiscovery-ug-034
appdiscovery-ug.pdf
34
to Amazon S3 100 AWS Application Discovery Service Console S3 Upload To upload your import file to Amazon S3 User Guide 1. Sign in to the AWS Management Console and open the Amazon S3 console at https:// console.aws.amazon.com/s3/. 2. In the Bucket name list, choose the name of the bucket that you want to upload your object to. 3. Choose Upload. 4. In the Upload dialog box, choose Add files to choose the file to upload. 5. Choose a file to upload, and then choose Open. 6. Choose Upload. 7. Once your file has been uploaded, choose the name of your data file object from your bucket dashboard. 8. From the Overview tab of the object details page, copy the Object URL. You'll need this when you create your import request. 9. Go to the Import page in the Migration Hub console as described in Importing data. Then, paste the object URL in the Amazon S3 Object URL field. AWS CLI S3 Upload To upload your import file to Amazon S3 1. Open a terminal window and navigate to the directory that your import file is saved to. 2. Enter the following command: aws s3 cp ImportFile.csv s3://BucketName/ImportFile.csv 3. This returns the following results: upload: .\ImportFile.csv to s3://BucketName/ImportFile.csv 4. Copy the full Amazon S3 object path that was returned. You will need this when you create your import request. Uploading your import file to Amazon S3 101 AWS Application Discovery Service Importing data User Guide After you download the import template from the Migration Hub console and populate it with your existing on-premises server data, you're ready to start importing the data into Migration Hub. The following instructions describe two ways to do this, either by using the console or by making API calls through the AWS CLI. Console Import Start data import on the Tools page of the Migration Hub console. To start data import 1. 2. In the navigation pane, under Discover, choose Tools. If you don't already have an import template filled out, you can download the template by choosing import template in the Import box. Open the downloaded template and populate it with your existing on-premises server data. You can also download the import template from our Amazon S3 bucket at https://s3.us-west-2.amazonaws.com/ templates-7cffcf56-bd96-4b1c-b45b-a5b42f282e46/import_template.csv 3. To open the Import page, choose Import in the Import box. 4. Under Import name, specify a name for the import. 5. Fill out the Amazon S3 Object URL field. To do this step, you'll need to upload your import data file to Amazon S3. For more information, see Uploading your import file to Amazon S3. 6. Choose Import in the lower-right area. This will open the Imports page where you can see your import and its status listed in the table. After following the preceding procedure to start your data import, the Imports page will show details of each import request including its progress status, completion time, and the number of successful or failed records with the ability to download those records. From this screen, you can also navigate to the Servers page under Discover to see the actual imported data. On the Servers page, you can see a list of all the servers (devices) that are discovered along with the import name. When you navigate from the Imports (import history) page by selecting the name of the import listed in the Name column, you are taken to the Servers page where a filter is applied based on the selected import's data set. Then, you only see data belonging to that particular import. Importing data 102 AWS Application Discovery Service User Guide The archive is in a .zip format, and contains two files; errors-file and failed-entries- file. The errors file contains a list of error messages associated with each failed line and associated column name from your data file that failed the import. You can use this file to quickly identify where problems occurred. The failed entries file includes each line and all the provided columns that failed. You can make the changes called out in the errors file in this file and attempt to import the file again with the corrected information. AWS CLI Import To start the data import process from the AWS CLI, the AWS CLI must first be installed in your environment. For more information, see Installing the AWS Command Line Interface in the AWS Command Line Interface User Guide. Note If you don't already have an import template filled out, you can download the import template from our Amazon S3 bucket here: https://s3.us-west-2.amazonaws.com/ templates-7cffcf56-bd96-4b1c-b45b-a5b42f282e46/import_template.csv To start data import 1. Open a terminal window, and type the following command: aws discovery start-import-task --import-url s3://BucketName/ImportFile.csv -- name ImportName 2. This will create your import task, and return the following status information: { "task": { "status": "IMPORT_IN_PROGRESS", "applicationImportSuccess": 0,
appdiscovery-ug-035
appdiscovery-ug.pdf
35
process from the AWS CLI, the AWS CLI must first be installed in your environment. For more information, see Installing the AWS Command Line Interface in the AWS Command Line Interface User Guide. Note If you don't already have an import template filled out, you can download the import template from our Amazon S3 bucket here: https://s3.us-west-2.amazonaws.com/ templates-7cffcf56-bd96-4b1c-b45b-a5b42f282e46/import_template.csv To start data import 1. Open a terminal window, and type the following command: aws discovery start-import-task --import-url s3://BucketName/ImportFile.csv -- name ImportName 2. This will create your import task, and return the following status information: { "task": { "status": "IMPORT_IN_PROGRESS", "applicationImportSuccess": 0, "serverImportFailure": 0, "serverImportSuccess": 0, "name": "ImportName", "importRequestTime": 1547682819.801, "applicationImportFailure": 0, "clientRequestToken": "EXAMPLE1-abcd-1234-abcd-EXAMPLE1234", "importUrl": "s3://BucketName/ImportFile.csv", "importTaskId": "import-task-EXAMPLE1229949eabfEXAMPLE03862c0" Importing data 103 AWS Application Discovery Service User Guide } } Tracking your Migration Hub import requests You can track the status of your Migration Hub import requests using the console, AWS CLI, or one of the AWS SDKs. Console Tracking From the Imports dashboard in the Migration Hub console, you'll find the following elements. • Name – The name of the import request. • Import ID – The unique ID of the import request. • Import time – The date and time that the import request was created. • Import status – The status for the import request. This can be one of the following values: • Importing – This data file is currently being imported. • Imported – The entire data file was successfully imported. • Imported with errors – One or more of the records in the data file failed to import. To resolve your failed records, choose Download failed records for your import task and resolve the errors in the failed entries csv file, and do the import again. • Import Failed – None of the records in the data file where imported. To resolve your failed records, choose Download failed records for your import task and resolve the errors in the failed entries csv file, and do the import again. • Imported records – The number of records in a specific data file that were successfully imported. • Failed records – The number records in a specific data file that weren't imported. CLI Tracking You can track the status of your import tasks with the aws discovery describe-import- tasks AWS CLI command. 1. Open a terminal window, and type the following command: Tracking your Migration Hub import requests 104 AWS Application Discovery Service User Guide aws discovery describe-import-tasks 2. This will return a list of all your import tasks in JSON format, complete with status and other relevant information. Optionally, you can filter results to return a subset of your import tasks. When tracking your import tasks, you may find that the serverImportFailure value returned is greater than zero. When this happens, your import file had one or more entries that couldn't be imported. This can be resolved by downloading your failed records archive, reviewing the files within, and doing another import request with the modified failed- entries.csv file. After creating your import task, you can perform additional actions to help manage and track your data migration. For example, you can download an archive of failed records for a specific request. For information on using the failed records archive to resolve import issues, see Troubleshooting failed import records. Tracking your Migration Hub import requests 105 AWS Application Discovery Service User Guide View and explore discovered data Both Application Discovery Service Agentless Collector (Agentless Collector) and AWS Discovery Agent (Discovery Agent) provide system performance data based on average and peak utilization. You can use the system performance data that's collected to perform a high-level total cost of ownership (TCO). Discovery Agents collect more detailed data including time series data for system performance information, inbound and outbound network connections, and processes running on the server. You can use this data to understand network dependencies between servers and group the related servers as applications for migration planning. In this section you'll find instructions on how to view and work with data discovered by Agentless Collector and Discovery Agent from both the console and the AWS CLI. Topics • View collected data using the Migration Hub console • Exploring data in Amazon Athena View collected data using the Migration Hub console For both the Application Discovery Service Agentless Collector (Agentless Collector) and AWS Discovery Agent (Discovery Agent), after the data collection process starts, you can use the console to view their collected data about your servers and VMs. Data appears in the console approximately 15 minutes after data collection starts. You can also view this data in CSV format by exporting the collected data by making API calls using the AWS CLI. To view collected data about discovered servers in the console, follow the steps in Viewing servers in the AWS Migration Hub