DEV Community

Lydia Ibuoye
Lydia Ibuoye

Posted on • Edited on

SETTING UP A COST EFFECTIVE AWS ENVIRONMENT FOR A SMALL TECH STARTUP

Are you running or launching a small tech startup? Are you considering AWS for your cloud needs but worried that AWS might be too costly for your startup?

Image description

Do not worry because I'm here to show you how to leverage its full potential without breaking the bank. Let's turn your vision into reality with a smart, cost-effective AWS setup!

GET FAMILIAR WITH AWS

Amazon Web Services (AWS) is a cloud platform that provides essential tools like computing power, storage, and databases over the internet. For a tech startup, AWS can help you quickly build, scale, and manage your applications while keeping costs flexible and manageable.

CREATING AN AWS FREE TIER ACCOUNT

The AWS Free Tier lets new users explore AWS services at no cost,It includes both a 12-month introductory period and some services that are always free. It’s perfect for testing and getting started without upfront costs.

AWS Free Tier Account

using the link, you can either cick on the "Sign in to the console" Option or the "Create a free account"

Image description

Image description

Enter your details and provide the necessary informations to get started. After setting up, you will get a mail from AWS on successfully setting up your AWS account.

Understand that AWS recognises identity especially a User. Which brings us to the types of Users in AWS

  1. Root User; This is the initial user that comes with AWS upon creating a new account. Basically, this user is whom the account was created for.

  2. IAM User; Also known as the Identity and Access Management. This User manages the access to AWS resources.Creating IAM users with specific privileges enhances security by limiting access, improves control over resources, enables tracking and auditing of actions, and helps meet compliance requirements.

__NOTE; The Root User is best used sparingly, with daily tasks handled by IAM users to ensure security.

- AWS MANAGEMENT CONSOLE
The AWS Management Console is a web-based interface that allows users to access and manage their Amazon Web Services (AWS) resources. It provides a user-friendly dashboard where you can interact with various AWS services, such as EC2 (compute), S3 (storage), RDS (databases), and more. The console supports a variety of functions, including resource monitoring, configuration, and deployment. Here’s a more detailed explanation of the

key features of the AWS Management Console:

  1. Dashboard:

    The dashboard is your home base when you log into the AWS console. It offers a visual overview of your AWS environment, showing recently used services and essential metrics like performance and cost summaries. This helps you quickly access services and keep an eye on your resources.

  2. Search Bar:

    At the top of the console, the search bar allows you to find services instantly by typing their name. For example, if you're looking for S3 storage, you can simply type "S3" in the search bar, and it will take you directly to that service. It’s a fast way to navigate instead of scrolling through menus.

  3. Services Menu:

    This is a drop-down menu that lists all AWS services. It is organized by categories, such as Compute (e.g., EC2), Storage (e.g., S3), and Databases (e.g., RDS). You can explore the various services here, making it a great place to discover new tools AWS offers for your cloud needs.

  4. Resource Management:

    Within each service, you can create, modify, and monitor resources. For instance, in EC2 (Elastic Compute Cloud), you can launch virtual machines, change their configurations, or stop them. In S3, you can upload files, organize them into buckets, and manage access permissions. This section also provides detailed performance data for your resources.

  5. Billing & Cost Management:

    AWS helps you keep track of your cloud spending. The billing section lets you see a breakdown of your costs by service, set budgets, and monitor your usage to avoid surprises. You can also receive notifications when your spending exceeds a predefined limit.

  6. CloudShell:

    AWS CloudShell is a built-in command-line tool within the console. It allows you to run AWS CLI (Command Line Interface) commands without needing to set up the CLI on your local machine. You can quickly automate tasks or interact with resources directly using command-line inputs.

It’s designed to make it simple to navigate and manage your AWS resources, even if you’re new to cloud computing.

Tips for Effective Navigation in the AWS Management Console
**
Here are some concise tips for effective navigation in the **AWS Management Console
:

  1. Use the Search Bar: Quickly find services by typing their names.
  2. Pin Services: Pin frequently used services for easy access.
  3. Explore Categories: Browse services by category when unsure of specific names.
  4. Create Resource Groups: Group related resources for easier management.
  5. Check the Region: Ensure you're in the right region for managing your resources.
  6. Leverage CloudShell: Run AWS CLI commands directly within the console.
  7. Monitor the Dashboard: Regularly check for key metrics and alerts.
  8. Set Billing Alerts: Get notifications to manage costs effectively.

These tips will help you navigate the AWS console efficiently!

