Accéder au contenu principal

How to Set Up and Configure AWS: A Comprehensive Tutorial

Learn how to set up and configure your AWS account for the first time with this comprehensive tutorial. Discover essential settings, best practices for security, and how to leverage AWS services for data analysis and machine learning.
8 juil. 2024  · 30 min de lecture

Amazon Web Services (AWS) is a platform that offers various cloud computing services. Essentially, it's like renting computing power, storage, and other tech resources from Amazon instead of buying and managing your own hardware. 

For data analysis and data science, AWS allows you to quickly set up environments to store and analyze large amounts of data without worrying about the underlying infrastructure. 

The platform provides tools for data storage, processing, and machine learning, making it easier to work with data at scale. So, if you need to store a vast dataset, run complex analyses, or even build and deploy machine learning models, AWS has services for almost everything.

In this tutorial, we discuss how to set up and configure your AWS account for the first time, covering a few essential settings and best practices for keeping your account secure.

If you’re new to AWS, consider taking our Introduction to AWS course to get familiar with the basics.

Create an AWS Account

First, visit the AWS website and click "Create an AWS Account."

Enter your email address and choose your AWS account name. Don't worry; you can always change your account name later. You will need to verify your email address, and then you can choose a password.

Sign up for AWS

Sign up for AWS

Choose your account type–personal or professional. There's no difference between the two regarding features, but choose professional if you're using AWS for business purposes. 

Then, enter your contact information and add your payment information. AWS requires a valid credit or debit card for account creation, but you can use the AWS Free Tier to avoid charges for certain services.

Lastly, choose your support plan. AWS offers three main support plans: basic (free), developer, and business. The basic plan is sufficient for most beginners. Choose the plan that best fits your needs.

Sign up for AWS - Congratulations

Sign up for AWS - Congratulations

Decide on Your Default Region

This is more of a decision than a general setting since you must select your region for each service you use. However, it is a good idea to have a region in mind right at the outset.

AWS - Regions and availability zones in North America

AWS - Regions and availability zones in North America

The closer you or your clients are to a data center, the lower the latency for your applications and the higher the performance. 

Another important factor when choosing a region is service availability. Not all AWS services are available in every region, so ensuring that the services you plan to use are offered in your preferred region is essential. You can check the AWS regional services list to verify this. For example, if you need to use Amazon SageMaker for machine learning, make sure it's available in your chosen region.

Note the shortcode for your chosen region (for example, “eu-east-1” for the US East region). You’ll need this later when configuring the AWS CLI.

Create an IAM Admin Group and IAM Admin User

You were given a root user account when you created your AWS account. The root user has unrestricted access to all AWS resources and services, which means that if it gets compromised, the entire account is at risk.

By creating Identity and Access Management (IAM) users and groups, you can follow the principle of least privilege, granting only the permissions necessary for each user to perform their tasks.

For day-to-day use of AWS, creating an IAM admin group with one or more admin users is strongly recommended. You can give full administrator permissions to the admin group, meaning you can do almost everything with AWS except a few rare tasks requiring root privileges.

It's a best practice to lock away the root user credentials and only use them for initial account setup and if you really need them.

To create groups and users, enter “IAM” into the search bar at the top of the AWS console and click on the first result for IAM.

AWS - Searching for the IAM service

AWS - Searching for the IAM service

Create an IAM admin group

Under “Access management” on the left sidebar, select “User groups” and then select “Create group.” Enter a name for the group.

AWS IAM - Creating a new user group

AWS IAM - Creating a new user group

Next, you need to attach permission policies to the group. You can write custom policies or choose one from the list of policies created by AWS. Select the “AdministratorAccess” policy for the Admin group and then select “Create user group.”

Create an IAM admin user

Returning to the IAM dashboard, select “Users” from “Access management” on the left sidebar, and then select “Create user.” Enter a name for the user.

AWS IAM - Creating a new user

AWS IAM - Creating a new user

AWS will bring some security considerations and best practices to your attention here. You should read up on these and make sure you understand the best practices and security implications of each choice.

For now, check the box to grant access to the AWS Management Console and select the user type as IAM user (this will also enable programmatic access through access keys—more on this later).

AWS IAM - Specifying user details

AWS IAM - Specifying user details

Click “Next,” and be sure to download the CSV file containing your user credentials before leaving this page.

Assign an Account Alias

An account alias is a user-friendly name you can assign to your AWS account to make it easier to remember and manage. 

