DEV Community

Lydia Ibuoye
Lydia Ibuoye

Posted on

SETTING UP A COST EFFECTIVE AWS ENVIRONMENT

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.

- AWS MANAGEMENT CONSOLE
The AWS Management Console is a web-based tool that lets you manage all your AWS services in one place. It provides an easy-to-use interface where you can:

  • Find Services: Look up and access different AWS tools like EC2 for servers or S3 for storage.
  • Manage Resources: Create and handle things like virtual servers and storage.
  • Use Features: Set up alerts, check usage, and control permissions.

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

- 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!

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.

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.

- 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)