DB@AWS · AMAZON EFS · DATA PUMP
Use Amazon EFS with Oracle Autonomous Database Serverless on DB@AWS
Share on LinkedIn ↗Amazon EFS provides shared file storage that Oracle Autonomous Database Serverless can access through a private network connection.
In this guide, we configure EFS for an existing Oracle Database@AWS deployment, attach a shared directory to the database, and use Oracle Data Pump to export and import 100,000 synthetic accounts receivable invoices.
The final verification compares the original and imported tables: both contain 100,000 invoices, with matching invoiced, paid, and outstanding totals.
How the connection works
The database accesses an EFS mount target in the application VPC through ODB peering. An OCI private DNS record provides the EFS hostname lookup used by the database.
An EC2 instance mounts the same file system so we can prepare the shared folder and inspect files. It does not relay the database’s EFS traffic.

The Windows laptop runs SQL Developer. Its Session Manager tunnel connects to the database listener; EFS access happens separately between the database and the EFS mount target.
Before you begin
This guide continues from the existing DB@AWS deployment. Have the following ready:
- An Autonomous Database Serverless instance and working SQL Developer connection.
- An application VPC connected to the ODB network through ODB peering.
- An EC2 client accessible through Systems Manager Session Manager.
- Permissions to create EFS resources, modify security groups, and configure the associated OCI private DNS view.
The example uses these names:
| Component | Name |
|---|---|
| ODB network | network-01 |
| EFS file system | odb-adbs-efs-lab |
| EFS security group | odb-adbs-efs-nfs |
| Shared EFS folder | /adbs-dpump |
| Database directory | EFS_DPUMP_DIR |
| Database file system registration | AWS_EFS |
| Source table | AR_INVOICES_DEMO |
| Imported table | AR_INVOICES_EFS_RESTORED |
Replace network addresses, hostnames, and resource identifiers with your deployment’s values.
1. Create the EFS file system
In the AWS console, open Amazon EFS → File systems → Create file system, then select Customize.
Configure the file system as follows:
| Setting | Configuration used |
|---|---|
| Name | odb-adbs-efs-lab |
| File system type | Regional |
| Performance mode | General Purpose |
| Throughput mode | Bursting |
| Encryption at rest | Enabled |
| Automatic backups | Disabled |
| Lifecycle transitions | None |

Under Network access, select the application VPC connected to the ODB network.
For this deployment, we created one mount target in the same physical Availability Zone as the database. Check the AZ ID when comparing locations, because AZ letters can differ between accounts.
Configure the mount target’s security group
Create a security group named odb-adbs-efs-nfs in the application VPC.
Add these inbound rules:
| Type | Protocol | Port | Source |
|---|---|---|---|
| NFS | TCP | 2049 | ODB client subnet CIDR |
| NFS | TCP | 2049 | EC2 client security group |

The first rule permits database access through ODB peering. The second permits the EC2 client to mount the same file system.
Check the client security group’s outbound rules too: permit TCP 2049 to the EFS security group. Verify that the application VPC route table has the route back to the ODB client subnet through ODB peering, and that network ACLs permit the connection and its return traffic.
Select this security group for the EFS mount target. For this deployment, we left the optional file system policy blank.

Review the configuration and select Create. Wait until both the file system and mount target show Available.

Open the file system’s Network tab and record its mount target’s private IP. Also copy the EFS DNS name from the file system details.

2. Configure the database-side DNS record
From the database’s OCI page, open its associated:
VCN → DNS Resolver → Default private view → Private zones
Create a private zone using the exact EFS hostname:
YOUR_EFS_HOSTNAME

Inside the zone, open Records → Manage records → Add record.
Configure:
| Field | Value |
|---|---|
| Name | Blank, for the zone apex |
| Type | A — IPv4 address |
| TTL | 300 |
| Address | EFS mount target’s private IP |

Check that the resulting record name exactly matches the EFS hostname. Select Review changes, then Publish changes.

This mapping provides the database-side hostname lookup used in our deployment. It does not create the network route or grant file permissions.
If the mount target is replaced and its address changes, update this manually maintained record.
3. Mount Amazon EFS on EC2 and prepare the shared folder

