DEV Community

Cover image for Setting Up a Cost-Effective AWS Environment
Tijani Ibraheem
Tijani Ibraheem

Posted on

Setting Up a Cost-Effective AWS Environment

Introduction

As organizations increasingly migrate to the cloud, managing costs becomes a critical aspect of ensuring business sustainability. Amazon Web Services (AWS), with its vast array of services and scalable infrastructure, offers unparalleled flexibility and innovation. However, without careful planning and optimization, AWS costs can quickly spiral out of control. This article provides essential strategies and best practices for a cost-effective AWS setup. Now let’s begin.

AWS Environment Familiarization

Getting Started with the AWS Management Console

Begin by signing in to the AWS Management Console, where you’ll set up your account and familiarize yourself with the dashboard. This interface is your gateway to all AWS services, providing easy navigation and access to various resources. The image below shows us what a typical AWS console looks like, however, depending on what you are doing or if you have never done anything on your console, your console might look a little different from this.

AWS Console Img

Navigating AWS Services

AWS offers a range of services, but key ones to start with include:

Compute Services:

  • EC2 (Elastic Compute Cloud): Manage virtual servers with different instance types. Set up security groups and key pairs for secure access. To access the EC2 Service, you can search for it via the search bar as seen in the image below

EC2 Instance

  • Lambda: Explore serverless computing, allowing you to run code without managing servers.

Storage Services:

  • S3 (Simple Storage Service): Store and manage data using buckets and objects. Understand storage classes, access control, and permissions.

Just as we saw in the case of EC2 service, we can similarly invoke a new instance of an S3 service as shown in the image below

Image S3 bucket instance

Security, Identity, and Compliance:

  • IAM (Identity and Access Management): Control access to AWS resources by managing users, groups, roles, and policies. You can secure your environment with access keys and login credentials.

Important Settings and Information

  • Account Settings:

    • Billing and Cost Management: Monitor and manage your spending.
    • Account Security: Implement strong authentication methods.
  • Resource Tags:

    • Organizing Resources: Use tags to categorize and filter resources.
    • Cost Allocation: Track expenses more efficiently.
  • Region Selection:

    • Understanding Regions: Learn about AWS regions and availability zones to choose the best location for your resources.

Basic IAM Setup

Why IAM?

IAM is essential for securing access to AWS resources, controlling permissions, and meeting compliance requirements.

Creating an IAM User with Privileges

1- Log in to the AWS Management Console and navigate to the IAM Dashboard. We start by searching for the IAM service as we have done previously.

IAM Search Page

2- From the IAM dashboard, create a new user, and assign a specific permission as needed.

Image Create User

3- Optionally, add the user to a group for easier management.

Image Attach IAM Policy

Image Create a User btn

Importance of IAM Users

IAM users have unique credentials, customizable permissions, and their activity is fully auditable, providing a secure way to manage access.

Creating an IAM Group for General Users

Like how we created an IAM user, we can also create a new group from the IAM Dashboard, assign relevant policies and permissions to ensure consistent access levels for users in similar roles.

Benefits of IAM Groups

IAM groups simplify user management, provide consistent permissions, and allow for easy policy updates.

Assigning Basic Policies/Permissions

There are different policies and permissions available to be attached to an IAM group. There are default policies and there are custom policies, however, a few of the former are shown below.

  • Read-Only Access: For users who need to view resources without making changes, such as auditors.

  • EC2 Read-Only Access: Ideal for developers and QA teams to view EC2 instances.

  • S3 Read-Only Access: Suitable for data analysts to access S3 buckets and objects.

Best Practices for IAM
  • Least Privilege Principle: Grant only the permissions needed for users to perform their tasks.

  • Regular Review: Update policies regularly to adapt to changing needs.

  • Group Management: Use groups to streamline user management.

By following these guidelines, you’ll establish a secure and efficient IAM setup, ensuring controlled access to your AWS environment.

Tips for Effective AWS Navigation

Utilize the search bar and filters to find services quickly. Customize your dashboard and favorites for quick access, and always refer to AWS documentation and support resources for guidance.

This consolidation offers a streamlined overview, helping you navigate and optimize your AWS environment effectively.

Top comments (0)