Many people put off writing their first Python program for a reason that has nothing to do with programming: installation. You have to download the interpreter, pick a version, set up an editor and, if you are on a work computer, ask for administrator permissions that you often don’t get. For a beginner, that first obstacle is enough to give up.
Today you can write and run Python without installing anything on your machine. It works a lot like online documents: you don’t need to install a word processor to write a document, because the program lives on the web. In this article you will learn what a notebook is, what role your browser plays and where your code actually runs. Then you will take your first steps in two environments: Google Colab, a free entry point for learning, and Amazon SageMaker Studio, the AWS environment for working with notebooks in the cloud.
What a notebook is and why it is ideal for learning
A notebook is an interactive document that mixes two kinds of content: text cells, where you write explanations, headings or notes, and code cells, where you write Python instructions that you can run one at a time. When you run a cell, the result appears right below it, in the same document.
That format has a huge advantage for learning: you don’t need to write a complete program to see what happens. You try one line, look at the result, change something and run it again. Your notes, your code and your results stay together, like a lab notebook.
The most widely used format is Jupyter, an open source project. Notebook files have the .ipynb extension and can be opened in different tools, so what you learn in one environment carries over to the others.

Each code cell runs separately and its result appears right below it.
Cells, execution and output
This is what a simple code cell looks like:
precio = 20
cantidad = 3
total = precio * cantidad
print(total)
When you run it, this appears below the cell:
60
Notebooks have a handy detail: if the last line of a cell is an expression, its value is displayed even if you don’t use print(). Writing just total on the last line of a cell would also display 60.
The browser writes and displays; another machine runs the code
When you code in an online notebook, your browser plays the role of the interface: it is the screen where you write the code, ask for it to run and see the result. But the browser does not run Python. When you press the run button, the contents of the cell are sent to a remote machine that does have Python installed. That machine runs it and sends back the output, which the browser displays below the cell.
That remote machine is usually called the runtime. Inside it there is a process, called the kernel, that keeps in memory everything you run: variables, functions and loaded data. That is why it doesn’t matter if your computer is old or if it is a work computer without install permissions: another computer does the work.

Simplified conceptual diagram: your machine only needs a browser.
This also explains something that surprises people at first. If the remote runtime restarts, the variables you had created disappear, because they lived in the kernel’s memory and not in your document. The notebook keeps your code and your notes; the runtime’s memory is temporary.
Getting started with Google Colab
Google Colab (short for Colaboratory) is a hosted Jupyter Notebook service from Google that requires no setup. It offers free-of-charge use and you only need to sign in with a Google account. Your code runs in a private virtual machine tied to your account, and notebooks are saved to your Google Drive. It is a good option for learning Python from scratch without worrying about infrastructure.
Your first notebook in Colab
- Go to colab.research.google.com and sign in with your Google account.
- Create a new notebook.
- In the first code cell, type:
print("Hola desde la nube"). - Run it with the play button on the left side of the cell.
The first run may take a few seconds, because Colab has to assign you a runtime. Then you will see below the cell:
Hola desde la nube
What to know about the free tier
Colab’s free tier is ideal for learning, but it is not a server reserved for you. According to Colab’s official documentation, resources are neither guaranteed nor unlimited, and the limits can vary. Virtual machines are deleted when they sit idle for a while and have a maximum lifetime: on the free tier, a notebook can run for at most 12 hours, depending on availability and usage.
In practice, this means three things:
- Your notebook (the
.ipynbfile) stays saved in Drive, but the variables and files you created inside the runtime can be lost when it restarts. - If you save important data, store it in Drive or download it.
- If you come back to a notebook after a while, run the cells from the top to rebuild the state.
Getting started with Amazon SageMaker Studio
When your learning starts to include the AWS cloud, you can work with notebooks in Amazon SageMaker Studio, the development environment of Amazon SageMaker AI. From Studio you open applications such as JupyterLab, which run on AWS resources inside your own account. The experience of writing and running cells is the same one you already know; what changes is that you choose and manage the resources, and you pay for them while you use them.
Before you start: prerequisites
- An AWS account. It is the first requirement for using SageMaker AI.
- A user with permissions for SageMaker AI. AWS recommends creating an administrative user, following IAM best practices, to manage your resources.
- A SageMaker AI domain with a user profile. The domain is the configuration that gives you access to Studio. If you work on your own, the Set up for single user (Quick setup) option creates it automatically, together with a user profile, an IAM role and an Amazon S3 bucket.
- Reviewing costs before creating resources. Check the official Amazon SageMaker AI pricing page and the AWS Free Tier terms that apply to your account.
To create the domain with quick setup: in the Amazon SageMaker AI console, open the left navigation pane, go to Admin configurations > Domains, choose Create domain and then Set up for single user (Quick setup).
Your first notebook in JupyterLab
Option names match the console in English and may differ slightly if AWS updates the interface.
- Open the Amazon SageMaker AI console and, in the left pane, choose Studio.
- Select your domain and user profile, choose Open Studio and then Launch personal Studio.
- Inside Studio, choose JupyterLab and then Create JupyterLab space.
- Enter a name for the space and choose Create space. You can leave the instance and storage at their default values.
- Choose Run space. The space takes a few moments to start.
- When it is ready, choose Open JupyterLab.
- In the JupyterLab launcher, create a new notebook with the available Python kernel.
- In the first cell, type
print("Hola desde AWS")and run it.
Below the cell you will see:
Hola desde AWS
That message was printed by Python on an instance running in your AWS account.

