Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To remove database passwords from a Lambda application, use end-to-end IAM authentication with Amazon RDS Proxy. Lambda authenticates to the proxy with IAM, and the proxy authenticates to the database with IAM. This differs from standard IAM authentication for RDS Proxy, which still uses a database password stored in AWS Secrets Manager for the proxy-to-database connection.

What changes when you put RDS Proxy between Lambda and the database?

RDS Proxy sits between your Lambda function and an Amazon RDS or Aurora database. It manages a pool of database connections and can share connections across application requests, helping a database handle variable connection demand. It can also improve resilience by connecting to a standby database while preserving application connections. Those capabilities do not guarantee a particular speed-up or cost saving; results depend on your workload and configuration.

With end-to-end IAM, the proxy is also an authentication boundary: Lambda presents IAM credentials to the proxy, and the proxy uses IAM to connect to the database. The application does not need a database password in its code or Lambda configuration, and this design does not require a database-credential secret in Secrets Manager.

Standard IAM versus end-to-end IAM

The phrase “IAM authentication with RDS Proxy” can describe two different arrangements. Check both connection hops before assuming passwords have been eliminated.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter
  • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
  • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
  • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
  • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
  • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
Authentication mode Lambda to proxy Proxy to database Database password secret required?
Standard IAM authentication IAM Password retrieved by the proxy from Secrets Manager Yes
End-to-end IAM authentication IAM IAM No database-credential secret required

In the standard mode, each database account the proxy uses has its own Secrets Manager secret. It can provide IAM-authenticated access from Lambda to the proxy, but it does not meet the goal of removing stored database credentials. For that goal, configure end-to-end IAM.

Check engine, Region, and VPC support first

Before changing credentials, confirm that RDS Proxy and the required authentication mode are supported for your database engine version and AWS Region. AWS’s Lambda connectivity guidance covers RDS for MySQL, MariaDB, PostgreSQL, and SQL Server, as well as Aurora MySQL and Aurora PostgreSQL. RDS Proxy feature support can vary by engine version and Region, so consult the current Amazon RDS Proxy documentation and its compatibility information for your exact deployment.

Rank #2
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.

For the documented Lambda connectivity pattern, the function and database must be in the same VPC. Plan the security-group rules so the function can reach the proxy and the proxy can reach the database on the relevant database port. A working Lambda-to-proxy path alone is not sufficient if the proxy cannot reach the database.

Configure end-to-end IAM authentication

  1. Confirm network placement and access. Put the Lambda function in the database’s VPC, and check security-group paths for both Lambda-to-proxy and proxy-to-database traffic. Verify support for the selected engine version, Region, and authentication mode.
  2. Configure a database user for IAM authentication. Create or adapt the database account using the engine-specific AWS instructions. The required database-side setup differs by engine; do not assume that a SQL command for one engine applies to another.
  3. Configure the proxy for end-to-end IAM. Set the proxy’s default authentication scheme to IAM_AUTH and associate the required proxy IAM role. Follow AWS’s RDS Proxy IAM-authentication instructions for the role and database configuration.
  4. Scope IAM permissions to the intended database user. Grant the necessary rds-db:connect permission for the applicable database account and resource. Restrict its resource scope to the relevant account, Region, database resource identifier, and database username rather than copying sample identifiers or granting broader access than needed.
  5. Give the Lambda execution role the required access. The function’s role must be permitted to connect through the proxy as the intended database user. The exact resource ARN and authentication-token steps depend on the engine and runtime, so use the current AWS instructions for that combination.
  6. Point the application to the proxy endpoint and enable TLS. Use the RDS Proxy endpoint as the database host, configure TLS/SSL, and use a database client library compatible with the engine’s IAM authentication flow. AWS specifically instructs users to use TLS/SSL when connecting to a proxy with IAM authentication.
  7. Validate the application before removing old secrets. Confirm that the proxy is available, the function can reach its endpoint, IAM authentication succeeds, and the application’s queries work. If migrating from standard IAM authentication, follow AWS’s migration procedure and verify proxy availability and DefaultAuthScheme as directed before proceeding.

What to verify during troubleshooting

  • The function cannot reach the proxy: Check that the Lambda function is attached to the database’s VPC and that the function’s network path and security-group rules allow access to the proxy endpoint.
  • The proxy cannot connect to the database: Review the proxy-to-database network path and security-group rules separately from the Lambda-to-proxy path.
  • IAM authentication is denied: Confirm that the database user is configured for IAM authentication, that the proxy uses IAM_AUTH as its default authentication scheme, and that the relevant identities have narrowly scoped rds-db:connect permission for the intended user and resource.
  • TLS or client connection errors occur: Check the client library’s engine-specific IAM authentication support and ensure TLS/SSL is enabled in the connection settings.
  • A feature or setting is unavailable: Recheck engine-version and Region support against current AWS compatibility information; availability and service limits can change.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Should you use RDS Proxy for this change?

Use RDS Proxy with end-to-end IAM when the objective is to avoid storing a database password and to use IAM across both connection hops. Treat standard IAM as a distinct choice: it secures the Lambda-to-proxy hop with IAM but still depends on a Secrets Manager database credential for the proxy-to-database hop.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.

This is an AWS service-configuration change, not a hardware purchase. Evaluate proxy behavior and connection management against your own workload rather than assuming a universal performance benefit.

Best Value
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray
  • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.