|« PreviousNext »|
|Did this page help you? Yes | No | Tell us about it...|
In Step 4: Launch an Instance, we created a security group that enabled HTTP over port 80. The security group allows all traffic to access the Amazon EC2 instance directly over HTTP/80. Since you created an Elastic Load Balancer, a more secure method is to allow only the load balancer to access your Amazon EC2 instance. In this task, you will update your security group to allow only the load balancer to access your Amazon EC2 instance over HTTP/80.
To configure your security group
Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.
In the top navigation bar, click US East (N. Virginia) in the region selector.
In the left navigation pane, click Security Groups.
On the Security Groups page, click the security group
webappsecuritygroup that you created previously. If you cannot see
your security group, you may need to select All Security Groups
from the Viewing drop-down list.
Under Security Group, click the Inbound tab.
In the row that displays port 80 (HTTP), click Delete.
In the Create a new rule list, click HTTP.
In the Source box, type
amazon-elb/amazon-elb-sg. This is the name of the
security group that AWS assigns to the Elastic Load Balancer. Click Add Rule.
Click Apply Rule Changes.
The rules for this security group will be enforced when the instances that use these rules are launched.
Now that you have configured your Amazon EC2 security group, you can move on to Step 9: Launch Amazon EC2 Instances Using Auto Scaling. Auto Scaling can adjust the number of running instances as traffic levels change.