Hi, everyone, and welcome back.
Now, in today's video, we are going to discuss about replicating the secrets that are part of the
Secrets Manager service.
Now, as part of the overall high availability, many of the organizations, they implement the overall
database architecture and as part of their disaster recovery, it is very important that all the components
that are necessary to bring up your entire production application are replicated.
For example, you see that you have a lambda function, you have an idea and this lambda function fetches
the secrets from the secrets manager to connect to the IDs instance.
And this is based on US East one, which is the North Virginia region.
Now, due to some reason, let's assume that as part of a worst case scenario, this region went down
or there are some connectivity issues related to this specific region.
So what that would mean, your entire application is down.
So in order to overcome this replication and disaster recovery based architecture is very important.
So in order to achieve this, it provides the functionality of replication not only for the databases.
So you see the database is also replicated to a different region, which is south one, but also the
secrets that are part of the secret manager can also be replicated to a different region because since
the database credentials are stored in secret manager and if the lambda function in the new region is
not able to fetch the credentials, then it will not be able to connect to the database and hence the
replication of secret manager secrets is also very important.
So before we proceed further, let's go ahead and quickly look into it.
Now for today's demo, I have a secret Collins product.
Now this secret is in Singapore region and we'll quickly look into how the replication would really
work.
Now, as part of the overall testing, I have the Secret Manager Service also open in the Mumbai region
where we will be performing the replication.
So this specific secret at this stage is not replicated.
So whenever we replicate the secret to another region, let's specify the Mumbai region over here,
you can go ahead and replicate this secret.
All right.
Once you have done that, then you will see the replication status.
As of now, it is in progress.
Now, at this stage you see the replication has been succeeded.
So in the Mumbai region, if you quickly refresh, you see our secret is currently available and within
your it is clearly stated that this is a replica of a secret in the Southeast one which is Singapore
region.
All right.
So I hope with this you understood the basics of the replication of secrets.
Now, in case if you would like, since this is a replica, in fact, let's also verify the secret value.
Secret value your secret user and secret password.
Now, if you will verify the secret value of the Singapore region, which is the original secret, you
have a secret user and secret password.
Now, in case if you like, you also have the option to promote this as a standalone secret.
Now, at this stage, if you want to manage this replica, you have to go to the primary region.
However, let's assume that you want to make this as a standalone secret and not a replica.
You can promote this to a standalone secret here.
Let's specify a South one and let's promote it.
Now.
This has become a replica.
Now you will be able to modify various things as part of this secret.
Now, since we have promoted this, the connection between both of them has broken.
So whenever you make a new update here, it will not be reflected here in case if there is a replica.
Any update to this primary secret will also be replicated to the replica.
Now, before we conclude, there are certain pointers that you need to note.
First one is that as we're discussing, you can replicate your secrets in multiple region to support
applications which are spread across those regions to meet the regional access and also the low latency
requirements.
This also helps in disaster recovery scenarios.
Apart from that, if you later need, you can promote the replica secret to standalone and then set
it up for replication independently.
This is something that we have seen.
And the last point is that if you turn on rotation of your primary secret, the secret manager rotates
the secret in primary region and whatever new value is present, that value will also be replicated
to the other regions, considering that a replica is set up.
Great.
So that's the high level overview about the overall replication.
And with this will conclude today's video.