Introduction to AWS Application Discovery Service

AWS Application Discovery Service (ADS) is a service that helps you to plan and migrate your on-premises applications to AWS. It enables you to gather information about your on-premises environment and applications, including servers, databases, and network dependencies. This information can help you to understand the complexity and dependencies of your applications and plan your migration to AWS.

Getting Started with AWS ADS

Before we dive into the CLI commands, let’s go through the basic steps you need to follow to use AWS ADS:

  1. Create a discovery connection: First, you need to create a discovery connection to the on-premises environment you want to scan. A discovery connection is a configuration that defines the credentials and settings needed to connect to your environment. You can create a discovery connection using the AWS Management Console or the AWS CLI.
  2. Start a discovery: Once you have created a discovery connection, you can start a discovery. A discovery is a process that collects data about your environment, including servers, applications, and network dependencies. You can start a discovery using the AWS Management Console or the AWS CLI.
  3. View and analyze the data: After the discovery is complete, you can view and analyze the data collected by ADS. You can use this data to identify dependencies between applications, estimate the cost of running your applications on AWS, and plan your migration.

Now that you know the basic steps, let’s dive into the CLI commands.

CLI Commands for AWS ADS

Here are the CLI commands you can use to create a discovery connection, start a discovery, and view and analyze the data collected by ADS:

Create a Discovery Connection

To create a discovery connection, you can use the following command:

aws discovery create-connection --name <name> --description <description> --tags <tags> --server-url <server_url> --port <port> --protocol <protocol> --username <username> --password <password>

Here’s what each parameter means:

  • name: The name of the discovery connection.
  • description: A brief description of the discovery connection.
  • tags: Optional metadata to assign to the discovery connection.
  • server-url: The URL of the server to connect to.
  • port: The port to use for the connection.
  • protocol: The protocol to use for the connection (either HTTPS or HTTP).
  • username: The username to use for authentication.
  • password: The password to use for authentication.

Start a Discovery

To start a discovery, you can use the following command:

aws discovery start-data-collection-by-agentIds --agent-ids <agent_ids> --start-time <start_time> --end-time <end_time>

Here’s what each parameter means:

  • agent-ids: A comma-separated list of agent IDs to start the discovery for.
  • start-time: The start time for the discovery (in UTC format).
  • end-time: The end time for the discovery (in UTC format).

View and Analyze the Data

To view and analyze the data collected by ADS, you can use the following commands:

aws discovery describe-agents
This command lists all the agents that have been registered with ADS.
aws discovery describe-configurations --configuration-ids <configuration_ids>

This command lists the configurations for the specified configuration IDs.

aws discovery describe-continuous-export-tasks

This command lists all the continuous export tasks that have been started.

aws discovery describe-export-tasks

This command lists all the export tasks that have been started.

aws discovery describe-import-tasks

This command lists all the import tasks that have been started.

aws discovery describe-tags --resource-arn <resource_arn>

This command lists the tags for the specified resource ARN.

aws discovery list-configurations

This command lists all the configurations that have been discovered.

aws discovery list-server-neighbors --configuration-id <configuration_id> --port-information-needed

This command lists the server neighbors for the specified configuration ID, including the port information.

aws discovery start-continuous-export-task --export-data-format <export_data_format> --s3-bucket <s3_bucket> --start-time <start_time>

This command starts a continuous export task that exports data to an Amazon S3 bucket.

Here’s what each parameter means:

  • export-data-format: The format of the exported data (either CSV or GRAPHML).
  • s3-bucket: The name of the Amazon S3 bucket to export the data to.
  • start-time: The start time for the export task (in UTC format).

Conclusion

AWS Application Discovery Service (ADS) is a powerful tool that can help you to plan and migrate your on-premises applications to AWS. By following the basic steps and using the CLI commands we’ve covered in this tutorial, you can easily create a discovery connection, start a discovery, and view and analyze the data collected by ADS.