By default, your AWS account is identified by a long numeric ID, which can be hard to recall and recognize, especially if you manage multiple AWS accounts.

Creating an account alias is very helpful in simplifying the login process. Instead of using the numeric account ID, you can log in with a more meaningful name that you choose. This is particularly helpful for remembering which account you're accessing if you have several AWS accounts for different projects or environments.

You can change your account alias through the IAM dashboard.

Follow AWS Security Best Practices

Here are five of the most important security best practices you should follow to protect your AWS account:

  • Enable Multi-Factor Authentication (MFA): MFA adds an extra layer of security by requiring a password and a second verification form, like a code from your smartphone. This makes it much harder for unauthorized users to access your account.
  • Create IAM users and groups: As we’ve already mentioned, you should avoid using your root account for everyday tasks. Instead, create individual IAM users for each person who needs access to your AWS account, and assign permissions based on their roles.
  • Set up strong password policies: Ensure all your users create strong, complex passwords that are difficult to guess. Implement policies around this and enforce regular password changes.
  • Apply the principle of least privilege: Only grant the permissions necessary for each user to perform their tasks. This minimizes the risk of accidental or malicious changes that could compromise your account or data.
  • Monitor your account activity regularly: Use AWS CloudTrail to log and monitor all account activity. Review these logs regularly to detect any unusual or unauthorized actions.

Learn About AWS Free Tier

The AWS free tier is a great way to explore and learn about AWS services without worrying about the costs.

AWS free tier - three types of offers

AWS free tier - three types of offers

The free tier offers three types of services:

  • 12-month free tier: Many AWS services are free for 12 months from the date you create your account. After 12 months, these services will be billed at standard rates.
  • Always free: Some services are free indefinitely, regardless of when you create your account.
  • Trials: Certain services offer short-term trials to help you try them out without charge.

To avoid costs, you should always clean up the resources you no longer need. This helps ensure you stay within the free tier limits and avoid unnecessary charges.

Take advantage of AWS’s extensive documentation and hands-on tutorials, which are designed to help you understand and utilize the free tier effectively. These resources provide step-by-step guides that are perfect for beginners and show you how to clean up the resources you used during the tutorial.

As you branch out independently, start with small projects that fit within the free tier limits. Check out our blog post on 13 hands-on AWS projects you can implement to improve your skills and showcase them in your portfolio.

Set Up Budget Alerts and Thresholds

Budgets in AWS allow you to set financial targets for your usage and costs. They help you monitor and control your spending by providing visibility into your AWS costs and usage.

Budget alerts are notifications that alert you when your costs or usage exceed (or are forecasted to exceed) the thresholds you set. This can be incredibly useful for beginners to avoid unexpected charges as they learn and experiment with various AWS services.

AWS has also made this process very easy by introducing templates. The “Zero spend budget” template is perfect for sticking within the free tier limits for all the services you use. You'll get an email alert when your spending exceeds $0.01, precisely what we want!

To enable it, enter the keyword “budgets” into the search bar at the top of the page and select “Budgets” from the Billing and Cost Management service.

AWS - Searching for the budgets service

AWS - Searching for the budgets service

Select “Create budget” and then look for the “Zero spend budget” template. Specify the email address where you want to receive the alerts and select “Create budget”.

AWS - Create a zero spend budget

AWS - Creating a zero-spend budget

Explore the AWS Management Console

The AWS Management Console can initially seem overwhelming, but with some guidance, it will become much easier to navigate.

The console home is the main landing page when you log into the AWS Management Console. It provides a high-level overview of your AWS resources and recent activity.

AWS - Console home

AWS - Console home

The top left-hand corner contains the services menu, which you will probably use the most often as you navigate AWS.

AWS - Services menu

AWS - Services menu

There are three main areas in the services menu:

  • Search bar: Across the top of the console is the search bar. You can quickly find AWS services by typing in the name or keyword.
  • Categories: Services are grouped into categories such as Compute, Storage, Database, Migration & Transfer, and more. Each category contains related services. For example, you’ll find EC2, Lambda, and Elastic Beanstalk under Compute.
  • Recently visited: This is a convenient list of all the services you have used recently. You can add services to your favorites by clicking on the star icon next to their name so they always appear here and across the top of the page.

You can also access your account details, settings, access to AWS documentation, and other useful options in the top right corner.

Familiarize Yourself With the AWS Services

Here’s a table summarizing the main AWS services you would use as a data professional, grouped by related functionalities.

Category

Service

Description

Storage

Amazon S3

