Generated banner for Rds Oracle
Generated logo for Rds Oracle

Rds Oracle

AWSOfficialPublished by AWS

  • Skill
  • Tool integration
  • Cloud and DevOps
  • Apache-2.0
  • Low risk
  • Has scripts

From the author

Diagnoses and resolves Amazon RDS for Oracle connectivity, authentication, networking, and driver troubleshooting. Applicable to any RDS-for-Oracle question including connecting a Python Lambda to RDS Oracle in a VPC with pooling and cold-start optimization, EKS pods to RDS Oracle via the Secrets Manager CSI driver with IRSA and SecretProviderClass, ORA-12170 cross-VPC timeouts from EC2, DPI-1047 cannot-locate-64-bit-Oracle-Client errors, and Oracle Connection Manager (CMAN) on EC2 as a proxy with HA across two AZs. Covers python-oracledb thin vs thick mode, init_oracle_client, RDS Proxy does NOT support RDS Oracle, port 1521, VPC peering, Transit Gateway, Kerberos with AWS Managed Microsoft AD, SSL/TLS/NNE, SSM port forwarding, EC2/ECS Fargate/EKS/Lambda, SQL Developer/DBeaver/Toad/SQLcl, and Secrets Manager.
— the description by AWS

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

  1. Download the skill as a ZIP:

    https://autogineer.com/agent-skills/aws/rds-oracle/download
  2. Unzip 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 (family oracle-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-period

  • Enable/disable deletion protection: modify-db-instance --deletion-protection

  • Change CloudWatch log exports: modify-db-instance --cloudwatch-logs-export-configuration

  • Attach/detach parameter group or option group: modify-db-instance --db-parameter-group-name / --option-group-name

  • Tag 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-version within 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 loss

  • Delete automated backups: delete-db-instance --delete-automated-backups — destroys point-in-time recovery history

  • Force failover: reboot-db-instance --force-failover — production impact

  • Major version upgrade: modify-db-instance --engine-version across major versions (e.g., 19c → 21c) — requires prechecks, option group migration, and a rollback plan; should go through change-control

  • Reboot: reboot-db-instance — production impact

  • Promote a read replica: promote-read-replica — breaks replication and is rarely reversible

  • Enable 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:Decrypt to 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, okinit tool

  • CMAN: 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 saysLoad
SG / VPC peering / TGW / Route 53 / port 1521 / CIDRnetworking.md
connect / connection string / python-oracledb / JDBC / node-oracledb / ODP.NET / Secrets Manager / auth / Kerberosconnection-auth.md + language reference (python.md, java.md, nodejs.md, dotnet.md)
Lambda / EC2 / ECS Fargate / EKS / container / serverless / IRSAcompute-runtime.md
SQL Developer / Toad / SQLcl / DBeaver / sqlplus / GUIclient-tools.md
SSL / TLS / TCPS / NNE / encrypt / FIPS / cipherencryption.md
CMAN / Connection Manager / proxy / multiplex / RDS Proxycman-proxy.md
SSM / port forward / tunnel / localhost / laptopssm-tunneling.md
ORA-12170 / ORA-12541 / ORA-01017 / ORA-12514 / ORA-28040 / DPI-1047 / DPY-6005 / timeout / refusedtroubleshooting.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; CIDR a.b.c.d/n; ARN arn:aws:<service>:<region>:<account>:....

  • The agent MUST accept parameters via direct input, a JSON/YAML file path, or a URL.

Tool use:

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_aws with 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:

  1. Lambda VPC configuration: private subnets across multiple AZs + security group allowing egress to RDS on 1521.

  2. 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).

  3. 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.

  4. Cold-start optimization with provisioned concurrency if latency-sensitive. Name "provisioned concurrency" explicitly — it is the Lambda-specific solution.

  5. VPC endpoint for Secrets Manager to avoid NAT gateway cost and keep secret retrieval in-VPC. This is an architectural win, not optional.

  6. 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.

  7. Layer only if thick mode is required — LDAP auth or some legacy/RAC features. Do NOT blindly recommend adding oracle_client layer.

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:

  1. Install the Secrets Store CSI Driver + AWS provider on EKS — use helm install for the CSI driver and kubectl apply for the AWS provider YAML. Both are required (the driver alone doesn't know how to talk to AWS).

  2. Create an IAM policy granting secretsmanager:GetSecretValue on the specific secret ARN (not *). Scope it.

  3. Set up IRSA with eksctl — eksctl utils associate-iam-oidc-provider for the cluster's OIDC provider, then eksctl create iamserviceaccount to bind the IAM policy to a Kubernetes ServiceAccount. Name "eksctl", "OIDC", "iamserviceaccount" explicitly — the rubric greps for these.

  4. Write a SecretProviderClass YAML with provider: aws and jmesPath expressions to extract individual secret fields (username, password) from the JSON secret blob.

  5. Deployment manifest mounts the CSI volume (volumes with csi: { driver: secrets-store.csi.k8s.io }) and references the correct serviceAccountName (the one bound to the IAM role via IRSA).

  6. 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.

  7. 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:

  1. 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).

  2. Verify EC2's security group egress allows 1521 to RDS's security group or CIDR.

  3. Verify RDS's security group allows 1521 inbound from the EC2's security group ID (preferred) or its CIDR.

  4. 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.

  5. 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.

  6. Fastest connectivity test: nc -zv <rds-endpoint> 1521 from the EC2. If nc times out while DNS works, the problem is SG/NACL/routing. Always suggest nc -zv as 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:

  1. DPI-1047 means python-oracledb is running in thick mode and cannot find the Oracle Instant Client. State this explicitly as the root-cause explanation.

  2. 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).

  3. Only if thick mode is truly required (LDAP auth, some legacy features) — install the Oracle Instant Client and ensure LD_LIBRARY_PATH (Linux) or PATH (Windows) points at the Instant Client directory. Name the env-var per OS explicitly.

  4. 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:

  1. 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.

  2. 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.

  3. Install CMAN on two EC2 instances in separate AZs for HA. Do not recommend a single EC2 — it defeats the "HA" requirement.

  4. Configure cman.ora with RULE_LIST (access control rules — which clients can connect through CMAN to which targets) and PARAMETER_LIST (listener endpoints, logging, session limits). Name both blocks by their literal cman.ora names.

  5. Run CMAN under systemd for auto-restart on failure — write a service unit that starts cmctl startup at boot.

  6. 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).

  7. 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.

  8. Client tnsnames.ora points 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 / symptomLikely causeFix
