GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - alfonsof/aws-python-examples: Python examples on AWS (Amazon Web Services) using AWS SDK for Python (Boto3). How to manage EC2 instances, Lambda Functions, S3 buckets, etc.

BranchesTags
Open more actions menu

Latest commit

 

History

137 Commits
137 Commits

Folders and files

NameName
Last commit message
Last commit date
awsec2instances-capi
awsec2instances-capi
 
 
awsec2instances-rapi
awsec2instances-rapi
 
 
awslambdacreate-capi
awslambdacreate-capi
 
 
awslambdadelete-capi
awslambdadelete-capi
 
 
awslambdahello
awslambdahello
 
 
awslambdahellojson
awslambdahellojson
 
 
awslambdahttprequest
awslambdahttprequest
 
 
awslambdainvoke-capi
awslambdainvoke-capi
 
 
awslambdalist-capi
awslambdalist-capi
 
 
awslambdalistall-capi
awslambdalistall-capi
 
 
awslambdas3copy-capi
awslambdas3copy-capi
 
 
awslambdas3copy-rapi
awslambdas3copy-rapi
 
 
awslambdas3event
awslambdas3event
 
 
awslambdas3move-capi
awslambdas3move-capi
 
 
awslambdas3move-rapi
awslambdas3move-rapi
 
 
awslambdaupdate-capi
awslambdaupdate-capi
 
 
awss3copy-capi
awss3copy-capi
 
 
awss3copy-rapi
awss3copy-rapi
 
 
awss3create-capi
awss3create-capi
 
 
awss3create-rapi
awss3create-rapi
 
 
awss3delete-capi
awss3delete-capi
 
 
awss3delete-rapi
awss3delete-rapi
 
 
awss3deleteobject-capi
awss3deleteobject-capi
 
 
awss3deleteobject-rapi
awss3deleteobject-rapi
 
 
awss3download-capi
awss3download-capi
 
 
awss3download-rapi
awss3download-rapi
 
 
awss3list-capi
awss3list-capi
 
 
awss3list-rapi
awss3list-rapi
 
 
awss3listall-capi
awss3listall-capi
 
 
awss3listall-rapi
awss3listall-rapi
 
 
awss3move-capi
awss3move-capi
 
 
awss3move-rapi
awss3move-rapi
 
 
awss3upload-capi
awss3upload-capi
 
 
awss3upload-rapi
awss3upload-rapi
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 

Repository files navigation

Python examples on AWS (Amazon Web Services)

This repo contains Python code examples on AWS (Amazon Web Services).

These examples show how to use Python 3 and Boto 3 in order to manage Amazon services on AWS. These use Resource API (high-level) and Client API (low-level) of Boto 3.

Boto 3 is the AWS (Amazon Web Services) SDK for Python, which allows Python developers to write software that makes use of Amazon services like EC2 and S3. Boto provides an easy to use, object-oriented API as well as low-level direct service access.

Boto 3 offers two different styles of API:

  • Resource API (high-level): It provides an object-oriented abstraction on top (object.delete(), object.put(), etc.).
  • Client API (low-level): It maps directly to the underlying RPC-style service operations (put_object, delete_object, etc.).

Quick start

You must have an AWS (Amazon Web Services) account.

The code for the samples is contained in individual folders on this repository.

For instructions on running the code, please consult the README in each folder.

This is the list of examples:

Compute - Amazon EC2:

  • Using the Client API (low-level) of Boto 3:

    • awsec2instances-capi - AWS EC2 instances (Client API): Example of how to handle AWS EC2 instances. It uses the Client API (low-level) of Boto 3.
  • Using the Resource API (high-level) of Boto 3:

    • awsec2instances-rapi - AWS EC2 instances (Resource API): Example of how to handle AWS EC2 instances. It uses the Resource API (high-level) of Boto 3.

Compute - AWS Lambda:

  • Lambda function handler:

    • awslambdahello - AWS Lambda Function Hello World: Example of how to handle an AWS simple Lambda function and a text input.
    • awslambdahellojson - AWS Lambda Function Hello World JSON: Example of how to handle an AWS simple Lambda function and a JSON input.
    • awslambdahttprequest - AWS Lambda Function Http Request: Example of how to handle an AWS Lambda Function, show the parameters of the request and repond a message including the parameters.
    • awslambdas3event - AWS Lambda Function S3 Event: Example of how to handle an AWS Lambda Function and send information to the log about an object when it appears in a S3 bucket.
  • Lambda function handler using the Client API (low-level) of Boto 3:

    • awslambdas3copy-capi - AWS Lambda Function S3 Copy: Example of how to handle an AWS Lambda function and copy an object when it appears in a S3 bucket to another S3 bucket. It uses the Client API (low-level) of Boto 3.
    • awslambdas3move-capi - AWS Lambda Function S3 Move: Example of how to handle an AWS Lambda function and move an object when it appears in a S3 bucket to another S3 bucket. It uses the Client API (low-level) of Boto 3.
  • Lambda function handler using the Resource API (high-level) of Boto 3:

    • awslambdas3copy-rapi - AWS Lambda Function S3 Copy: Example of how to handle an AWS Lambda function and copy an object when it appears in a S3 bucket to another S3 bucket. It uses the Resource API (high-level) of Boto 3.
    • awslambdas3move-rapi - AWS Lambda Function S3 Move: Example of how to handle an AWS Lambda function and move an object when it appears in a S3 bucket to another S3 bucket. It uses the Resource API (high-level) of Boto 3.
  • Lambda service client - Service operations - Using the Client API (low-level) of Boto 3:

    • awslambdacreate-capi - AWS Lambda Function Create: Example of how to handle an AWS Lambda function and create it. It uses the Client API (low-level) of Boto 3.
    • awslambdaupdate-capi - AWS Lambda Function Update: Example of how to handle an AWS Lambda function and update it. It uses the Client API (low-level) of Boto 3.
    • awslambdainvoke-capi - AWS Lambda Function Invoke: Example of how to handle an AWS Lambda function and invoke it. It uses the Client API (low-level) of Boto 3.
    • awslambdalist-capi - AWS Lambda Function List: Example of how to handle an AWS Lambda function and list its information. It uses the Client API (low-level) of Boto 3.
    • awslambdalistall-capi - AWS Lambda Function List All: Example of how to handle AWS Lambda functions and list all Lambda functions and their information. It uses the Client API (low-level) of Boto 3.
    • awslambdadelete-capi - AWS Lambda Function Delete: Example of how to handle an AWS Lambda function and delete it. It uses the Client API (low-level) of Boto 3.