Scalable storage for data, suitable for storing raw data, processed results, and backups.

Amazon Glacier

Low-cost storage for archival and long-term backup of infrequently accessed data.

AWS Storage Gateway

Connect on-premises software appliances with cloud-based storage for seamless integration.

Compute

Amazon EC2

Scalable virtual servers for running data processing tasks, analyses, and applications.

AWS Lambda

Serverless compute service that lets you run code in response to events without managing servers.

Database

Amazon RDS

Managed relational database service supporting multiple database engines (e.g., MySQL, PostgreSQL).

Amazon Redshift

Fast, scalable data warehouse service for running complex queries on large datasets.

Amazon DynamoDB

Managed NoSQL database service for fast and flexible data storage.

Data integration

AWS Glue

Managed ETL (Extract, Transform, Load) service for preparing and transforming data.

AWS Data Pipeline

Automate the movement and transformation of data between different AWS services and on-premises.

Analytics

Amazon Athena

Serverless interactive query service for analyzing data in S3 using SQL.

Amazon EMR

Managed Hadoop framework that makes it easy to process large amounts of data.

Amazon QuickSight

Business analytics service for building visualizations and dashboards.

Machine learning

Amazon SageMaker

Managed service for building, training, and deploying machine learning models.

AWS Deep Learning AMIs

Pre-configured environments for running deep learning frameworks like TensorFlow and PyTorch.

AWS Comprehend

Natural language processing service for extracting insights from text.

Amazon Rekognition

Service for image and video analysis.

Monitoring and security

AWS CloudWatch

Monitoring and observability service for AWS resources and applications.

AWS CloudTrail

Tracks user activity and API usage across your AWS infrastructure for auditing and compliance.

AWS IAM

Manage access to AWS services and resources securely.

Install and Configure the Command Line Interface

The AWS Command Line Interface (CLI) enables you to control multiple AWS services and automate them through scripts, making tasks like deployment, configuration, and monitoring more efficient.

Setting up the CLI is straightforward, and you can start with basic commands to familiarize yourself.

Step 1: Install the AWS CLI

Follow the official AWS CLI installation instructions based on your operating system to install the latest AWS CLI.

Don't forget to confirm your installation at the end by using the following command in your terminal:

aws --version

Step 2: Get your credentials ready

When configuring the AWS CLI, you'll be asked to enter your AWS access key ID and secret access key, so let's prepare these credentials.

Go back to the admin user you created earlier in the IAM dashboard and select “Create access key.” 

AWS IAM - Creating access keys

AWS IAM - Creating access keys

Select an appropriate use case here or “Other” at the bottom. The use case options provide you with the best practices for each use case. Regardless of your choice, make sure you read up and understand the security best practices when using access keys.

Create your access key and download the CSV file with your credentials. Keep these safe!

Step 3: Configure the AWS CLI

Simply run the configure command and follow the prompts:

aws configure

You'll be asked to enter your AWS access key ID and secret access key and specify your default region and output format (JSON is the most commonly used format).

The next step is to practice using Python, AWS, and the boto3 library. Check out our webinar for a practical demonstration of how you can combine these services to build powerful data science solutions.

AWS Best Practices for Beginners

To wrap up, here are some tips and best practices to maximize your usage of AWS.

  • Monitor your usage: Always monitor your resource usage to avoid unexpected costs. Set up billing alerts and use the AWS Cost Explorer to track your spending and optimize your resources.
  • Clean up unused resources: After completing projects or experiments, make sure to terminate unused EC2 instances, delete unused storage volumes, and clean up other resources to prevent unnecessary charges.
  • Use the Free Tier wisely: Take advantage of the AWS Free Tier to explore services and learn without incurring costs. Know the limits and monitor your usage to stay within the free tier boundaries.
  • Implement security best practices: Enable MFA for all users, especially the root account. Create IAM users with the least privileges necessary for their roles, and avoid using root credentials for daily tasks.
  • Automate with AWS CLI and scripts: Learn to use the AWS CLI and automation scripts to manage resources efficiently. This will save time and reduce the chances of human error.
  • Backup important data: Regularly backup your data using services like Amazon S3 and AWS Backup. This ensures you can recover your data in case of accidental deletion or other issues.
  • Keep learning: AWS is vast and constantly evolving. Stay updated with the latest services, best practices, and tutorials. AWS provides extensive documentation, hands-on labs, and certification programs to help you grow your skills.

