So now let's talk Amazon RDS proxy.
So we know we can deploy our RDS database within RVPC
but now we can also deploy
a fully managed database proxy for RDS.
So you may say, okay,
we can access our RDS database directly.
Why do we need a proxy to access our database?
Well, if you use an Amazon RDS proxy
this will allow you, your application to pull
and share the database connections established
with the database.
So instead of having every single application connect
to your RDS database instance
they will be instead connecting to the proxy
and the proxy will pull these connections together
into less connections to the RDS database instance.
So why may you do this?
Well, this makes a lot of sense is you have a lot
of connections into your RDS database instance
and it's going to improve your database efficiency
by reducing the stress on database resources,
for example CPU and RAM,
and also minimize the open connections
and the timeouts into your database.
So that's one thing you need to look out for
from the exam perspective.
Now, as I said, the RDS proxy is fully serverless.
It's autoscaling.
So you don't need to manage its capacity
and it's highly available.
It's across multiple AZ.
And therefore, in case, for example,
there is a failover that happens
on your RDS database instance.
For example, it goes from the primary instance
to the standby instance, then it will,
thanks to the RDS proxy,
reduce the failover time by up to 66%.
So this is true for RDS and Aurora.
So again, instead of having all your applications connect
to the main RDS database instance
and then handle the failover themselves,
they will just connect to the RDS proxy,
which does not know any failover
and the RDS proxy will itself handle the failover
or the RDS database instance
therefore improving your failover time.
So something else you need to look for
from an exam perspective.
So the RDS proxy supports RDS
for MySQL, PostgreSQL, MariaDB
and also it supports Aurora for MySQL and PostgreSQL.
It doesn't require you to do any code change
in your application, just instead of connecting
to your RDS database instance or your Aurora database.
You'd now just connect to your RDS proxy and you are done.
On top of it,
there's a third advantage to using an RDS proxy.
It is to enforce IAM authentication for database
so to make sure that people can only connect
to your RDS database instance using IAM
and then these credentials can be securely stored
in another service called the AWS secrets manager.
So again, if you need to see a way
to enforce IAM authentication for your database,
think RDS proxy.
And finally, the RDS proxy is never publicly accessible.
So it's only accessible from within your VPC.
So you cannot connect over the internet to your RDS proxy
which is enhanced security.
And so one service we haven't seen that is going for sure
to be very helped by the RDS proxy
is called the Lambda functions
and the Lambda functions that will execute pieces
of code we'll see them later on in this course, okay.
You don't need to know them right now
but we have to tackle them right now
because of the RDS proxy feature.
And so the limit functions they can multiply.
Multiply many, many, many times
and they will appear and disappear very, very fast.
And therefore, imagine you have a hundred
or a thousand Lambda functions appearing and disappearing
just like that and opening up connections
into your RDS database instance.
They will be a big problem
because it will leave open connections and timeouts
and it will be a mess.
And therefore, what you do is that you use the RDS proxy
to pull connections for your Lambda functions.
And then the Lambda functions will overload the RDS proxy
but it's meant to be overload.
And the RDS proxy will pull these connections
into less connections to the RDS database instance
thus solving your problems, okay.
So that's it for this lecture.
I hope you liked it, and don't worry.
We'll review the proxy once again
once we go into the Lambda lectures,
but again RDS proxy is used to minimize
and pull connections on your RDS database instance.
It's also used to minimize failover time
and reduce it by up to 66%.
And also it's used to enforce IAM authentication
for your database and to securely store its credentials
in the secrets manager service.
Alright, that's it.
I hope you liked it.
And I will see you in the next lecture.