DEV Community

Cover image for How I Created a Cost-Effective AWS Environment: A Guide to EC2, S3, and IAM
Adeniyi Deborah
Adeniyi Deborah

Posted on

How I Created a Cost-Effective AWS Environment: A Guide to EC2, S3, and IAM

Background
I have been learning cloud computing using AWS for about three weeks now and in that time I have been able to learn some basics skills in AWS cloud computing. I would like to share some of the skills I learnt and the steps I took in achieving them.
Creating a cost-effective AWS setup is crucial for maximizing performance and expenditures while maintaining security and scalability. This article will walk you through the steps I took to learn about AWS and create a cost-effective infrastructure that makes use of important services like EC2, S3, and IAM.

Step 1: Familiarization with AWS and Initial Setup
Creating an AWS Account:
I signed up for an AWS account using my email. AWS offers a Free Tier option which allows users to experiment with various services for 12 months without incurring charges, making it perfect for initial setup and learning.
Exploring the AWS Management Console: After logging in, I used the search bar at the top of the console to quickly discover services such as EC2, S3, and IAM. The search bar can be used to find every other service on AWS.

Step 2: Basic IAM setup
AWS Identity and Access Management (IAM) is important for securing your AWS environment and controlling access to resources. This is how I configured IAM to maintain security while keeping costs low:
Create IAM Users and Groups: Rather than using the root account for day-to-day operations, I created individual IAM users for each team member. This ensures that each user has their own access and accountability. I then grouped users by role and department, and assigned rights at the group level.
Enable Multi-Factor Authentication (MFA): I required MFA for all IAM users with console access, particularly administrative positions, to add an extra layer of defense against unwanted access.
Use IAM Roles for EC2 Instances: I issued IAM roles to EC2 instances, allowing them to securely connect with other AWS services such as S3 without storing credentials on the instance itself. This reduces the likelihood of credential leaks and streamlines access management.
Applying the Principle of Least Privilege: I issued policies that provided users only the permissions they required. For example, finance department was assigned read-only access while other departments were granted access to EC2 full-access and S3 full-access for development purposes.
**Set Budgets and Alerts: **I use AWS Budgets to set cost and usage budgets for various services. I set up alerts to send me mails when spending approached or exceeded specified limitations.

Conclusion: Understanding the AWS Management Console, optimizing EC2 and S3 setups, and applying secure IAM policies allowed me to construct a cost-effective AWS system. Regular monitoring and modifications guaranteed that the environment remained secure, scalable, and under budget, making AWS a powerful and cost-effective solution for cloud computing requirements.

Top comments (1)

Collapse
 
mopelola profile image
Mopelola Elegbede

Well done! A lengthy but absolutely insightful piece!