By following these best practices, you can make the most out of AWS while maintaining a secure, cost-effective, and efficient cloud environment.

Conclusion

You should now have your AWS account set up and ready to go. To learn more about AWS, start by signing up for our AWS cloud technology and services course. After that, you can work your way up in your career by getting AWS certified.

Additionally, check out our detailed guide for career and salary options for an AWS cloud practitioner role. When you’re ready to interview for AWS roles, our blog post on the top 32 AWS interview questions will help prepare you!

FAQs

Do I need to provide my credit card information when creating an AWS account?

Yes, you need to provide your credit card information when creating an AWS account. AWS uses this information to verify your identity and ensure payment for any services you use beyond the free tier limits. However, you can take advantage of the AWS Free Tier, which offers limited free usage of many AWS services for the first 12 months, minimizing the risk of unexpected charges.

What is an AWS region, and how do I choose the best one for my needs?

An AWS region is a geographic area where AWS has data centers. Each region consists of multiple Availability Zones for redundancy and reliability. When choosing a region, consider factors such as geographical proximity to reduce latency, compliance with data residency regulations, availability of required services, and cost differences. Selecting a region close to your primary users or where your operations are based often provides the best performance.

What is the AWS Free Tier, and how can I make the most of it?

The AWS Free Tier offers free usage of certain AWS services for the first 12 months after account creation, and some are always free services. To make the most of it, take advantage of AWS hands-on tutorials designed to help you learn about AWS services while staying within the free tier limits. These tutorials provide step-by-step instructions and also show you exactly how to clean up resources at the end, ensuring you don't incur unexpected charges.

What should I do if I exceed my AWS Free Tier limits?

If you exceed your AWS Free Tier limits, you'll incur charges based on the standard pricing for the services used. To avoid unexpected costs, set up billing alerts in the AWS Billing Dashboard to notify you when you approach or exceed your free tier usage. Monitor your usage regularly. If you notice any costs building up, identify the services consuming the most resources and consider scaling them back or closing them down.

What are the differences between the personal and professional AWS account types?

Personal AWS accounts are typically used by individuals for learning, experimentation, and personal projects. They are tied to personal payment methods and managed by a single user. On the other hand, professional AWS accounts are used by businesses and organizations. They involve multiple users, more complex resource management, and are tied to the organization’s payment methods. Professional accounts also often have access to advanced support plans and compliance features.


Joleen Bothma's photo
Author
Joleen Bothma
LinkedIn
Sujets

Learn more about AWS and data engineering with these courses!

cours

AWS Cloud Technology and Services

3 hr
3.5K
Master AWS cloud technology with our course - ideal for hands-on learning and practical applications in the AWS ecosystem.
Afficher les détailsRight Arrow
Commencer Le Cours
Voir plusRight Arrow
Apparenté

didacticiel

AWS EC2 Tutorial For Beginners

Discover why you should use Amazon Web Services Elastic Compute Cloud (EC2) and how you can set up a basic data science environment on a Windows instance.
DataCamp Team's photo

DataCamp Team

7 min

didacticiel

How to Set Up and Configure Azure: Beginner's Guide

Learn how to set up and configure Azure with this beginner's guide. Follow easy steps to navigate the Azure portal, create resources, and manage your cloud services.
Florin Angelescu's photo

Florin Angelescu

8 min

didacticiel

The Complete Guide to Machine Learning on AWS with Amazon SageMaker

This comprehensive tutorial teaches you how to use AWS SageMaker to build, train, and deploy machine learning models. We guide you through the complete workflow, from setting up your AWS environment and creating a SageMaker notebook instance to preparing data, training models, and deploying them as endpoints.
Bex Tuychiev's photo

Bex Tuychiev

25 min

didacticiel

Mastering AWS Step Functions: A Comprehensive Guide for Beginners

This article serves as an in-depth guide that introduces AWS Step Functions, their key features, and how to use them effectively.
Zoumana Keita 's photo

Zoumana Keita

didacticiel

Getting Started with AWS Athena: A Hands-On Guide for Beginners

This hands-on guide will help you get started with AWS Athena. Explore its architecture and features and learn how to query data in Amazon S3 using SQL.
Tim Lu's photo

Tim Lu

28 min

didacticiel

The Complete Guide to AWS Identity and Access Management (IAM)

Learn how to use AWS Identity and Access Management (IAM) to secure your AWS environment, manage access with users, groups, and roles, and implement best practices for robust security.
Joleen Bothma's photo

Joleen Bothma

30 min

See MoreSee More