All posts

How to Connect AWS to Oracle Using sqlplus: A Step-by-Step Guide

The query timed out at 3 a.m., the pager still buzzing in my hand. Dead silence from the app. The Oracle database was fine. The AWS instance was fine. sqlplus was dead. This is the moment you remember: connecting AWS to sqlplus is a minefield if you miss a single switch. The good news? It’s simple when you see the whole map. Step 1: Make sure your AWS instance can talk to Oracle Check the Security Group rules. Add inbound rules for TCP port 1521 to the correct source. If you’re using a private

Free White Paper

AWS IAM Policies + End-to-End Encryption: The Complete Guide

Architecture patterns, implementation strategies, and security best practices. Delivered to your inbox.

Free. No spam. Unsubscribe anytime.

The query timed out at 3 a.m., the pager still buzzing in my hand. Dead silence from the app. The Oracle database was fine. The AWS instance was fine. sqlplus was dead.

This is the moment you remember: connecting AWS to sqlplus is a minefield if you miss a single switch. The good news? It’s simple when you see the whole map.

Step 1: Make sure your AWS instance can talk to Oracle
Check the Security Group rules. Add inbound rules for TCP port 1521 to the correct source. If you’re using a private subnet, verify the NAT Gateway and route table.

Step 2: Install sqlplus inside your AWS environment
On Amazon Linux or Ubuntu, install Oracle Instant Client.

sudo yum install libaio
wget https://download.oracle.com/otn_software/linux/instantclient/instantclient-basic-linux.x64.zip
wget https://download.oracle.com/otn_software/linux/instantclient/instantclient-sqlplus-linux.x64.zip
unzip instantclient-basic-linux.x64.zip
unzip instantclient-sqlplus-linux.x64.zip
export LD_LIBRARY_PATH=/path/to/instantclient:$LD_LIBRARY_PATH

Keep paths clean. Put exports in .bash_profile so they persist.

Step 3: Verify connectivity
Run:

Continue reading? Get the full guide.

AWS IAM Policies + End-to-End Encryption: Architecture Patterns & Best Practices

Free. No spam. Unsubscribe anytime.
tnsping yourdbhost

If it times out, you’ve got a firewall or DNS issue. Solve this before trying to log in.

Step 4: Connect with sqlplus

sqlplus username/password@//db-hostname:1521/SERVICE_NAME

SERVICE_NAME must match what’s in your tnsnames.ora or Oracle service setup. Miss a character and you’ll stare at ORA-12514 all day.

Step 5: Secure the connection
If the database needs SSL, grab the proper wallet from your DBA. Place it on the AWS instance and update your sqlnet.ora to point to it.

Step 6: Automate and monitor
Once connected, automate health checks with lightweight queries. Use AWS CloudWatch to log results and trigger alarms when queries fail.

AWS plus sqlplus can be rock solid. The key is to control the network path, the client install, and the login parameters down to the last byte. Skip one and your connection will vanish. Do it right and you’ll have a clean, fast link that stays up.

If you want to see a working AWS-to-sqlplus environment without building it from scratch, you can spin it up through hoop.dev. Live, in minutes. Nothing to guess. Nothing to debug. Just connect and run.

Get started

See hoop.dev in action

One gateway for every database, container, and AI agent. Deploy in minutes.

Get a demoMore posts