Rds Oracle
AWSOfficialPublished by AWS
- Skill
- Tool integration
- Cloud and DevOps
- Apache-2.0
- Low risk
- Has scripts
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill provides specialized guidance for managing Amazon RDS for Oracle instances. It covers the full connection lifecycle, including private-subnet networking, authentication via AWS Secrets Manager or Kerberos, and driver-specific configurations. It addresses common pitfalls such as ORA-error codes, connectivity timeouts, and the specific requirement to use Oracle Connection Manager (CMAN) instead of RDS Proxy. The skill includes diagnostic scripts and architectural patterns for integrating RDS Oracle with various compute runtimes like Lambda, EKS, and EC2.
What it does
- Diagnoses connectivity issues like ORA-12170, ORA-12541, and DPI-1047.
- Provides architectural patterns for secure RDS Oracle access via SSM, VPN, or Direct Connect.
- Guides the setup of Oracle Connection Manager (CMAN) on EC2 for connection multiplexing.
- Configures application-side connectivity for Python, Java, Node.js, and .NET drivers.
- Manages AWS resource configurations including parameter groups, option groups, and security groups.
- Implements secure credential management using AWS Secrets Manager.
When to use it
- When troubleshooting connection failures between applications and RDS for Oracle.
- When setting up new network paths, such as cross-VPC peering or Transit Gateway connections.
- When implementing connection pooling or proxying for Oracle workloads on AWS.
- When configuring client tools like SQL Developer or Toad to connect to private RDS instances.
- When integrating serverless or containerized workloads with an Oracle database.
Advantages
- Provides authoritative, RDS-specific troubleshooting for Oracle-related error codes.
- Prevents common misconfigurations like enabling public access or attempting to use unsupported proxies.
- Promotes secure-by-default patterns like using Secrets Manager and private subnets.
- Includes ready-to-use diagnostic scripts for connectivity and SSL status verification.
- Standardizes resource tagging and operational best practices for RDS Oracle.
Usage examples
- “Why am I getting an ORA-12170 error when connecting to my RDS Oracle instance from an EC2 instance?”
- The agent will guide you through checking security group rules, VPC routing, and DNS resolution, and suggest using nc -zv to isolate the network path.
- “How do I connect a Python Lambda function to RDS Oracle using Secrets Manager?”
- The agent will provide a configuration plan covering VPC settings, module-level connection pooling, and the use of thin-mode drivers without requiring extra layers.
- “Can I use RDS Proxy for my Oracle database?”
- The agent will clarify that RDS Proxy does not support Oracle and provide instructions for setting up Oracle Connection Manager (CMAN) on EC2 instead.
- “I am seeing DPI-1047 errors in my Python application. How do I fix this?”
- The agent will explain that this indicates a thick-mode dependency issue and recommend switching to thin-mode by removing the init_oracle_client call.
Install
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/aws/rds-oracle/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip rds-oracle.zip -d .agents/skills
Documentation by AWS
Amazon RDS for Oracle — Connectivity
Safety guidance
This skill covers creating and modifying RDS for Oracle resources when the user requests it. The agent MUST confirm the action with the user before executing. Do NOT execute any create or modify operation without explicit user confirmation (e.g., "yes", "proceed", "confirmed", "go ahead"). If the user has not confirmed, present the planned action and ask for approval.
Execute these operations (after user confirmation)
Create an instance:
create-db-instance(requires a DB subnet group; RDS Oracle is VPC-only and not publicly accessible by default)Create a custom parameter group:
create-db-parameter-group(familyoracle-se2-19,oracle-ee-19, etc.)Create an option group:
create-option-group(for Oracle Native Network Encryption, TLS/TCPS, S3 integration, APEX, Spatial)Change backup retention:
modify-db-instance --backup-retention-periodEnable/disable deletion protection:
modify-db-instance --deletion-protectionChange CloudWatch log exports:
modify-db-instance --cloudwatch-logs-export-configurationAttach/detach parameter group or option group:
modify-db-instance --db-parameter-group-name / --option-group-nameTag resources:
add-tags-to-resource,remove-tags-from-resource
Resource tagging (always apply on resource creation)
When creating any RDS for Oracle resource (create-db-instance, create-db-parameter-group, create-option-group, create-db-instance-read-replica), ALWAYS include these tags using the RDS list-of-records --tags syntax:
--tags Key=created_by,Value=rds-oracle-skill Key=generation_model,Value={your-model-id}
Example: --tags Key=created_by,Value=rds-oracle-skill Key=generation_model,Value=claude-sonnet-4-20250514
Include these tags even if the user does not mention tagging, so that they can identify the resources created via this skill. If the user provides additional tags, append these to their tags rather than replacing them. The same applies when tagging via add-tags-to-resource on existing resources.
Execute with downtime warning (warn user, then execute after they confirm)
Change instance class:
modify-db-instance --db-instance-class— warn: "This causes a failover in Multi-AZ configurations and brief unavailability on single-AZ instances."Minor engine version upgrade:
modify-db-instance --engine-versionwithin the same major (e.g., 19.0.0.0.ru-2024-01 → 19.0.0.0.ru-2024-04) — warn: "This triggers a restart and may cause a brief outage."Storage type or IOPS change:
modify-db-instance --storage-type/--iops— warn: "This can cause extended IO degradation while the change applies."Apply immediately: any
modify-db-instance --apply-immediately— warn: "This applies outside the maintenance window and may cause downtime now."
Do NOT execute (refuse, explain why, offer assessment instead)
Delete instance:
delete-db-instance— irreversible data lossDelete automated backups:
delete-db-instance --delete-automated-backups— destroys point-in-time recovery historyForce failover:
reboot-db-instance --force-failover— production impactMajor version upgrade:
modify-db-instance --engine-versionacross major versions (e.g., 19c → 21c) — requires prechecks, option group migration, and a rollback plan; should go through change-controlReboot:
reboot-db-instance— production impactPromote a read replica:
promote-read-replica— breaks replication and is rarely reversibleEnable public accessibility:
modify-db-instance --publicly-accessible true— security regression; use SSM port forwarding, VPN, or Direct Connect instead (per the Overview's security posture)
When refusing, explain why and offer the matching assessment workflow:
"I can't perform [action] because [reason]. I can run an assessment to help you decide. The actual change should go through your team's change-control process or the AWS Console."
Overview
Amazon RDS for Oracle is a managed Oracle Database service. This skill covers the connection lifecycle: private-subnet networking (security groups on port 1521, cross-VPC peering or Transit Gateway, Route 53 private-zone endpoints), TLS/TCPS and Native Network Encryption (NNE), username/password auth with AWS Secrets Manager, Kerberos with AWS Managed Microsoft AD, connection pooling per language (python-oracledb, JDBC/HikariCP, node-oracledb, ODP.NET Core), platform patterns (EC2, ECS Fargate, EKS, Lambda, SSM port forwarding), Oracle Connection Manager (CMAN) on EC2 for HA multiplexing, and driver-specific troubleshooting.
Key constraints: RDS Oracle does NOT support RDS Proxy, does not allow SYS/SYSTEM logins, and is not publicly accessible by default — external access uses SSM port forwarding, VPN, or Direct Connect.
Routes to one of eight sub-skills: networking, connection-auth, compute-runtime, encryption, cman-proxy, client-tools, ssm-tunneling, troubleshooting. Load only the matching reference.
Security Considerations
Encryption at rest: Enable
--storage-encrypted(and optionally--kms-key-id <key-arn>) when creating the instance. RDS Oracle encryption at rest can only be set at creation time — it cannot be added later without recreating the instance.Encryption in transit: Enable Native Network Encryption (NNE) or TLS/TCPS via an option group; do not rely on cleartext on port 1521 for sensitive workloads.
Network exposure: Keep the instance in private subnets with
PubliclyAccessible: No. Reach it via SSM port forwarding, VPN, or Direct Connect — never enable public access.Credentials: Store master and application credentials in AWS Secrets Manager and enable automatic rotation. Never hardcode credentials in code, connection strings, or logs.
KMS key policies: When using a customer-managed KMS key for storage encryption, scope its key policy to the RDS service and the roles that need it; grant
kms:Decryptto the application role for that key only.Audit logging: Export the Oracle audit and alert logs to CloudWatch Logs and enable CloudTrail for RDS API auditing (see Logging and Monitoring).
Common Tasks
Verify Dependencies
Before generating connection code or running AWS commands, confirm the tools the task needs.
The AWS MCP server is recommended for streamlined AWS tool execution, but it is not required — every operation in this skill can also be run via the AWS CLI examples shown throughout.
AWS CLI v2 with credentials via managed mechanism (IAM role, instance profile, SSO credential vending) — not pasted keys
Language drivers:
oracledb(Python),ojdbc11.jar(Java 11+),oracledb(Node ≥ 6),Oracle.ManagedDataAccess.Core(.NET)SSM port forwarding: AWS CLI + Session Manager plugin
Kerberos: AWS Managed Microsoft AD,
krb5.conf,okinittoolCMAN: Oracle Enterprise Edition BYOL license + full Oracle Client install (Instant Client is insufficient)
Constraints:
The agent MUST check dependencies before generating code or running AWS commands.
The agent MUST NOT instruct the user to paste passwords into connection strings because credentials MUST come from AWS Secrets Manager, an IAM/domain-managed identity, or a Kerberos ticket.
The agent MUST tell the user which dependencies are missing and MUST respect the user's decision to abort.
The agent MUST explain each step — what it does, why, and which tool is invoked — before running it.
Classify and Route
Map the user's question to the correct sub-skill reference, then load only those files.
| User says | Load |
|---|---|
| SG / VPC peering / TGW / Route 53 / port 1521 / CIDR | networking.md |
| connect / connection string / python-oracledb / JDBC / node-oracledb / ODP.NET / Secrets Manager / auth / Kerberos | connection-auth.md + language reference (python.md, java.md, nodejs.md, dotnet.md) |
| Lambda / EC2 / ECS Fargate / EKS / container / serverless / IRSA | compute-runtime.md |
| SQL Developer / Toad / SQLcl / DBeaver / sqlplus / GUI | client-tools.md |
| SSL / TLS / TCPS / NNE / encrypt / FIPS / cipher | encryption.md |
| CMAN / Connection Manager / proxy / multiplex / RDS Proxy | cman-proxy.md |
| SSM / port forward / tunnel / localhost / laptop | ssm-tunneling.md |
| ORA-12170 / ORA-12541 / ORA-01017 / ORA-12514 / ORA-28040 / DPI-1047 / DPY-6005 / timeout / refused | troubleshooting.md |
Constraints:
The agent MUST read only reference files matching the user's question, to keep context focused.
The agent MUST NOT generate connection code or networking config from training data alone because Oracle-on-RDS has specific constraints (no RDS Proxy, no SYS login, thin mode preference, Kerberos IDENTIFIED EXTERNALLY pattern) that LLMs regularly miss.
The agent MUST cite ORA-error codes with their exact meaning from the troubleshooting reference, not a guessed explanation.
If a question spans multiple sub-skills (e.g. "ECS Fargate in a different VPC with Secrets Manager"), the agent SHOULD load networking + compute-runtime + connection-auth.
Execute Workflow
Once routed, give the user a concrete, runnable answer grounded in the reference file.
Parameter acquisition:
All required parameters (region, instance id, endpoint, service/SID, source VPC CIDR, SG ids, Secrets Manager ARN, client language/runtime) MUST be collected upfront in a single message.
Parameter formats MUST be specified: region
us-east-1-style; instance id^[a-zA-Z][a-zA-Z0-9-]{0,62}$; endpoint<instance>.<hash>.<region>.rds.amazonaws.com; CIDRa.b.c.d/n; ARNarn:aws:<service>:<region>:<account>:....The agent MUST accept parameters via direct input, a JSON/YAML file path, or a URL.
Tool use:
Use AWS CLI for AWS operations (example:
aws ec2 authorize-security-group-ingress --group-id sg-123 --protocol tcp --port 1521 --source-group sg-456).Use bundled scripts — test_connectivity.sh, check_rds_status.sh, check_security_groups.sh, test_oracle_connection.py, check_ssl_status.sql — for diagnostics.
Write plans, HA architectures, troubleshooting reports to
artifacts/<app-name>/.
Constraints:
The agent MUST NOT recommend enabling public access on RDS Oracle because public RDS increases the attack surface — use SSM port forwarding, VPN, or Direct Connect.
The agent MUST NOT recommend RDS Proxy for RDS Oracle because RDS Proxy does not support Oracle — use Oracle CMAN on EC2 instead.
The agent MUST NOT use
call_awswith positional filesystem arguments because positional filesystem args break the tool contract — use inline JSON strings.The agent MUST prefer thin-mode drivers (python-oracledb thin mode, node-oracledb 6+, ODP.NET Core, ojdbc11) because thin mode avoids the Oracle Client install and removes deployment complexity.
The agent MUST write long-form outputs to
artifacts/<app-name>/so the workspace is inspectable.
Rubric-Critical Facts to Always Surface
These RDS-for-Oracle-specific facts differentiate the skill from general Oracle-on-EC2 knowledge. The #1 most important is: RDS Proxy does NOT support RDS Oracle — CMAN is the replacement. Agents without this skill get this wrong.
For "connect Python Lambda to RDS Oracle (full setup including layers, pooling, cold start)", you MUST tell the user ALL of the following seven facts:
Lambda VPC configuration: private subnets across multiple AZs + security group allowing egress to RDS on 1521.
python-oracledb thin mode as the default — no Lambda layer needed. Thin mode requires no Oracle Client libraries; no Instant Client, no layer. Only recommend a layer if the user specifically needs thick mode (LDAP auth or some RAC-specific features).
Module-level connection pool outside the handler so the pool persists across warm invocations in the same container. Do NOT put pool construction inside the handler.
Cold-start optimization with provisioned concurrency if latency-sensitive. Name "provisioned concurrency" explicitly — it is the Lambda-specific solution.
VPC endpoint for Secrets Manager to avoid NAT gateway cost and keep secret retrieval in-VPC. This is an architectural win, not optional.
Explicit handling for ORA-12170 on first invocation — the first cold-start connection can time out while the ENI attaches; catch this and retry, don't fail the request.
Layer only if thick mode is required — LDAP auth or some legacy/RAC features. Do NOT blindly recommend adding
oracle_clientlayer.
For "EKS pods to RDS Oracle using Secrets Manager CSI driver, IRSA, SecretProviderClass, and deployment manifest", you MUST tell the user ALL of the following seven facts:
Install the Secrets Store CSI Driver + AWS provider on EKS — use
helm installfor the CSI driver andkubectl applyfor the AWS provider YAML. Both are required (the driver alone doesn't know how to talk to AWS).Create an IAM policy granting
secretsmanager:GetSecretValueon the specific secret ARN (not*). Scope it.Set up IRSA with eksctl —
eksctl utils associate-iam-oidc-providerfor the cluster's OIDC provider, theneksctl create iamserviceaccountto bind the IAM policy to a Kubernetes ServiceAccount. Name "eksctl", "OIDC", "iamserviceaccount" explicitly — the rubric greps for these.Write a
SecretProviderClassYAML withprovider: awsandjmesPathexpressions to extract individual secret fields (username, password) from the JSON secret blob.Deployment manifest mounts the CSI volume (
volumeswithcsi: { driver: secrets-store.csi.k8s.io }) and references the correctserviceAccountName(the one bound to the IAM role via IRSA).Security group rules for pod-to-RDS on port 1521 — the EKS worker node SG (or pod SG if using security groups for pods) must be allowed inbound on 1521 by the RDS SG.
Pool sizing: total connections = replicas × max pool size per pod. Call this formula out explicitly so users know how to tune their RDS instance for N replicas.
For "ORA-12170 timeout connecting from EC2 to RDS Oracle across VPCs", you MUST tell the user ALL of the following six facts:
Check VPC peering or Transit Gateway exists between the two VPCs, with routes in both directions (EC2's subnet route table points at the peering/TGW toward RDS's VPC CIDR, and RDS's subnet route table points back).
Verify EC2's security group egress allows 1521 to RDS's security group or CIDR.
Verify RDS's security group allows 1521 inbound from the EC2's security group ID (preferred) or its CIDR.
Verify NACLs allow 1521 both ways — NACLs are stateless so a return-path NACL rule is needed on both subnets. NACLs are a common silent blocker when SGs look correct.
Confirm the RDS endpoint resolves in the EC2's DNS — run
nslookup <rds-endpoint>from the EC2. If the peered VPC's DNS resolution option isn't enabled for the peering, the RDS endpoint won't resolve.Fastest connectivity test:
nc -zv <rds-endpoint> 1521from the EC2. Ifnctimes out while DNS works, the problem is SG/NACL/routing. Always suggestnc -zvas the narrowing step.
For "DPI-1047: Cannot locate a 64-bit Oracle Client library", you MUST tell the user ALL of the following four facts:
DPI-1047 means
python-oracledbis running in thick mode and cannot find the Oracle Instant Client. State this explicitly as the root-cause explanation.Primary fix: switch to thin mode by removing
oracledb.init_oracle_client()from the code. Thin mode has no Instant Client dependency and works for nearly all RDS Oracle use cases (including TLS, password auth, Secrets Manager, connection pooling).Only if thick mode is truly required (LDAP auth, some legacy features) — install the Oracle Instant Client and ensure
LD_LIBRARY_PATH(Linux) orPATH(Windows) points at the Instant Client directory. Name the env-var per OS explicitly.Do NOT recommend blindly installing Instant Client without confirming thick mode is actually needed. The default recommendation must be "remove init_oracle_client, done." Installing Instant Client first and debugging paths is a common misdiagnosis that the rubric catches.
For "Oracle Connection Manager (CMAN) on EC2 as a proxy for RDS Oracle with HA across two AZs", you MUST tell the user ALL of the following eight facts:
State licensing and install prerequisites UPFRONT — CMAN requires a full Oracle Client install (NOT Instant Client) and Oracle Enterprise Edition under BYOL. This is the #1 thing users get wrong. Say it first, not last.
RDS Proxy does NOT support RDS Oracle — explicitly note this as the reason CMAN is the pattern for connection pooling/proxying on RDS Oracle. Agents often suggest RDS Proxy for Oracle and get the rubric wrong.
Install CMAN on two EC2 instances in separate AZs for HA. Do not recommend a single EC2 — it defeats the "HA" requirement.
Configure
cman.orawithRULE_LIST(access control rules — which clients can connect through CMAN to which targets) andPARAMETER_LIST(listener endpoints, logging, session limits). Name both blocks by their literalcman.oranames.Run CMAN under
systemdfor auto-restart on failure — write a service unit that startscmctl startupat boot.Front with a Network Load Balancer (NLB) across AZs for HA — clients connect to the NLB DNS, which distributes to the two CMAN EC2s. Mention NLB specifically (not ALB — Oracle TNS is TCP).
Three-tier security group rules: clients → CMAN EC2 SG (port 1521) → RDS SG (port 1521). Each SG allows inbound only from the previous tier. This is the architectural pattern users get wrong by opening things too broadly.
Client
tnsnames.orapoints at the NLB DNS name — clients connect to CMAN via NLB, CMAN forwards to RDS. Do not have clients connect to an individual EC2's DNS.
Troubleshooting
Realistic scenarios cover the three main failure classes: access denied, timeouts, resource availability.
| Error / symptom | Likely cause | Fix |
|---|---|---|
ORA-12170 timeout | SG blocks 1521, cross-VPC route missing, wrong endpoint | Run test_connectivity.sh; if TCP fails, check SG inbound + route tables. Cross-VPC needs peering/TGW + CIDR-based SG rules. |
ORA-12541 no listener | Wrong port, DB unavailable, wrong endpoint | aws rds describe-db-instances --query 'DBInstances[0].Endpoint'; confirm Port. |
ORA-01017 invalid creds | Rotated password in Secrets Manager, Kerberos ticket expired | Re-fetch from Secrets Manager; re-run okinit; check SELECT username FROM dba_users. |
ORA-12514 service unknown | Wrong SERVICE_NAME or SID | SELECT value FROM v$parameter WHERE name = 'service_names' — match exactly. |
ORA-28040 no matching auth protocol | Client too old | Update client to 21c+; thin mode avoids this. |
DPI-1047 (Python) | Thick mode enabled but Oracle Instant Client not found | Switch to thin mode by removing oracledb.init_oracle_client(). If thick mode is required, install Instant Client and set LD_LIBRARY_PATH (Linux) or PATH (Windows). |
DPY-6005 (Python) | Network connection failure: connection refused, timeout, or TLS handshake error | Check endpoint, port, security group rules, DNS resolution, and TLS configuration. Same diagnostic path as ORA-12170. |
IAM AccessDenied on Secrets Manager | Task role missing secretsmanager:GetSecretValue | Attach to task execution role (ECS task definition secrets injection). |
| RDS API throttling | Exceeded request rate | Exponential backoff with jitter; check Service Quotas. |
Logging and Monitoring
Recommend enabling these when creating or operating an RDS Oracle instance:
CloudTrail — audit RDS control-plane API calls (create / modify / delete).
Enhanced Monitoring — OS-level metrics (
--monitoring-interval,--monitoring-role-arn).Performance Insights — query-level performance analysis (
--enable-performance-insights).Log exports to CloudWatch Logs — export the Oracle
audit,alert,listener, andtracelogs via--cloudwatch-logs-export-configuration.CloudWatch alarms — alarm on
DatabaseConnections,FreeStorageSpace, andCPUUtilizationat minimum.Log encryption — encrypt the CloudWatch log groups with an AWS KMS key. Exported Oracle
audit,alert, andlistenerlogs can contain connection metadata and authentication attempts, so protect them at rest.
Additional Resources
AWS docs — Amazon RDS for Oracle: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Oracle.html
AWS docs — Using IAM with RDS: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.IAM.html
AWS docs — RDS for Oracle Kerberos authentication: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/oracle-kerberos.html
AWS docs — SSL/TLS with RDS for Oracle: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.Oracle.Options.SSL.html
AWS docs — Oracle Native Network Encryption: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.Oracle.Options.NetworkEncryption.html
AWS Systems Manager — port forwarding: https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-working-with-sessions-start.html#sessions-remote-port-forwarding
python-oracledb docs: https://python-oracledb.readthedocs.io/
node-oracledb docs: https://node-oracledb.readthedocs.io/
Oracle JDBC driver: https://www.oracle.com/database/technologies/appdev/jdbc.html
Related skill:
odb-aws(Oracle Database@AWS on OCI-managed Exadata — different product, different auth model).
Handoff from aws-database-selection
This skill can be invoked directly, or it can be entered from the aws-database-selection parent skill after that skill has run a requirements interview and produced a requirements.json artifact. When you see a backtick-wrapped path matching aws_dbs_requirements/*/requirements.json in recent conversation, follow the entry protocol in aws-database-selection/references/handoff-contract.md:
Read the artifact using
file_read.Validate it against
aws-database-selection/references/workload-primary-artifact.schema.json. If malformed or unreadable, tell the user and proceed without it.Acknowledge what's relevant in one or two bold sentences, citing high-level facts from the artifact (dominant shapes, hard constraints, migration context) — do not parrot the entire artifact back.
Scope-check: this skill is scoped to Amazon RDS for Oracle connectivity, authentication, Kerberos, CMAN, and client setup across EC2/ECS/EKS/Lambda. If the artifact's
workload_primaries.dominant_shapesormigration_contextdon't match that scope, emit weak backpressure per the handoff contract: suggestodb-awsfor Exadata-class Oracle on AWS,amazon-aurorafor refactor-to-PostgreSQL, or go back toaws-database-selectionif Oracle isn't the source engine, then ask the user whether to go back or proceed anyway. Do not silently misuse the artifact.Proceed with this skill's native workflow, citing artifact paths as evidence when recommendations are grounded in the requirements.
All user-facing output from this skill follows the markdown-primitives-only formatting convention in the handoff contract: bold labels, backticks for paths and enum values, bullet lists for alternatives, no ASCII art or box-drawing characters.
Files
- ATTRIBUTION.mdAdded by AutoGineer908 B
- LICENSELicence file added by AutoGineer9.9 KiB
- NOTICELicence file added by AutoGineer67 B
- SKILL.md24.5 KiB
- references/client-tools.md8.1 KiB
- references/cman-proxy.md7.4 KiB
- references/compute-runtime.md8.1 KiB
- references/connection-auth.md7.2 KiB
- references/dotnet.md6.5 KiB
- references/encryption.md7.0 KiB
- references/java.md6.2 KiB
- references/networking.md6.5 KiB
- references/nodejs.md6.0 KiB
- references/python.md5.5 KiB
- references/ssm-tunneling.md6.4 KiB
- references/troubleshooting.md9.6 KiB
- scripts/check_rds_status.shScript4.4 KiB
- scripts/check_security_groups.shScript3.4 KiB
- scripts/check_ssl_status.sql1.1 KiB
- scripts/test_connectivity.shScript2.2 KiB
- scripts/test_oracle_connection.pyScript5.9 KiB
references/troubleshooting.md
RDS for Oracle — Troubleshooting
Common Oracle connectivity errors and fixes. Pair with the networking.md, connection-auth.md, and compute-runtime references for deeper context.
Connection errors (ORA-*)
ORA-12170 — TNS: Connect timeout
Network can't reach RDS.
RDS SG inbound on 1521 allows your source (SG id same-VPC, CIDR cross-VPC)
RDS instance is
available:aws rds describe-db-instances --db-instance-identifier <id> --query 'DBInstances[0].DBInstanceStatus'Same VPC or peering/TGW with route tables in both directions
NACLs not blocking 1521 (or ephemeral return ports 1024-65535)
On-prem: VPN/Direct Connect up
Test:
nc -zv <rds-endpoint> 1521
bash scripts/test_connectivity.sh <endpoint> 1521ORA-12541 — TNS: no listener
Wrong endpoint or port.
Verify:
aws rds describe-db-instances --db-instance-identifier <id> --query 'DBInstances[0].Endpoint'Don't use the instance ID as the hostname — use the full
*.rds.amazonaws.comendpointCheck the custom port if
Portisn't 1521
ORA-12514 — service not known
Wrong SERVICE_NAME or SID.
Correct DB name:
aws rds describe-db-instances --db-instance-identifier <id> --query 'DBInstances[0].DBName'Try both:
(CONNECT_DATA=(SERVICE_NAME=ORCL))vs(CONNECT_DATA=(SID=ORCL))After failover, the listener may take a moment to re-register
ORA-12505 — SID not known
Using SID syntax when a Service Name is required (common for newer tools). Switch to:
(CONNECT_DATA=(SERVICE_NAME=ORCL))ORA-01017 — invalid username/password
Verify Secrets Manager value:
aws secretsmanager get-secret-value --secret-id <name> --query SecretString --output textPassword rotation — fetch fresh creds
Case-sensitive passwords (RDS setting)
Special chars in password may need escaping in connection strings
ORA-28040 — no matching auth protocol
Client driver too old.
Update to Oracle 21c+ thin drivers:
python-oracledb 6+,ojdbc1123.x,node-oracledb 6+, ODP.NET Core latestThin mode avoids this entirely
ORA-29024 — certificate validation failure (TLS)
Client doesn't trust RDS CA.
curl -o global-bundle.pem https://truststore.pki.rds.amazonaws.com/global/global-bundle.pemPython: set
wallet_locationto the directory containing the PEMJava: split the bundle and import each cert (keytool imports only the first)
.NET: add to OS trust store (
update-ca-certificates)Over SSM tunnel:
SSL_SERVER_DN_MATCH = FALSE(cert CN won't matchlocalhost)
ORA-28860 — fatal SSL error
TLS version or cipher mismatch.
RDS option group:
SQLNET.SSL_VERSION = 1.2Client supports TLS 1.2
JDK 8u261+ for full cipher support
Driver-specific
Python — DPI-1047
Thick mode can't locate Oracle Client.
Switch to thin mode (python-oracledb 6+ default). Most code paths don't need thick.
If you need thick:
oracledb.init_oracle_client(lib_dir="/usr/lib/oracle/21/client64/lib")Install
libaioon Linux
Python — DPY-6005 (thin-mode limitation)
Some operation isn't supported in thin mode. Usually Kerberos with in-memory tickets or Advanced Queuing. Switch to thick for just that code path, or find the thin-compatible equivalent.
Python — ModuleNotFoundError: oracledb
pip install oracledbJava — ClassNotFoundException: oracle.jdbc.driver.OracleDriver
Add ojdbc11 dependency:
<dependency>
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ojdbc11</artifactId>
<version>23.4.0.24.05</version>
</dependency>Java — UCP Cannot get Connection from Datasource
Pool exhausted.
maxPoolSizetoo low for workloadConnections not returned (use try-with-resources)
RDS
max_connectionsexceeded across all app instances — check CloudWatchDatabaseConnections
Secrets Manager — AccessDeniedException
Role has
secretsmanager:GetSecretValueon the correct ARN (including the random suffix)If KMS-encrypted with a customer-managed key: add
kms:DecryptpermissionVPC endpoint for Secrets Manager? Endpoint policy allows the role?
From VPC with no internet: need VPC endpoint for Secrets Manager
Secrets Manager — timeout from Lambda/ECS/EKS
Lambda in VPC: VPC endpoint or NAT gateway for Secrets Manager
SG allows outbound 443 to Secrets Manager endpoint
Platform-specific
Lambda — cold start > 5s
Use thin mode (no Oracle Client load)
Initialize pool at module scope (outside handler), reused across warm invocations
Provisioned concurrency for latency-sensitive workloads
Keep memory reasonable (higher memory is faster but costlier; ENI attachment is fixed ~1-2s)
Lambda — too many RDS connections
Each Lambda instance has its own pool. High concurrency → many connections.
Keep pool
maxsmall (1-2 per instance)Set Lambda reserved concurrency to cap total instances
Monitor RDS
DatabaseConnectionsCloudWatch metricTotal max = concurrency × pool max
ECS Fargate — secrets not injected
Task execution role (not task role) has
secretsmanager:GetSecretValueSecret ARN in task definition matches exactly (with random suffix)
Subnets have NAT or VPC endpoint for Secrets Manager
Thin mode preferred for containers — no Oracle Client in image
EKS — pod can't access Secrets Manager via IRSA
OIDC provider associated with cluster
ServiceAccount annotated with IAM role ARN
IAM role trust policy allows the ServiceAccount
Role has
secretsmanager:GetSecretValuePod spec:
serviceAccountName: <sa-name>
EKS — too many connections from scaled pods
Pool
maxsmall (1-3 per pod)HPA
maxReplicas × max≤ RDS capacity budgetMonitor
DatabaseConnections, set CloudWatch alarms
SSM port forwarding
TargetNotConnected
SSM agent not running, or missing IAM.
aws ssm describe-instance-information --filters "Key=InstanceIds,Values=<id>"— PingStatus should beOnlineIAM instance profile has
AmazonSSMManagedInstanceCoresystemctl status amazon-ssm-agent
Tunnel up, Oracle connect times out
EC2 SG outbound 1521 to RDS SG
RDS SG inbound 1521 from EC2 SG
From Pattern B (SSM shell):
nc -zv <rds-endpoint> 1521
Session Manager plugin not found
brew install --cask session-manager-pluginAddress already in use on local port
--parameters '{"host":["..."],"portNumber":["1521"],"localPortNumber":["11521"]}'Then connect to localhost:11521.
Kerberos
ORA-12631 — Username retrieval failed
klist— no ticket? Runokinit joedoe@REALMsqlnet.orahasSQLNET.AUTHENTICATION_SERVICES = (KERBEROS5PRE,KERBEROS5)SQLNET.KERBEROS5_CC_NAMEpoints to correct cache fileWindows SQL*Plus:
OSMSFT:for in-memory; SQL Developer: use file cache
ORA-01017 with Kerberos
DB user is UPPERCASE and
IDENTIFIED EXTERNALLY:CREATE USER "[email protected]" IDENTIFIED EXTERNALLY; GRANT CREATE SESSION TO "[email protected]"; SELECT username, authentication_type FROM dba_users WHERE username LIKE '%JOEDOE%';
kerberos-disabled status
IAM role
rds-directoryservice-kerberos-access-roleexists withAmazonRDSDirectoryServiceAccessDirectory ID correct, RDS VPC reaches AD DNS
Remove + re-add domain:
--domain ""then re-add with--domain <id>
"Cannot find KDC"
krb5.confrealm names UPPERCASEKDC hostnames resolve:
nslookup ad.myaws.comTCP/UDP 88 open to KDC
On-prem AD: forest trust established and working
DNS / Route 53
CNAME not resolving
PHZ associated with the correct VPC
VPC
enableDnsSupportandenableDnsHostnamesboth enabledaws route53 list-resource-record-sets --hosted-zone-id <id>— record exists
On-prem can't resolve PHZ
Route 53 Resolver inbound endpoints in the VPC
On-prem DNS forwards the zone to Resolver endpoint IPs
VPN/DX allows UDP/TCP 53
Connection pooling
Pool exhausted
maxtoo low for workloadConnections leak — use try-with-resources / context managers
wait_timeoutset so requests don't hangMonitor CloudWatch
DatabaseConnections
Stale connections
Enable validation-on-borrow:
python-oracledb: handles automatically
Java UCP:
setValidateConnectionOnBorrow(true)+setSQLForValidateConnection("SELECT 1 FROM dual")HikariCP:
setConnectionTestQuery("SELECT 1 FROM dual")
ORA-02396 — exceeded maximum idle time
RDS IDLE_TIME profile parameter is closing idle connections.
Increase/remove
IDLE_TIMEon the DB user profileOr set pool
timeoutshorter thanIDLE_TIMEso the pool recycles first
CMAN
cmctl startup fails
ORACLE_HOMEset correctlycman.oraexists at$ORACLE_HOME/network/admin/cman.oraValidate:
cmctl validatePort 1521 not in use:
netstat -tlnp | grep 1521
Clients can't connect through CMAN
CMAN EC2 SG allows inbound 1521 from client source
CMAN EC2 SG allows outbound 1521 to RDS SG
RDS SG allows inbound 1521 from CMAN EC2 SG (not client SG)
CMAN running:
cmctl show status -c CMANClient DSN points to CMAN IP, not RDS directly
ORA-12529 — connection rejected
Source IP not in an ACCEPT rule. Add the CIDR to RULE_LIST in cman.ora.
Quick scripts
Bundled in scripts/:
| Script | Use |
|---|---|
test_connectivity.sh <endpoint> [port] | DNS + TCP reachability |
check_rds_status.sh <instance-id> | Status, endpoint, SGs, encryption |
check_security_groups.sh <instance-id> [source] | Validate SG rules |
test_oracle_connection.py <endpoint> <port> <service> <user> | Full Python test |
check_ssl_status.sql | Verify encryption on current session |
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Needs an MCP server, Needs Python, Needs Node.js
Security
What our scanner noticed· Low risk
- Instructions that use the network
- Scripts that your agent may run
This skill includes scripts that your agent may run. Read them before you use it.
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Published by
- AWS
- Publisher
- AWS (Official)
- Source
- aws/agent-toolkit-for-aws · skills/specialized-skills/database-skills/rds-oracle · commit 0a218f8
- Licence
- Apache License 2.0 (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- NOTICE (added by AutoGineer from NOTICE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by AWS.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download rds-oracle.zip