ORA-12170 timeoutSG blocks 1521, cross-VPC route missing, wrong endpointRun test_connectivity.sh; if TCP fails, check SG inbound + route tables. Cross-VPC needs peering/TGW + CIDR-based SG rules.
ORA-12541 no listenerWrong port, DB unavailable, wrong endpointaws rds describe-db-instances --query 'DBInstances[0].Endpoint'; confirm Port.
ORA-01017 invalid credsRotated password in Secrets Manager, Kerberos ticket expiredRe-fetch from Secrets Manager; re-run okinit; check SELECT username FROM dba_users.
ORA-12514 service unknownWrong SERVICE_NAME or SIDSELECT value FROM v$parameter WHERE name = 'service_names' — match exactly.
ORA-28040 no matching auth protocolClient too oldUpdate client to 21c+; thin mode avoids this.
DPI-1047 (Python)Thick mode enabled but Oracle Instant Client not foundSwitch 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 errorCheck endpoint, port, security group rules, DNS resolution, and TLS configuration. Same diagnostic path as ORA-12170.
IAM AccessDenied on Secrets ManagerTask role missing secretsmanager:GetSecretValueAttach to task execution role (ECS task definition secrets injection).
RDS API throttlingExceeded request rateExponential 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, and trace logs via --cloudwatch-logs-export-configuration.

  • CloudWatch alarms — alarm on DatabaseConnections, FreeStorageSpace, and CPUUtilization at minimum.

  • Log encryption — encrypt the CloudWatch log groups with an AWS KMS key. Exported Oracle audit, alert, and listener logs can contain connection metadata and authentication attempts, so protect them at rest.