Open the EC2 client through Systems Manager Session Manager.
Run the following commands in the EC2 Linux shell.
First, check that the NFS mount utility is available:
command -v mount.nfs4
Create the local mount point:
sudo mkdir -p /mnt/efs

Mount EFS using the mount target’s private IP:
sudo mount -t nfs4 -o nfsvers=4.1 YOUR_EFS_MOUNT_TARGET_IP:/ /mnt/efs
Confirm the mount:
findmnt /mnt/efs
The output should identify /mnt/efs as an NFS mount. Confirm this before creating the shared folder.
sudo mkdir -p /mnt/efs/adbs-dpump
For the isolated demonstration folder, we used the following shared-write permissions:
sudo chmod 1777 /mnt/efs/adbs-dpump

The sticky bit limits deletion of other users’ files. This is a permissive demonstration setting; use reviewed ownership and permissions for a production shared directory.
Check the result:
ls -ld /mnt/efs/adbs-dpump
These commands mount EFS for the current EC2 session. After an instance restart, check the mount again before using the folder.
4. Attach EFS to Autonomous Database
Connect to the database as ADMIN in SQL Developer.
Permit access to the EFS hostname
Replace the hostname and run:
BEGIN
DBMS_NETWORK_ACL_ADMIN.APPEND_HOST_ACE(
host => 'YOUR_EFS_HOSTNAME',
ace => xs$ace_type(
privilege_list => xs$name_list('connect', 'resolve'),
principal_name => 'ADMIN',
principal_type => xs_acl.ptype_db
)
);
END;
/

Configure outbound connections through the private endpoint:
ALTER DATABASE PROPERTY SET
ROUTE_OUTBOUND_CONNECTIONS = 'ENFORCE_PRIVATE_ENDPOINT';

Create the database directory:
CREATE DIRECTORY EFS_DPUMP_DIR AS 'efs_dpump';

Attach the prepared EFS folder:
BEGIN
DBMS_CLOUD_ADMIN.ATTACH_FILE_SYSTEM(
file_system_name => 'AWS_EFS',
file_system_location => 'YOUR_EFS_HOSTNAME:/adbs-dpump',
directory_name => 'EFS_DPUMP_DIR',
description => 'EFS staging folder for Data Pump dump files',
params => JSON_OBJECT('nfs_version' VALUE 4)
);
END;
/

Confirm the registration:
SELECT file_system_name,
file_system_location,
directory_name,
nfs_version
FROM dba_cloud_file_systems
WHERE file_system_name = 'AWS_EFS';
Verify that the database can write a file
Run this in SQL Developer:
DECLARE
l_file UTL_FILE.FILE_TYPE;
BEGIN
l_file := UTL_FILE.FOPEN(
'EFS_DPUMP_DIR',
'adbs_efs_write_test.txt',
'w'
);
UTL_FILE.PUT_LINE(l_file, 'Hello from ADBSLAB01');
UTL_FILE.FCLOSE(l_file);
END;
/

Then read the file from the EC2 Linux shell:
cat /mnt/efs/adbs-dpump/adbs_efs_write_test.txt
Our result was:
Hello from ADBSLAB01