- NAVIGATING AWS SERVICES
Navigating AWS services is straightforward once you get the hang of it. Here’s a simple guide for a newbie:

  1. Sign In: Log in to the AWS Management Console at AWS.

  2. Dashboard: You’ll land on the AWS Management Console dashboard, where you can see a list of services.

  3. Find a Service:

    • Use the search bar at the top to type the service name (e.g., “EC2” for virtual servers or “S3” for storage).
    • Alternatively, click on the Services menu to browse through categories like Compute, Storage, etc.
  4. Access a Service:

    • EC2: Click on “EC2” to manage virtual servers. Here, you can launch, stop, or configure instances.
    • S3: Click on “S3” to manage storage. You can create and manage buckets, upload files, and set permissions.
  5. Explore Features:

    • Each service has a menu or sidebar with options to perform various tasks. For example, in EC2, you can view instances, create new ones, or check settings.
  6. Help and Documentation: Use the Help menu for guides and FAQs if you need assistance.

With these steps, you can easily navigate and start using AWS services!

SOME COMPONENTS OF IAM

  1. Users
  2. User Groups
  3. Policies
  4. Roles

__STEPS TO CREATING IAM USER

  1. Type IAM on the AWS search bar or click on services and selsct IAM from the list of services AWS offers

Image description

Image description

  1. Click on IAM
  2. Click on Users
  3. Select "Create User"
  4. Enter a User name
  5. Check the "Provide user access to the AWS management console"
  6. Select "I want to create an "IAM User"
  7. Click on Custom password and create a Password for the account
  8. Check "User must create a new password at the next sign in"
  9. Click next
  10. Select "Attach policies directly"
  11. Scroll to the bottom and click on next
  12. Review all you have done
  13. Click next
  14. Download CSV file which contains the user details
  15. Select "Return to the user's list"

Congratulations!!!!! You have successfully created a IAM user in 2 minutes

NOTE; To create an IAM user that can perform like a Root user, you must Check "Administrative access" after attaching your policies (step 11)

Image description

- CREATING A USER GROUPS

Creating IAM groups is important because it simplifies management, ensures consistent permissions, streamlines access changes, and enhances security by grouping users with similar roles.

- Steps to Creating user groups

  1. Select User groups on you IAM dashboard

Image description

  1. Click on "Create group"
  2. Scroll to the bottom and click create user group
  3. Enter a group name e.g IT Department
  4. Click on "add user"
  5. Select the users you want to add to the group
  6. Click on permission
  7. Select the permissions you want to attach to the group e.g S3,Read Only,etc
  8. Click Add Permission
  9. Select Attach policy
  10. Scroll down and select "Create User Group"

All done !!!!!

_****_Troubleshooting tips

_1. **Check Permissions: Ensure you have the right permissions to create and manage user groups.

  1. Verify Group Name: Make sure the group name is unique and doesn’t conflict with existing names.
  2. Review Policies: Confirm that any attached policies are correctly set and provide the necessary permissions.
  3. Refresh the Console: Sometimes changes take a moment to appear. Refresh the AWS Management Console if you don’t see the new group right away.
  4. Check for Errors: Look for any error messages and follow the prompts or guidelines provided.

These steps can help resolve common issues when setting up user groups.

-POLICY

In AWS, a policy is a set of rules that defines what actions users can perform on resources. It’s important because it controls access, enhances security, simplify management and helps meet security and regulatory requirements. In a nutshell, Policies ensure that users have the right access while keeping their AWS environment secure.It is also a collection of permission.

AWS policies come in different types:

  1. AWS Managed Policies: Predefined policies created and maintained by AWS. They provide common permissions for various AWS services and are updated automatically by AWS.

  2. Customer Managed Policies: Custom policies created and managed by you. They allow you to define specific permissions tailored to your needs.

These types of policies help you manage access and permissions according to your requirements.

- STEPS TO CREATING A POLICY

  1. Click on Policy on the IAM dashbord

Image description

  1. Cick on Create Policy

Image description

  1. Select JSON

Image description

  1. Get the policy code either from AWS documentation, Stack overflow, ChatGPT, etc
  2. Paste the code
  3. Scroll down and Select next
  4. Name the code e.g Grant-S3-full-access
  5. Type an Info about the policy
  6. Click on create policy

Congratulations on creating a Policy on AWS
Here are some troubleshooting tips for creating AWS policies:

  • Check Syntax: Make sure your policy JSON is correctly formatted. Use AWS’s policy validator tool to help.
  • Verify Permissions: Ensure the actions and resources in your policy match what you need.
  • Attach Correctly: Confirm the policy is attached to the right IAM user, group, or role.
  • Review Limits: Ensure the policy doesn’t exceed any AWS service limits.

