Welcome to the Team! π
Youβve just joined our dynamic team as a DevOps Engineer, and weβre thrilled to have you on board! π As we gear up for the holiday season, your mission is to:- Boost our computing power to handle increased traffic to our website.
- Onboard an intern with secure, limited access.
Letβs get started with Task 1: Launching EC2 Instances! π
What Youβll Learn π‘
- Launch EC2 instances for production and development environments.
- Understand EC2 basics, AMIs, and instance types.
- Create and apply tags for better resource management.
- Set up IAM policies to secure AWS resources.
π Step 1: Launch EC2 Instances
1. Log in to the AWS Management Console
- Open your AWS console.
- Navigate to the EC2 Dashboard.
Amazon EC2 (Elastic Compute Cloud) lets you rent virtual computers in the cloud. Think of them as remote servers that you can configure and use on-demand.
2. Switch Your Region π
Make sure to select the region closest to your location for optimal performance.3. Launch Your First EC2 Instance
- Name:
nextwork-production-yourname(replaceyournamewith your name). - Add Tags:
- Key:
Env - Value:
production
- Key:
Tags help organize resources, filter results, track costs, and apply policies.
- AMI: Choose a Free Tier-eligible option.
- Instance Type: Select a Free Tier-eligible type.
- Key Pair: Proceed without a key pair for simplicity (not recommended for long-term projects).
- Network and Storage: Leave defaults for now.
4. Launch a Development Instance
Repeat the steps above, but use these details:- Name:
nextwork-development-yourname - Add Tags:
- Key:
Env - Value:
development
- Key:
- Production: The live environment for end-users.
- Development: The testing ground for new features.
π‘οΈ Step 2: Create an IAM Policy
1. Navigate to the IAM Console
π‘ What is IAM?AWS Identity and Access Management (IAM) controls who can access your AWS resources and what actions they can perform.
2. Create a New Policy
- Choose JSON Editor and paste the following:
- Effect: Allows or denies actions.
-
Action: Specifies the allowed/denied actions (e.g.,
ec2:StartInstances). - Resource: Targets specific AWS resources.
- Condition: Limits actions based on tags.
-
Name:
NextWorkDevEnvironmentPolicy - Description: IAM policy for managing the development environment.
β¨ Bonus Step: Create an Account Alias
- Go to the IAM Dashboard.
- Click Create Account Alias.
- Enter:
nextwork-alias-yourname.
An alias makes your AWS login URL more user-friendly. For example:
- Default:
https://123456789.signin.aws.amazon.com/console/ - With Alias:
https://nextwork-alias-yourname.signin.aws.amazon.com/console/
π©βπ» Step 3: Create IAM Users and Groups
1. Create a New IAM User
- Navigate to the Users tab in the IAM Console.
- Add a user with these details:
- Username:
nextwork-intern - Access Type: AWS Management Console access.
2. Add the User to a Group
- Create a new group:
- Group Name:
NextWorkDevAccess - Policy: Attach
NextWorkDevEnvironmentPolicy.
- Add the intern to the group.
π― Recap and Next Steps
- β Launched production and development EC2 instances.
- β Created IAM policies to secure resources.
- β Onboarded an intern with limited access.
π Ready for More?
Explore the following next steps:- Set up SSH access for EC2 instances.
- Automate resource tagging using AWS Lambda.
- Monitor EC2 instances with CloudWatch.
π§ Contact
For questions or feedback, reach out: π¨ Email: [email protected] π Portfolio: Brian Kimemia GitHub: BrianKN019Thank you for exploring this project! Letβs innovate and build secure AWS solutions together. π