This confirmed that the database and EC2 client could access the same shared folder.
5. Prepare the sample accounts receivable data
We reused AR_INVOICES_DEMO from the S3 integration walkthrough. If you already have that table, keep it and skip the creation script below. For a fresh deployment, first confirm that the name is unused:
SELECT object_name, object_type
FROM user_objects
WHERE object_name = 'AR_INVOICES_DEMO';
When the query returns no rows, create the synthetic data as ADMIN:
CREATE TABLE ar_invoices_demo AS
WITH synthetic_data AS (
SELECT
LEVEL AS invoice_id,
'INV-' || TO_CHAR(LEVEL, 'FM00000000') AS invoice_number,
MOD(LEVEL - 1, 500) + 1 AS customer_id,
'Demo Customer ' ||
TO_CHAR(MOD(LEVEL - 1, 500) + 1, 'FM0000') AS customer_name,
DATE '2026-01-01' +
TRUNC(DBMS_RANDOM.VALUE(0, 300)) AS invoice_date,
ROUND(DBMS_RANDOM.VALUE(100, 50000), 2) AS invoice_amount,
TRUNC(DBMS_RANDOM.VALUE(1, 5)) AS payment_category
FROM dual
CONNECT BY LEVEL <= 100000
),
payment_data AS (
SELECT
invoice_id, invoice_number, customer_id, customer_name,
invoice_date, invoice_date + 30 AS due_date,
'USD' AS currency_code,
invoice_amount,
CASE payment_category
WHEN 1 THEN invoice_amount
WHEN 2 THEN ROUND(invoice_amount * 0.50, 2)
ELSE 0
END AS paid_amount
FROM synthetic_data
)
SELECT
invoice_id, invoice_number, customer_id, customer_name,
invoice_date, due_date, currency_code,
invoice_amount, paid_amount,
invoice_amount - paid_amount AS outstanding_amount,
CASE
WHEN paid_amount = invoice_amount THEN 'PAID'
WHEN paid_amount > 0 THEN 'PARTIALLY PAID'
ELSE 'UNPAID'
END AS payment_status
FROM payment_data;
The table contains 100,000 synthetic invoices across 500 demo customers, including invoice dates, due dates, invoice amounts, payments, outstanding balances, and payment status.
The sample was generated with CONNECT BY LEVEL to create rows and DBMS_RANDOM to produce varying dates and amounts.
Check the source data in SQL Developer:
SELECT COUNT(*) AS invoice_count,
COUNT(DISTINCT customer_id) AS customer_count,
SUM(invoice_amount) AS total_invoiced,
SUM(paid_amount) AS total_paid,
SUM(outstanding_amount) AS total_outstanding
FROM ar_invoices_demo;
Keep these results for comparison after the import. Randomly generated datasets can have different financial totals.
6. Export the table directly to EFS
Run the following script in SQL Developer using Run Script — F5.
Both the dump file and export log are written directly to EFS_DPUMP_DIR.
SET SERVEROUTPUT ON
DECLARE
l_handle NUMBER;
l_state VARCHAR2(30);
BEGIN
l_handle := DBMS_DATAPUMP.OPEN(
operation => 'EXPORT',
job_mode => 'TABLE'
);
DBMS_DATAPUMP.ADD_FILE(
handle => l_handle,
filename => 'ar_invoices_efs_export.dmp',
directory => 'EFS_DPUMP_DIR',
filetype => DBMS_DATAPUMP.KU$_FILE_TYPE_DUMP_FILE
);
DBMS_DATAPUMP.ADD_FILE(
handle => l_handle,
filename => 'ar_invoices_efs_export.log',
directory => 'EFS_DPUMP_DIR',
filetype => DBMS_DATAPUMP.KU$_FILE_TYPE_LOG_FILE
);
DBMS_DATAPUMP.METADATA_FILTER(
handle => l_handle,
name => 'SCHEMA_EXPR',
value => 'IN (''ADMIN'')'
);
DBMS_DATAPUMP.METADATA_FILTER(
handle => l_handle,
name => 'NAME_EXPR',
value => 'IN (''AR_INVOICES_DEMO'')',
object_path => 'TABLE'
);
DBMS_DATAPUMP.START_JOB(l_handle);
DBMS_DATAPUMP.WAIT_FOR_JOB(l_handle, l_state);
DBMS_OUTPUT.PUT_LINE('Export job state: ' || l_state);
END;
/
The export returned:
Export job state: COMPLETED

Check the generated files:
SELECT object_name, bytes
FROM DBMS_CLOUD.LIST_FILES('EFS_DPUMP_DIR')
WHERE object_name IN (
'ar_invoices_efs_export.dmp',
'ar_invoices_efs_export.log'
)
ORDER BY object_name;

