

Here,traffic is controlled by Security Groups by allowing specific ports and Hosts associated to specific Security groups.ġ. Write an Infrastructure as code using terraform, which automatically create a VPC.Ģ. In that VPC we have to create 2 subnets:ġ. How ever using, bation host we can do ssh into private instance and then do the updates by going to internet where SNAT is enabled.Moreover, private instance is secred as no IP is assigned to it.Hence, bation host is used for management of private instance. So,we use NAT gateway present in public subnet which is used by instance in order to go to internet and nobody can come inside. But,our private instance can't go to internet which may be needed in case of security patches or updates. In the previous setup, we had MYSQL database in the private subnet which was only accessible from Wordpress instance. This host is typically placed in outside your network or security zone to protect against attacks and not expose your internal resources to the public Internet. In technology, a Bastion host is used to securely connect to resources on your network, typically for a single purpose. Which should not only increase your level of security, but increase the availability and speed of your applications.For detailed info about the components used in this article, refer to my previous article from the below link. These are high availability services with build in DoS protection.

With AWS IGW you can also utilise Application Load Balancer (ALB) and WAF to further secure your web applications served over AWS. Simply use an AWS NAT Gateway (to connect the EC2 instance)connected Internet Gateway (IGW)! If the bastion was used as a proxy to forward all relevant traffic to your private subnet, we need to make one more change.

You can additionally utilise AWS services like S3 storage, SNS, and cloudwatch! But what if the bastion was acting like a proxy? Straight away we have reduced the complexity of security, access & scalabililty, and due to the need for less EC2 instances - we have reduced our monthly AWS bill. We do not need double firewalls, we can easily maintain NACLs and SecurityGroups.Ĭompliance can alternatively be managed by AWS Config.Īccessibility and scalability are no longer an issue as SSM is highly available. Logging is still maintained by Cloudwatch and Cloudtrail, and SSM records commands issued and output. Access is controlled through IAM, and we can create fine grained access-control (FGA) through the use of inline-policies. In reality, this is just extra work for the Devsecops team and not really necessary! Scrapping the bastion hostīy scrapping the bastion host we can utilise the SSM capability to manage our EC2 instances.
#Bastion ec2 update
You need to update and patch on a regular basis. Security - what is the actual benefit of security? You have an extra EC2 instance to manage.Many cloud training outfits and AWS themselves have boasted several reasons, and good-architecture papers as to utiltise bastion hosts. Instead AWS Systems Manager (SSM) is viewed as a more secure alternative to manage your EC2 instances, with the additional benefit of lower administration costs. Recently, we attended an AWS workshop, where there appeared to be a change of opinion on the use of bastion hosts.
