-: In the last section, we set up
our ElastiCache Redis instance.
You should eventually see this thing flip over
with a status of green available.
If you don't see it ever flip over,
you can click the refresh button on the top right-hand side.
It should take some handful of minutes,
somewhere up to, I don't know, four or five minutes or so.
Now, just in case you skipped through the last section,
one thing I want you to triple check right now...
Make sure that you have a node type
of something like cache.t2.micro.
If you see something like m2.medium
or m2.large or m4 or something
like that, you might end up paying a decent amount
of money for this Redis instance so please make sure
that you did correctly update the node type.
And you can see the value of it right there.
So now that we've created both our Redis instance
and our Postgres instance, we're going to now create
a security group that is going to allow all three
of these different services to talk to each other.
So to create the security group,
we're going to go back over to the VPC dashboard.
To get there, I'll go to Services on the top left-hand side.
I'll search for VPC and click on the VPC option.
Then on the left-hand side, we're gonna scroll
down just a little bit, find the Security section
and go to Security Groups.
Now, in this list you're gonna see that we now have
a new security group listed that we did not have before.
It is the RDS Launch Wizard.
This is a security group that was automatically created
when we were making the Postgres instance.
We don't have to do anything with this.
We're going to actually create a new security group
to allow communication between our three services.
So to create a new security group, I'll click
on Create Security Group at the top.
And then we get prompted for a little bit of information.
For the name, I'll do Multi Dash Docker.
And for the description, I'll say something
like Traffic or Services in Multi...
Oops, Multi Dash Docker App.
And then I'll make sure that I have
my default VPC selected on this dropdown.
If you only have the default VPC created
in your account like I do, you're gonna see only
the one option right here.
If you have created other VPCs for any reason,
you'll want to make sure that you select the default VPC
unless you know what you're doing and you're trying
to create all this stuff in a separate VPC.
So then finally I'll click on Yes, Create.
Now we're gonna wait just a minute or two
for this thing to be created,
and then we'll see it up here on the list right here.
And so it's the one with the name tag of Multi Dash Docker.
So we just created this security group.
Now we need to create a rule inside of it
that's going to specifically allow traffic
between any service that is assigned to that security group.
So to create that rule, I'm gonna select
on the security group.
And then I'll go to the Inbound Rules tab
and I'll go to Edit to add a new inbound rule.
Now we're going to leave the type as custom TCP.
We'll leave the protocol as TCP, we'll leave
the port range as zero to just open up all ports.
Actually, you know what?
Let's restrict this just a little bit.
There's no reason to open up everything.
We'll allow just the ports between the default Redis port
and the default Postgres port.
So this will be everything from 5432 to 6379.
So I'll do 5432
to 6379.
And notice how I'm separating the two with a little dash.
Then for the source, this is the important part,
we're going to allow traffic from any other instance
that is in the same security group.
So I'll click on Source right here
and then I will select the SG Multi Dash Docker.
That is the security group that we just created,
that's the one that we're editing right now.
So I'll select that and that's going to allow traffic
between all the different services
that are assigned to this thing.
All right, so that's pretty much it.
I'll click on Save right here.
Save is successful.
And now that's pretty much it for the security rule.
Now, all we've done at this point was create
the security group.
We now have to go back through our three different services
and assign the security group to each one.
So we have to go look up Elastic Beanstalk instance,
we have to apply the security group.
We have to do the same thing for RDS and EC as well.
So let's take a quick pause right here
and continue in the next section.