Python Starter Kit & Foundations

Hello Python

Learning Outcome

5

Set up Python environment and run their first basic program

4

Recognize real-world applications of Python and companies that use it

3

Differentiate between high-level, medium-level, and low-level programming languages

2

Identify key features of Python and why it is widely preferred by developers

Explain what a Dockerfile is

1

Understand what a programming language is and why it is used in real-world problem solving

6

Write and execute a simple “Hello World” program confidently

 Analogy

Imagine you want to order food in a foreign country

If you speak your native language  the waiter won’t understand

If you speak their language  communication becomes smooth

Similarly:

Humans speak natural languages

Computers understand only machine language (0s and 1s)

Programming languages act as a translator between humans and computers

Just like learning a common language helps you communicate globally,

learning a programming language helps you communicate with computers effectively

 

Among all programming languages, Python stands out because:

 

  • It is simple to learn
  • It feels close to human language
  • It is widely used across industries

 

Let’s understand what programming languages are and where Python fits in

 What is a Programming Language?

A programming language is a set of instructions used to communicate with a computer

Example:

print("Hello")

 This tells the computer: display Hello on the screen

Types of Programming Languages

 Low-Level Language

Close to machine (binary)

Very fast but hard to understand

Example: Machine Code

Medium-Level Language

Balance between hardware and human understanding

Example: C

Types of Programming Languages

Services in AWS CI/CD

AWS provides several services for CI/CD workflows

Main services include:

  • AWS CodeCommit – Source code repository
  • AWS CodeBuild – Builds and tests code
  • AWS CodeDeploy – Deploys applications

  • AWS CodePipeline – Automates the pipeline

Together, these services create an automated software delivery pipeline

AWS CodeCommit

What is CodeCommit

AWS CodeCommit is a fully managed source control service.It allows developers to store and manage source code securely in AWS

Key features

Private Git repositories

Secure access using IAM

Scalable and fully managed by AWS

CodeCommit works similarly to GitHub or GitLab, but inside the AWS ecosystem

AWS CodeBuild

What is CodeBuild

AWS CodeBuild is a fully managed build service

It automatically:

Compiles source code

Runs tests

Generates build artifacts

Developers do not need to manage build servers

How CodeBuild Works

Basic workflow:

Source code stored in GitHub or CodeCommit

CodeBuild pulls the source code

CodeBuild runs build instructions

Application is compiled and tested

Build artifacts are generated and stored

Key Components of CodeBuild

Main components include:

  • Build Project – Configuration of the build process
  • Build Environment – Operating system and runtime environment​​
  • Buildspec File – Defines build commands
  • Artifacts – Output files created after the build

 buildspec.yml File

What is buildspec.yml

buildspec.yml is a configuration file used by AWS CodeBuild

It defines the commands and steps required to build the application

Example structure:

version: 0.2

phases:
 install:
   commands:
     - echo Installing dependencies
 build:
   commands:
     - echo Building application

artifacts:
 files:
   - '**/*'

The file tells CodeBuild:

What commands to run

How to build the application

Which artifacts to generate

AWS CodeDeploy

What is CodeDeploy

AWS CodeDeploy automatically deploys applications to computing services

Supported platforms:

Amazon EC2 instances

On-premises servers

AWS Lambda

Amazon ECS containers

How CodeDeploy Works

Basic deployment process:

Application files stored in S3 or GitHub

CodeDeploy receives deployment request

CodeDeploy installs the application on target servers

Application updates with minimal downtime

appspec.yml File

What is appspec.yml

appspec.yml is a configuration file used by AWS CodeDeploy

It defines how the application should be deployed on the server

Example structure:

version: 0.0
os: linux

files:
 - source: /
   destination: /var/www/html

hooks:
 ApplicationStart:
   - location: scripts/start_server.sh

The file specifies

Where application files should be copied

What scripts should run during deployment

Deployment lifecycle events

Types of Deployment

In-Place Deployment

  • Application updated on the same server

  • Old version replaced with new version

Blue/Green Deployment

  • New environment created for new version
  • Traffic switches from old environment to new environment

This reduces downtime and deployment risk

AWS CodePipeline

What is CodePipeline

AWS CodePipeline automates the entire CI/CD workflow

Pipeline stages include

Source

Build

Test

Deploy

 How CodePipeline Works

Pipeline workflow:

Source Stage

Code pulled from GitHub or CodeCommit

Build Stage

CodeBuild compiles and tests the code

Deploy Stage

CodeDeploy deploys the application

Each stage runs automatically when code changes occur

Benefits of CodePipeline

Benefits include:

Automated deployment workflow

Faster software delivery

Easy integration with AWS services

Reduced manual errors

 Introduction to GitHub

What is GitHub

GitHub is a cloud-based platform for storing and managing source code

It uses the Git version control system to track changes

 Why GitHub is Used

GitHub helps developers:

Store source code online

Track code changes

Collaborate with team members

Manage different versions of applications

Key Concepts in GitHub

Important concepts:

Repository (Repo)

Project folder containing source code

Commit

Saving changes in the repository

Branch

Separate version of code for development

Pull Request

Request to merge changes into the main code

Common Git Commands

Clone repository

git clone repository-url

Check repository status

git status

Commit changes

git commit -m "message"

Push code to repository

git push

Summary

4

GitHub helps store and manage source code

3

buildspec.yml is required in CodeBuild ,appspec.yml is required in CodeDeploy

2

AWS services like CodeCommit, CodeBuild, CodeDeploy, and CodePipeline create an automated pipeline
 

1

CI/CD automates building, testing, and deploying applications

Quiz

Which AWS service is used to build and test application code?

A. AWS CodePipeline

B. AWS CodeDeploy

C. AWS CodeBuild

D. AWS CloudWatch

Quiz-Answer

Which AWS service is used to build and test application code?

A. AWS CodePipeline

B. AWS CodeDeploy

C. AWS CodeBuild

D. AWS CloudWatch

Hello Python

By Content ITV

Hello Python

  • 1