Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Amazon Fargate Quick Start Guide

You're reading from   Amazon Fargate Quick Start Guide Learn how to use AWS Fargate to run containers with ease

Arrow left icon
Product type Paperback
Published in Jul 2018
Publisher Packt
ISBN-13 9781789345018
Length 190 pages
Edition 1st Edition
Tools
Arrow right icon
Author (1):
Arrow left icon
Deepak Vohra Deepak Vohra
Author Profile Icon Deepak Vohra
Deepak Vohra
Arrow right icon
View More author details
Toc

Table of Contents (9) Chapters Close

Preface 1. Getting Started with Amazon ECS and Amazon Fargate FREE CHAPTER 2. Networking 3. Using CloudWatch Logs 4. Using Auto Scaling 5. Using IAM 6. Using an Application Load Balancer 7. Using Amazon ECS CLI 8. Other Books You May Enjoy

Granting security group Ingress


Next, add a security group rule to allow inbound access on port 80 with the Grant-EC2SecurityGroupIngress cmdlet, using the following commands run in the sequence listed:

$ip1 = new-object Amazon.EC2.Model.IpPermission
$ip1.IpProtocol = "tcp"
$ip1.FromPort = 80
$ip1.ToPort = 80
$ip1.IpRanges.Add("0.0.0.0/0")
Grant-EC2SecurityGroupIngress -GroupId $groupid -Region "us-east-1" -IpPermissions @($ip1)

Subsequently, run the Get-EC2SecurityGroup cmdlet again and, as the output here indicates, the Ingress permissions get set on the EC2 security group:

We shall be creating an ECS task for WordPress only, but if a MySQL database is also to be configured in the same task, we would also need to add an ingress rule for port 3306, which is exposed by the MySQL database. Run the following commands in the sequence listed to add ingress for port 3306:

$ip2 = new-object Amazon.EC2.Model.IpPermission
$ip2.IpProtocol = "tcp"
$ip2.FromPort = 3306
$ip2.ToPort = 3306
$ip2.IpRanges...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image