Storage - Amazon S3:

  • Using the Client API (low-level) of Boto 3:

    • awss3create-capi - AWS S3 Create (Client API): Example of how to handle S3 buckets and create a new S3 bucket. It uses the Client API (low-level) of Boto 3.
    • awss3delete-capi - AWS S3 Delete (Client API): Example of how to handle S3 buckets and delete a S3 bucket. It uses the Client API (low-level) of Boto 3.
    • awss3list-capi - AWS S3 List (Client API): Example of how to handle S3 buckets and list information about objects in a S3 bucket. It uses the Client API (low-level) of Boto 3.
    • awss3listall-capi - AWS S3 List All (Client API): Example of how to handle S3 buckets and list information about all S3 buckets and the objects they contain. It uses the Client API (low-level) of Boto 3.
    • awss3upload-capi - AWS S3 List (Client API): Example of how to handle S3 buckets and upload a local file to a S3 bucket. It uses the Client API (low-level) of Boto 3.
    • awss3download-capi - AWS S3 List (Client API): Example of how to handle S3 buckets and download an object from a S3 bucket to a local file. It uses the Client API (low-level) of Boto 3.
    • awss3deleteobject-capi - AWS S3 Delete Object (Client API): Example of how to handle S3 buckets and delete an object in a S3 bucket. It uses the Client API (low-level) of Boto 3.
    • awss3copy-capi - AWS S3 Copy (Client API): Example of how to handle S3 buckets and copy an object from a S3 bucket to another S3 bucket. It uses the Client API (low-level) of Boto 3.
    • awss3move-capi - AWS S3 Move (Client API): Example of how to handle S3 buckets and move an object from a S3 bucket to another S3 bucket. It uses the Client API (low-level) of Boto 3.
  • Using the Resource API (high-level) of Boto 3:

    • awss3create-rapi - AWS S3 Create (Resource API): Example of how to handle S3 buckets and create a new S3 bucket. It uses the Resource API (high-level) of Boto 3.
    • awss3delete-rapi - AWS S3 Delete (Resource API): Example of how to handle S3 buckets and delete a S3 bucket. It uses the Resource API (high-level) of Boto 3.
    • awss3list-rapi - AWS S3 List (Resource API): Example of how to handle S3 buckets and list information about objects in a S3 bucket. It uses the Resource API (high-level) of Boto 3.
    • awss3listall-rapi - AWS S3 List All (Resource API): Example of how to handle S3 buckets and list information about all S3 buckets and the objects they contain. It uses the Resource API (high-level) of Boto 3.
    • awss3upload-rapi - AWS S3 List (Resource API): Example of how to handle S3 buckets and upload a local file to a S3 bucket. It uses the Resource API (high-level) of Boto 3.
    • awss3download-rapi - AWS S3 List (Resource API): Example of how to handle S3 buckets and download an object from a S3 bucket to a local file. It uses the Resource API (high-level) of Boto 3.
    • awss3deleteobject-rapi - AWS S3 Delete Object (Resource API): Example of how to handle S3 buckets and delete an object in a S3 bucket. It uses the Resource API (high-level) of Boto 3.
    • awss3copy-rapi - AWS S3 Copy (Resource API): Example of how to handle S3 buckets and copy an object from a S3 bucket to another S3 bucket. It uses the Resource API (high-level) of Boto 3.
    • awss3move-rapi - AWS S3 Move (Resource API): Example of how to handle S3 buckets and move an object from a S3 bucket to another S3 bucket. It uses the Resource API (high-level) of Boto 3.

License

This code is released under the MIT License. See LICENSE file.

About

Python examples on AWS (Amazon Web Services) using AWS SDK for Python (Boto3). How to manage EC2 instances, Lambda Functions, S3 buckets, etc.

Topics

amazonamazon-lambdaamazon-s3amazon-servicesamazon-web-servicesawsaws-ec2aws-lambdaaws-s3botoec2ec2-instancelambda-functionspythonpython-programmingpython3s3s3-buckets3-bucketss3-storage

Resources

Readme
MIT license
Activity

Stars

62 stars

Watchers

0 watching

Forks

60 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.