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://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/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:
| Type | Protocol | Port | Source |
|---|---|---|---|
| Oracle-RDS | TCP | 1521 | Application SG id |
App SG outbound:
| Type | Protocol | Port | Destination |
|---|---|---|---|
| Oracle-RDS | TCP | 1521 | RDS SG id |
| HTTPS | TCP | 443 | Secrets 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:
| Type | Protocol | Port | Source |
|---|---|---|---|
| Oracle-RDS | TCP | 1521 | App 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:
| Type | Protocol | Port | Source |
|---|---|---|---|
| Oracle-RDS | TCP | 1521 | On-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-1Secrets Manager VPC endpoint (recommended)
Keeps Secrets Manager traffic off the internet:
Service: com.amazonaws.<region>.secretsmanager
Type: Interface
Private DNS: Enabled
SG: allow inbound TCP 443 from app SGCross-VPC connectivity
Option 1 — Transit Gateway (recommended for hub-and-spoke)
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-xxxxThen 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 Peering | Transit Gateway | |
|---|---|---|
| Transitive routing | No | Yes |
| Scalability | 1:1 per pair | Hub-and-spoke |
| SG-id cross-reference | Yes (with AllowDnsResolution) | No — use CIDR |
| Cost | Data transfer only | Hourly + data transfer |
| Bandwidth | No limit | 50 Gbps per attachment |
DNS resolution across VPCs
RDS endpoints resolve to private IPs inside the RDS VPC. For apps in other VPCs:
TGW with
DnsSupportenabled + VPCenableDnsSupport/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.comto 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 existsOr run scripts/test_connectivity.sh <endpoint> 1521 and scripts/check_security_groups.sh <instance-id>.
Troubleshooting
| Symptom | Check |
|---|---|
| DNS doesn't resolve cross-VPC | Enable DNS on peering/TGW, or add PHZ / Resolver rule |
| Timeout after DNS resolves | Route tables missing in one direction, or SG missing inbound from app CIDR |
| Intermittent timeouts | NACL ephemeral port range (1024-65535) blocked for return traffic |
| Works from one AZ, not another | Route table only associated with some subnets |
ORA-12170 | Network path blocked — check routes, SGs, NACLs |
ORA-12541 | DNS resolved to wrong IP — verify endpoint resolves to RDS private IP |
| Kerberos auth fails cross-VPC | App 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