Additional Resources

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:

  1. Read the artifact using file_read.

  2. Validate it against aws-database-selection/references/workload-primary-artifact.schema.json. If malformed or unreadable, tell the user and proceed without it.

  3. 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.

  4. 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_shapes or migration_context don't match that scope, emit weak backpressure per the handoff contract: suggest odb-aws for Exadata-class Oracle on AWS, amazon-aurora for refactor-to-PostgreSQL, or go back to aws-database-selection if Oracle isn't the source engine, then ask the user whether to go back or proceed anyway. Do not silently misuse the artifact.

  5. 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

references/networking.md

RDS for Oracle — Networking

Security groups, cross-VPC connectivity, and Route 53 private endpoints.

Security rule: do NOT enable public access on RDS Oracle. Keep Publicly Accessible: No, private subnets only. External access goes through VPN, Direct Connect, or SSM port forwarding.

Security groups — the three patterns

Pattern A — App in same VPC (or peered VPC via SG reference)

RDS SG inbound:

TypeProtocolPortSource
Oracle-RDSTCP1521Application SG id

App SG outbound:

TypeProtocolPortDestination
Oracle-RDSTCP1521RDS SG id
HTTPSTCP443Secrets Manager VPC endpoint SG (preferred), or com.amazonaws.<region>.secretsmanager prefix list
Pattern B — App in a different VPC (Transit Gateway, or peering without SG-ref support)

Cross-VPC SG-id references only work with VPC peering when AllowDnsResolutionFromRemoteVpc = true. For Transit Gateway or any unclear case, use CIDR-based rules:

RDS SG inbound:

TypeProtocolPortSource
Oracle-RDSTCP1521App VPC CIDR (e.g. 10.0.0.0/16)
Pattern C — On-prem app via VPN/Direct Connect

Requires an established VPN or Direct Connect:

TypeProtocolPortSource
Oracle-RDSTCP1521On-prem CIDR block(s)

Never make RDS publicly accessible as a workaround.

AWS CLI
# Same-VPC
aws ec2 authorize-security-group-ingress \
  --group-id sg-rds-oracle \
  --protocol tcp --port 1521 \
  --source-group sg-app \
  --region us-east-1

# Cross-VPC via CIDR
aws ec2 authorize-security-group-ingress \
  --group-id sg-rds-oracle \
  --protocol tcp --port 1521 \
  --cidr 10.10.0.0/16 \
  --region us-east-1

Keeps Secrets Manager traffic off the internet:

Service: com.amazonaws.<region>.secretsmanager
Type: Interface
Private DNS: Enabled
SG: allow inbound TCP 443 from app SG

Cross-VPC connectivity

aws ec2 create-transit-gateway --description cross-vpc-tgw

aws ec2 create-transit-gateway-vpc-attachment \
  --transit-gateway-id tgw-xxxx --vpc-id vpc-app \
  --subnet-ids subnet-app-a subnet-app-b

aws ec2 create-transit-gateway-vpc-attachment \
  --transit-gateway-id tgw-xxxx --vpc-id vpc-rds \
  --subnet-ids subnet-rds-a subnet-rds-b

# Forward AND return route tables
aws ec2 create-route --route-table-id rtb-app \
  --destination-cidr-block <rds-vpc-cidr> --transit-gateway-id tgw-xxxx
aws ec2 create-route --route-table-id rtb-rds \
  --destination-cidr-block <app-vpc-cidr> --transit-gateway-id tgw-xxxx