These steps can help fix common issues with AWS policies.

- PERMISSIONS
Permissions in AWS decide what actions you or your services can do with your resources. They are like rules that say:

  1. What You Can Do: Such as reading or writing data.
  2. Where You Can Do It: Like on a specific S3 bucket or EC2 instance.
  3. Allow or Deny: Whether you’re allowed or denied to perform the action.

Permissions help keep your AWS environment secure by making sure everyone can only do what they need to do.

AWS Permissions include;

  1. Read: Allows viewing or retrieving data, like reading files in an S3 bucket.
  2. Write: Permits creating, updating, or deleting data, such as uploading files to S3 or modifying instances in EC2.
  3. List: Enables viewing lists of resources, like seeing all objects in an S3 bucket.
  4. Tagging: Allows adding or modifying tags on resources.
  5. Admin: Grants full control over resources, including managing permissions and configurations.

Each permission type helps define what actions are allowed or denied for users and services.

- ROLES AS A COMPONENT OF IAM
Image description
Roles an be referred to as an identity or a label/hat that provides temporary permissions. It allows users, applications, or services to assume specific access rights without needing long-term credentials, supports cross-account access, and enhances security by granting only the necessary permissions.Roles can also be attached to users and other services.

**1.2 AMAZON SIMPLE STORAGE SERVICE (S3)
**Amazon S3 is a scalable, secure, and durable cloud storage service that allows you to store, manage, and retrieve any amount of data from anywhere on the web. It’s designed for reliability and cost-effectiveness for a variety of storage needs.

Key Features of Amazon S3:
Object Storage:
Stores data as objects in buckets, supporting files up to 5 TB in size.

High Durability & Availability:
Provides 11 nines of durability by replicating data across multiple locations.

Scalability:
Automatically scales to handle unlimited data storage needs.

Flexible Access Control:
Fine-grained permissions with AWS IAM for secure access to buckets and objects.

Cost-Effective Storage Classes:
Supports different storage classes (Standard, Infrequent Access, Glacier) to optimize costs based on data access frequency.

These points cover the essential features of Amazon S3 in a simple way.

** Steps to Create an S3 Bucket:
**

  1. Log in to AWS Console and search for "S3". Image description
  2. Click “Create bucket” on the S3 dashboard.
  3. Enter Bucket Name and select a Region Image description
  4. Disable ACLs as recommended Image description
  5. Uncheck 'Block all public access' and check that you acknowledge what you have done Image description
  6. Review and Create the bucket. Image description

Your bucket is now ready for use!

Now that you have successfully created a bucket, let's look at the steps involved in adding a file into the bucket

Steps to Upload a File to an S3 Bucket:

  1. Log in to AWS Console and navigate to S3.
  2. Select the Bucket: Click the name of the bucket where you want to upload the file. Image description
  3. Click “Upload”: On the bucket’s page, click the "Upload" button. Image description
  4. Click “Add files” to choose a file from your computer. Image description Image description
  5. Set Permissions (Optional): Adjust access permissions (e.g., public or private).
  6. Review and Upload: Review settings and click “Upload” to add the file. Image description

Congrats on successfully uploading an object into your S3 bucket

_1.3 AMAZON EC2
_

Amazon EC2 (Elastic Compute Cloud) is a web service that provides scalable virtual servers in the cloud. It allows you to launch and manage virtual machines, called instances, which can run applications, host websites, or perform data processing. With EC2, you can choose the operating system, configure the instance size, and scale resources as needed, paying only for the capacity you use.

Uses of Amazon EC2:

  1. Web Hosting: Host websites and applications with scalable compute resources.
  2. Running Applications: Deploy applications, such as databases, gaming servers, or software testing environments.
  3. Big Data Processing: Perform large-scale data analysis, including data mining, machine learning, and simulations.
  4. Development & Testing: Create development, testing, and staging environments for software applications.
  5. Backup & Recovery: Run backup solutions or disaster recovery services with on-demand scalability.

EC2 provides flexible, on-demand computing power for various workloads.

- CONCLUSION

Setting up a cost-effective AWS environment involves understanding and leveraging AWS services efficiently. Start by using the AWS Free Tier to explore and experiment without incurring costs. Create IAM users and groups with specific permissions to ensure security and manage access effectively. Implement policies to define and control permissions clearly, and use roles to grant temporary, flexible access. By following these practices, you can optimize your AWS setup to be both secure and budget-friendly, supporting your tech startup’s growth and success.

CONGRATULATIONS ON COMING THIS FAR, REMEMBER TO LEAVE YOUR QUESTIONS IN THE COMMENTS

Image description

Top comments (0)