Simplified conceptual diagram of how a notebook runs in SageMaker Studio.
Notice the two parts of the space. The instance is the computer that runs your code. The storage volume (Amazon EBS) is the disk where your files are kept, such as the notebook you just created. That difference is the key to understanding costs.
How to stop the space when you are done
Closing the browser tab does not shut anything down: the instance keeps running. To stop it:
- In Studio, open the left pane and choose Running instances.
- In the table, find your space in the Name column and the application in the Application column.
- Choose Stop.
Stopping the application shuts down the instance it was running on. Your files are kept in the space, so you can start it again later with Run space and find your notebook where you left it.
What can keep generating costs
Opening the Studio interface has no additional charge. What you pay for are the resources you use from it, and they don’t all stop at the same time:
- Compute: the JupyterLab instance incurs charges from the moment you launch the application, even if you don’t run any cell. When you stop it, the compute charges for that instance stop.
- Storage: the space’s Amazon EBS volume still exists after you stop it, because it holds your files, and it may keep incurring storage charges. It is only deleted if you delete the space, and in that case you lose the files it contained.
- Other resources: resources you create from Studio, such as Amazon S3 buckets, SageMaker AI endpoints or Amazon EMR clusters, are not deleted automatically when the space instance shuts down.

Conceptual diagram with no price figures: it shows which kind of charge continues at each moment.
For a first contact, the most important habit is simple: stop the application every time you finish and check from time to time which resources exist in your account.
Common mistakes when starting with notebooks
Running cells out of order. In a notebook, what matters is the order in which you run the cells, not the order in which they appear on the screen. If a cell uses a variable that is defined in another cell you haven’t run yet, Python responds with an error like this:
NameError: name 'total' is not defined
The fix is to run the cell that creates the variable first or, even better, use the option to run all cells in order.
Assuming the runtime keeps everything forever. The document is saved; the kernel’s memory is not. After a restart, you have to run the cells again.
Closing the tab and assuming everything shut down. In SageMaker Studio, the instance keeps running until you stop it. Use Running instances to check.
Deleting a space without backing up your files. Deleting the space deletes its storage volume. If you only want to stop paying for compute, stopping the application is enough.
What you need to remember
To start coding in Python you don’t need a powerful computer or to install anything: you need a browser and a notebook. The browser is the interface where you write and send your code; execution happens in a remote runtime that sends you back the result. Google Colab is a free, no-setup entry point, ideal for your first lines of code. Amazon SageMaker Studio gives you the same experience inside your AWS account, with an extra responsibility: stopping what you don’t use and understanding that compute and storage are billed separately.
With your environment ready, the next step is learning to write your first Python instructions and understanding what each one does.
References
- Google Colab: frequently asked questions
- Complete Amazon SageMaker AI prerequisites
- Use quick setup for Amazon SageMaker AI
- Launch Amazon SageMaker Studio
- Create a JupyterLab space
- Stop and delete your Studio running applications and spaces
- Amazon SageMaker Studio pricing
- Amazon SageMaker AI pricing
Keep learning:
If this article helped you, share it with someone who is just getting started with the cloud. See you in the next AWS Unmapped article.