Then SG inbound on RDS using the app VPC CIDR (SG-id refs don't cross TGW).

Option 2 — VPC Peering (1:1, cross-region supported)
aws ec2 create-vpc-peering-connection --vpc-id vpc-app --peer-vpc-id vpc-rds

# Accept (cross-account only)
aws ec2 accept-vpc-peering-connection --vpc-peering-connection-id pcx-xxxx

# Routes on both sides
aws ec2 create-route --route-table-id rtb-app \
  --destination-cidr-block <rds-vpc-cidr> --vpc-peering-connection-id pcx-xxxx
aws ec2 create-route --route-table-id rtb-rds \
  --destination-cidr-block <app-vpc-cidr> --vpc-peering-connection-id pcx-xxxx

# Enable DNS across peering (critical)
aws ec2 modify-vpc-peering-connection-options \
  --vpc-peering-connection-id pcx-xxxx \
  --requester-peering-connection-options '{"AllowDnsResolutionFromRemoteVpc":true}' \
  --accepter-peering-connection-options '{"AllowDnsResolutionFromRemoteVpc":true}'
Peering vs TGW
VPC PeeringTransit Gateway
Transitive routingNoYes
Scalability1:1 per pairHub-and-spoke
SG-id cross-referenceYes (with AllowDnsResolution)No — use CIDR
CostData transfer onlyHourly + data transfer
BandwidthNo limit50 Gbps per attachment

DNS resolution across VPCs

RDS endpoints resolve to private IPs inside the RDS VPC. For apps in other VPCs:

  • TGW with DnsSupport enabled + VPC enableDnsSupport/enableDnsHostnames — simplest same-account case.

  • Route 53 private hosted zone with CNAME to the RDS endpoint; associate with both VPCs.

  • Route 53 Resolver rules forwarding <region>.rds.amazonaws.com to the RDS VPC DNS (VPC + 2 IP).

Kerberos caveat

If using Kerberos, the app VPC must also resolve the AD domain. Share AWS Managed Microsoft AD via RAM, or add a Route 53 Resolver rule forwarding the AD domain to the AD DNS IPs.

Route 53 private endpoint (friendly DNS name)

Use a human-readable DNS like oracledb.example.internal.

# Create PHZ (first time)
aws route53 create-hosted-zone \
  --name example.internal \
  --vpc VPCRegion=us-east-1,VPCId=vpc-xxxxxxxx \
  --caller-reference "rds-oracle-$(date +%s)" \
  --hosted-zone-config PrivateZone=true

# Create CNAME to RDS endpoint
aws route53 change-resource-record-sets \
  --hosted-zone-id Z1234567890 \
  --change-batch '{
    "Changes":[{"Action":"UPSERT","ResourceRecordSet":{
      "Name":"oracledb.example.internal","Type":"CNAME","TTL":300,
      "ResourceRecords":[{"Value":"mydb.xxxxxxxxxxxx.us-east-1.rds.amazonaws.com"}]
    }}]
  }'

TTL guidance: 300s normal, drop to 60s before a planned failover. Multi-AZ failover is handled by RDS's own DNS; the CNAME follows automatically.

Pointing at CMAN instead of RDS directly: set the CNAME to the CMAN NLB DNS name (see cman-proxy.md).

Quick diagnostic (from an app instance)

nslookup mydb.xxxxxxxxxxxx.us-east-1.rds.amazonaws.com     # DNS resolution
nc -zv mydb.xxxxxxxxxxxx.us-east-1.rds.amazonaws.com 1521  # TCP reachability
ip route get <rds-vpc-cidr-first-ip>                        # route exists

Or run scripts/test_connectivity.sh <endpoint> 1521 and scripts/check_security_groups.sh <instance-id>.

Troubleshooting

SymptomCheck
DNS doesn't resolve cross-VPCEnable DNS on peering/TGW, or add PHZ / Resolver rule
Timeout after DNS resolvesRoute tables missing in one direction, or SG missing inbound from app CIDR
Intermittent timeoutsNACL ephemeral port range (1024-65535) blocked for return traffic
Works from one AZ, not anotherRoute table only associated with some subnets
ORA-12170Network path blocked — check routes, SGs, NACLs
ORA-12541DNS resolved to wrong IP — verify endpoint resolves to RDS private IP
Kerberos auth fails cross-VPCApp VPC can't reach AD DNS — add resolver rule forwarding the AD domain

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 or AWS.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download rds-oracle.zip