7. Import the dump file from EFS
We import into a different table name so the original data remains available for comparison.
First, confirm that the target name is unused:
SELECT object_name, object_type
FROM user_objects
WHERE object_name = 'AR_INVOICES_EFS_RESTORED';
For the first run, this should return no rows.
Run the import script:
SET SERVEROUTPUT ON
DECLARE
l_handle NUMBER;
l_state VARCHAR2(30);
BEGIN
l_handle := DBMS_DATAPUMP.OPEN(
operation => 'IMPORT',
job_mode => 'TABLE'
);
DBMS_DATAPUMP.ADD_FILE(
handle => l_handle,
filename => 'ar_invoices_efs_export.dmp',
directory => 'EFS_DPUMP_DIR',
filetype => DBMS_DATAPUMP.KU$_FILE_TYPE_DUMP_FILE
);
DBMS_DATAPUMP.ADD_FILE(
handle => l_handle,
filename => 'ar_invoices_efs_import.log',
directory => 'EFS_DPUMP_DIR',
filetype => DBMS_DATAPUMP.KU$_FILE_TYPE_LOG_FILE
);
DBMS_DATAPUMP.METADATA_FILTER(
handle => l_handle,
name => 'SCHEMA_EXPR',
value => 'IN (''ADMIN'')'
);
DBMS_DATAPUMP.METADATA_FILTER(
handle => l_handle,
name => 'NAME_EXPR',
value => 'IN (''AR_INVOICES_DEMO'')',
object_path => 'TABLE'
);
DBMS_DATAPUMP.METADATA_REMAP(
handle => l_handle,
name => 'REMAP_TABLE',
old_value => 'AR_INVOICES_DEMO',
value => 'AR_INVOICES_EFS_RESTORED'
);
DBMS_DATAPUMP.START_JOB(l_handle);
DBMS_DATAPUMP.WAIT_FOR_JOB(l_handle, l_state);
DBMS_OUTPUT.PUT_LINE('Import job state: ' || l_state);
END;
/
The import returned:
Import job state: COMPLETED
This test exported and imported within the same database, using EFS as shared file storage and a separate target table.
8. Verify the imported data
Compare the invoice counts and financial totals:
SELECT 'ORIGINAL' AS table_source,
COUNT(*) AS invoice_count,
SUM(invoice_amount) AS total_invoiced,
SUM(paid_amount) AS total_paid,
SUM(outstanding_amount) AS total_outstanding
FROM ar_invoices_demo
UNION ALL
SELECT 'EFS_RESTORED',
COUNT(*),
SUM(invoice_amount),
SUM(paid_amount),
SUM(outstanding_amount)
FROM ar_invoices_efs_restored;

These checks confirmed the row count and financial aggregates for the imported table.
Verified result
We configured Amazon EFS as shared storage for Oracle Autonomous Database Serverless on DB@AWS.
The completed workflow covered EFS creation, private connectivity through ODB peering, database-side DNS, shared-folder permissions, and attachment through DBMS_CLOUD_ADMIN.
Oracle Data Pump then exported 100,000 synthetic invoices directly to EFS and imported the dump file into a separate table. The original and imported tables returned matching invoice counts and financial totals.
DNS observation
The AWS console showed the EFS mount target with a private 10.x.x.x address. A hostname lookup through UTL_INADDR.GET_HOST_ADDRESS inside Autonomous Database returned a different address in the 254.x.x.x range.

Despite that difference, the database successfully attached EFS, wrote a file, exported a dump file, and imported it.
We have not confirmed why the database-side lookup returned a different address. We are recording the observed behavior without attributing it to a specific internal networking mechanism.
References
- Oracle Database@AWS EFS integration and migration instructions
- Attach an NFS filesystem to Autonomous Database
- Private endpoint outbound routing
Keep your Oracle notebook growing
Get new Oracle walkthroughs in your inbox, or follow the blog in your favorite RSS reader.
Free email delivery through Blogtrottr. Enter and confirm your email on their site; unsubscribe from any email. The free service may include ads. Your email address is not collected by this blog.
Join the discussion
Ask a question, share a result, or add a useful tip.
Leave a comment
Your name and comment will be public. Keep passwords, email addresses, IP addresses, and other private details out of your comment. Cloudflare Turnstile checks submissions to help prevent spam.