AWS Developer Blog

Connecting to Amazon RDS Databases from Eclipse

When developing any application that uses a database, it’s incredibly important to have good tools at hand for working with the data in your database. Eclipse has great tools for working with relational data, and if you’re using the Amazon Relational Database Service (Amazon RDS) to manage your database, then configuring a connection to your database with the AWS Toolkit for Eclipse only takes a few clicks.

Before going any further, make sure you have the AWS Toolkit for Eclipse and the Eclipse Data Tools Platform (DTP) installed. The easiest way to ensure you have Eclipse DTP installed is to start with the Eclipse Java EE distribution. Once you’re running the Eclipse JEE distribution, you can install the AWS Toolkit for Eclipse through the Eclipse Marketplace, or by pointing the Eclipse Update Manager directly to the AWS Eclipse update site at http://aws.amazon.com/eclipse/ .

If you don’t have an Amazon RDS Database Instance running yet, you can launch one with just a few clicks in the AWS Management Console.

Once you’ve got a DB Instance running, open the AWS Explorer view in the AWS Toolkit for Eclipse. Make sure you’re using the correct account and AWS region, and you should see your DB Instance listed in the AWS Explorer view.

Once you find your DB Instance in the AWS Explorer view, right-click and select Connect....

From here, you need to specify the password to use when connecting to your database. You might also have to specify where the JDBC driver library is for your database type. The MySQL JDBC driver is distributed with the plug-in, but other databases have less permissive licenses and require you to download the JDBC driver from the vendor’s website and tell the plug-in where the jar is.

Once you’ve created the connection inside Eclipse to your DB Instance, you can use all the tools in Eclipse’s Data Tools Platform to work with your data. You can use the SQL Query Editor to run queries on your database, review your schema, and make changes using the DataSource Explorer, or just browse and edit your data in a spreadsheet editor.