DEV Community

D3fender0
D3fender0

Posted on

AWS 101 Workshop

1) Setup Networking (VPC)

  1. Navigate to the AWS Management Console and locate the VPC service.
  2. Click Create VPC.
  3. Select VPC and more. This will start the VPC wizard.
  4. Create a private and public subnet in 2 Availability Zone Each subnet is connected to a route table, which determines how network traffic is routed. The public subnets are routed to an Internet Gateway
  5. In the NAT gateways section, select 1 per AZ.
  6. Review the Network

Image description

2) security group
Browse to the Security Groups part of the Amazon EC2 service.
click Create security group to define a new custom security group for our resource
In the Inbound rules section click Add rule

  • Load Balancer --> HTTP TCP 80 Anywhere-IPv4 Allow HTTP inbound from Internet
  • EC2 --> HTTP TCP 80 Load Balancer Security Group Allow HTTP inbound from Load Balancer Tags are metadata labels you can apply to AWS resources for organization and cost tracking. Create a new tag for the security group by clicking Add new tag. Enter Name for Key and LoadBalancerSecurityGroup for Value. Finalize the creation by clicking Create security group.

Load Balancer:

Image description

Web Server:

Image description
(3) IAM

Browse to the IAM service and click create Role.
Select AWS Service. Choose EC2 for the service or use case.
Select EC2 Role for AWS Systems Manager and click Next
Confirm that the AmazonSSMManagedInstanceCore policy and AmazonS3ReadOnlyAccess Policy has been added to the role and click Next
Name the role. Scroll to the bottom and click Create role

Image description

Image description

(4) Deploy Compute (EC2)

Browse to the EC2 service.
Click Launch Instance.
Name the server and choose the created VPC, SG, add Role and paste the code then click create.

Image description

Upload the User data file:

Image description

(5) Administer Web Server (SSM)

In the Amazon EC2 dashboard, select the web server instance. You'll notice it only has a private IP address, not a public one
Select the Session Manager tab in ec2 instance and click Connect.
run the following command in the CLI by connecting the instance to the SSM

Image description

(6) Load Balancing (ALB)

Create Load Balancer:

Image description

Image description

Create Target Group:

Image description
(7) Test Web Server

Copy the DNS of the Load Balancer and paste it in a new browser tab

(8) Storage (S3)

Image description
Upload the files

Image description

Image description

Top comments (0)