Deploy Python Lambda functions with .zip file archives
Your AWS Lambda function's code consists of scripts or compiled programs and their dependencies. You use a deployment package to deploy your function code to Lambda. Lambda supports two types of deployment packages: container images and .zip files.
You can use a built-in ZIP archive utility, or any other ZIP utility (such as 7zip
-
The .zip file must contain your function's code, and any dependencies used to run your function's code (if applicable) on Lambda. If your function depends only on standard libraries, or AWS SDK libraries, you do not need to include the libraries in your .zip file. These libraries are included with our supported Lambda runtime environments.
-
If your .zip file is larger than 50 MB, we recommend uploading it to an Amazon S3 bucket. For more information, see Using other AWS services to build a deployment package.
-
If your .zip file contains C-extension libraries, such as the Pillow (PIL) library, we recommend using the AWS SAM CLI to build a deployment package. For more information, see Lambda deployment packages.
This page describes how to create a .zip file as your deployment package, and then use the .zip file to deploy your function code to Lambda using the AWS Command Line Interface (AWS CLI). To upload your .zip file on the Lambda console, see Deployment packages.
Sections
Prerequisites
The following steps assume that you have created a Lambda function, and are updating the deployment package for your function. If you haven't created a function yet, see Building Lambda functions with Python.
The AWS Command Line Interface (AWS CLI) is an open source tool that enables you to interact with AWS services using commands in your command-line shell. To complete the steps in this section, you need the following:
Updating a function with no dependencies
The following steps show how to create a deployment package that contains only your function code, and upload it to Lambda using the AWS CLI.
To update a Python function with no dependencies
-
Add function code files to the root of your deployment package.
zip my-deployment-package.zip lambda_function.py
-
Use the update-function-code command with the fileb:// prefix to upload the binary .zip file to Lambda and update the function code.
aws lambda update-function-code --function-name MyLambdaFunction --zip-file fileb://my-deployment-package.zip
You should see the following output:
{ "FunctionName": "mylambdafunction", "FunctionArn": "arn:aws:lambda:us-west-2:123456789012:function:mylambdafunction", "Runtime": "python3.8", "Role": "arn:aws:iam::123456789012:role/lambda-role", "Handler": "lambda_function.lambda_handler", "CodeSize": 815, "CodeSha256": "GcZ05oeHoJi61VpQj7vCLPs8DwCXmX5sE/fE2IHsizc=", "Version": "$LATEST", "RevisionId": "d1e983e3-ca8e-434b-8dc1-7add83d72ebd", ... }
The Lambda function in the last step uses a function handler of lambda_function.lambda_handler
. For more information about function handler naming conventions, see AWS Lambda function handler in Python.
Updating a function with additional dependencies
If your Lambda function depends on libraries other than the AWS SDK for Python (Boto3)
Make sure that the files and directories in the deployment package have their permissions set to be globally readable, so that Lambda can import your Python modules at runtime.
The following steps show how to install the requests
If you are creating a deployment package used in a layer, see Include library dependencies in a layer.
To update a Python function with dependencies
-
Install libraries in a
package
directory withpip
's--target
option.pip install --target ./package requests
Note To prevent
distutils
errors on Debian-based systemssuch as Ubuntu, you may need to pass the --system
option. -
Navigate to the
package
directory.cd package
-
Create a deployment package with the installed libraries at the root.
zip -r ../my-deployment-package.zip .
The last command saves the deployment package to the root of the
my-function
directory. -
Navigate back to the
my-function
directory.cd..
-
Add function code files to the root of your deployment package.
zip -g my-deployment-package.zip lambda_function.py
After you complete this step, you should have the following directory structure:
my-deployment-package.zip$ │ lambda_function.py │ __pycache__ │ certifi/ │ certifi-2020.6.20.dist-info/ │ chardet/ │ chardet-3.0.4.dist-info/ ...
-
Use the update-function-code command with the fileb:// prefix to upload the binary .zip file to Lambda and update the function code.
aws lambda update-function-code --function-name MyLambdaFunction --zip-file fileb://my-deployment-package.zip
You should see the following output:
{ "FunctionName": "mylambdafunction", "FunctionArn": "arn:aws:lambda:us-west-2:123456789012:function:mylambdafunction", "Runtime": "python3.8", "Role": "arn:aws:iam::123456789012:role/lambda-role", "Handler": "lambda_function.lambda_handler", "CodeSize": 2269409, "CodeSha256": "GcZ05oeHoJi61VpQj7vCLPs8DwCXmX5sE/fE2IHsizc=", "Version": "$LATEST", "RevisionId": "a9c05ffd-8ad6-4d22-b6cd-d34a00c1702c", ... }
The Lambda function in the last step uses a function handler of lambda_function.lambda_handler
. For more information about function handler naming conventions, see AWS Lambda function handler in Python.
Using a virtual environment
If your Lambda function depends on libraries other than the AWS SDK for Python (Boto3)
The following steps show how to install the requests
If you are creating a deployment package used in a layer, see Include library dependencies in a layer.
To update a Python function with a virtual environment
-
Create a virtual environment.
virtualenv myvenv
Note The virtualenv
module uses Python 2.7 by default. You may need to add a local export path to your command line profile, such as export VIRTUALENV_PYTHON=/usr/bin/python3.8
when using the virtualenv module with Python 3 and pip 3. -
Activate the environment.
source myvenv/bin/activate
-
Install libraries with pip.
pip install requests
-
Deactivate the virtual environment.
deactivate
-
Create a deployment package with the installed libraries at the root.
cd myvenv/lib/python3.8/site-packages zip -r ../../../../my-deployment-package.zip .
The last command saves the deployment package to the root of the
my-function
directory.Tip A library may appear in
site-packages
ordist-packages
and the first folderlib
orlib64
. You can use thepip show
command to locate a specific package. -
Add function code files to the root of your deployment package.
cd ../../../../
zip -g my-deployment-package.zip lambda_function.py
After you complete this step, you should have the following directory structure:
my-deployment-package.zip$ │ lambda_function.py │ __pycache__ │ certifi/ │ certifi-2020.6.20.dist-info/ │ chardet/ │ chardet-3.0.4.dist-info/ ...
-
Use the update-function-code command with the fileb:// prefix to upload the binary .zip file to Lambda and update the function code.
aws lambda update-function-code --function-name MyLambdaFunction --zip-file fileb://my-deployment-package.zip
You should see the following output:
{ "FunctionName": "mylambdafunction", "FunctionArn": "arn:aws:lambda:us-west-2:123456789012:function:mylambdafunction", "Runtime": "python3.8", "Role": "arn:aws:iam::123456789012:role/lambda-role", "Handler": "lambda_function.lambda_handler", "CodeSize": 5912988, "CodeSha256": "A2P0NUWq1J+LtSbkuP8tm9uNYqs1TAa3M76ptmZCw5g=", "Version": "$LATEST", "RevisionId": "5afdc7dc-2fcb-4ca8-8f24-947939ca707f", ... }
The Lambda function in the last step uses a function handler of lambda_function.lambda_handler
. For more information about function handler naming conventions, see AWS Lambda function handler in Python.


Roll The Dice
See if you can get to 100!
playerInGame.name
New Game
Enter Player Name:
Enter Player Name:
Start Game
, you are up!


I'm excited about creating beautiful easy to use interfaces with clean maintainable code.
CSS by hand - Frameworks (Bootstrap, Bulma, etc)
Vanilla JS, ES6, Vue.js, Node, Express
Using Sketch
Django Web App Development, Python Scripting


<EMAIL_ADDRESS>Locations
Ratings & Reviews
Testimonials
Contact Us
Metal Roofing
Siding
Safety Tubs Installation
Kitchen & Bathroom Remodeling
Windows Installation
Basement Finishing
NexGen Construction - Contact Form
Please use the form below and we will contact you shortly, or call us at: 1-800-314-1480.
Contact Name
*
Company
Email Address :
*
Best Phone # XXX-XXX-XXXX
*
How did you hear about us?
Choose One
Yellow Pages
Direct Mail
Internet Search
Referral
Other
Questions/Price Quote
[ Different Image ]


"Using WebAR, we bring you point-of-sale information with geospatial or visual triggers in the environment, so jump in and look for markers around to initiate the whole new experience of limitless possibilities."
Built using AR.js, we aim at developing an Augmented Reality Experience where collection of technologies used to blend computer generated information with the viewer’s natural senses.
We proudly welcome you to our AR mall where we blurred the lines of reality and create a unique WebAR shopping experience to our users on the scan of a QR code and let us guide you through guide you through the whole workflow from advertising to purchasing.


No need to make things complicated...
If you need a really simple layout with only the most basic features, then this template can be a good choice. It is completely free and may be used without any limitations or obligations. I kindly ask you to leave the design credit link in the footer, but it is only a request and not a requirement. If you remove the credits, please consider supporting my work in some other way.
More useful resources:
Bottom link 1 | Bottom link 2 | Bottom link 3 | Bottom link 4 | Bottom link 5 | Bottom link 6


Software Development Portfolio
Here you can find a list of projects I worked on, either while attending university or during employment. I have included links to code samples on my GitHub accounts (sweetnhappy & thebigh2014), if available. More samples to come.
- Date Started and Ended: September 2014 - July 2015
- Contribution: Developer on R&D Team, Server-side & Client-side Design, Implementation, and Maintenance
-
Technologies Used:
- Symfony 2 PHP Framework
- Twig Templating
- HTML 5
- Doctrine ODM
- AngularJS
- Bootstrap 3
- CSS 3
- jQuery 2.1 and jQuery UI
- Git (Bitbucket & Github)
- Mongo NoSQL Database
- Javascript
- RESTful API with JSON
- Description: This web application consists of front-end and back-end development along with a NoSQL database. ManagementDriver is a "Total Business Performance Management Platform" including Objective and Task Management with Performance Reporting, Digital Manuals, File Storage aligning with key business areas, Organizational Structure Visualization and Management, and Managerial Resources (such as instructional videos). Not only is it used by Wardell's business clientele, but it is also used internally so everyone at Wardell is familiar with the flagship software product. See www.managementdriver.com for more on these and other facts about ManagementDriver.
-
Code Samples: The following Github repositories are open source modules used in
ManagementDriver.
- Screenshot:
-
Screenshot Comments:
- This screenshot shows the primary layout of the web application with a paginated list view in the content area.
- Date Started and Ended: July 2012 - June 2013
- Contribution: Junior Developer of C#/Web Development Team, Server-side Infrastructure, Web-based Administration Control Panel GUI Design and Implementation
-
Technologies Used:
- C# .NET 4
- ASP.NET MVC 3 and 4
- ASP.NET Web API (REST)
- C# Razor Templating
- HTML 5
- Javascript
- CSS 3
- jQuery 1.6+ and jQuery UI
- AngularJS
- Bootstrap 2+
- CQRS and Event Sourcing
- SpecFlow and NUnit Tests
- Rhino Mocks
- JSON.NET
- Autofac
- SignalR
- Git (Github)
- DevExpress Xtra Reports
-
Windows Azure
- Cloud Services
- Mobile Services
- Storage
- SQL Database
- Service Bus
- Description: This project consists of three parts, an iPad app, a web-based control panel, and the cloud-based server-side infrastructure to support the above. SiteDocs for iPad is a complete workplace safety solution designed to prove due diligence, reduce injuries, reduce owner liability, and more. It is also designed to be powerful but also easy to use for smaller companies, as well as being editable, customizable, and scalable. See www.sitedocs.com for more on these and other facts about SiteDocs for iPad.
- Code Samples: None available.
- Screenshots:
-
Screenshot Comments:
- Both of these pages were constructed using Bootstrap as a base with images and custom CSS used to achieve the final look and feel.
- The original mockups for these pages were done in Photoshop and the end result is 95% to 99% identical to those mockups.
- The large heading text and orange text were made using CSS effects and are actual text, not images.
- Date Started and Ended: February 2010
- Contribution: Sole Developer
- Technologies Used: Java SE 6 (including AWT graphics and Swing)
- Description: This applet was a class assignment in which I had to create an applet that visually displays how three (3) different sorting methods work with similar sets of data. The sorts are run on separate threads to show their speed relative to the other sorts.
- Code Samples: Sort Animation Applet on Github
- Screenshots:
-
Screenshot Comments:
- These screenshots show the starting, unsorted and the final, sorted visual representations of the data sets.
- These screenshots demonstrate my ability to work with the Java AWT and Swing to achieve a visual output of how these sorts work through a data set.
- The image updates dynamically in real time as the sorts progress (slowed down for optimal viewing).
- Date Started and Ended: February 2010
- Contribution: Sole Developer
- Technologies Used: Java SE 6 (including Swing and sockets)
- Description: This client/server application was a class assignment in which I had to create a chat server application along with its complementary chat client application. The server is responsible for managing client connections and relaying chat messages to all clients. The server's application window maintains a log of all activities. The client requests a unique chat name (for identification on the server) and the server's address. Once it connects to the server the client can send and receive messages from other connected clients (via the server).
- Code Samples: Multi Chat Server on Github
- Screenshot:
-
Screenshot Comments:
- This screenshot simply shows the operation of the chat server along with two connected clients.
- All of these windows are updated dynamically with the server log acting as a reference to how and where messages are being sent.
- Date Started and Ended: September - December 2009
- Contribution: Sole Developer
- Technologies Used: ActionScript 3 (Adobe Flex)
-
Description: This photo organization application was a term project completed for a class in UI design.
Features include:
- Importing images into the library
- List and Filmstrip views
- Searching by name, date, keyword
- Creating albums including adding and removing images from albums
- Automatic backup on launch and automatic save every 5 minutes
- Code Samples: mxPhotoOrganizer on Github
- Screenshots:
-
Screenshot Comments:
- The first screenshot shows the filmstip view, the second shows the list view, and the third shows the import view.
- The look and feel for this project was inspired by iTunes and Mac OS X.
- The user interface had to conform to project specifications and work within the limitations of Adobe Flex Builder 3 and ActionScript 3.
- This project received one of the top grades in the class.
- Date Started and Ended: January - April 2009
- Contribution: Partner in a Two (2) Person Team, Developer, GUI Design and Implementation
- Technologies Used: Objective-C (iPhone OS 2.1), ANSI C, SVN
- Description: This mobile application was a term project in collaboration between the University of the Fraser Valley and Scorpion Software Corp. It allows an iOS device to become a one time password generator (software token, “soft token” for short) for accessing sensitive systems protected with AuthAnvil Two Factor Authentication (2FA). See www.scorpionsoft.com for more information.
- Code Samples: None available.
- Screenshots:
-
Screenshot Comments:
- The first screenshot shows the main screen, the second shows the generated one-time passcode, and the third shows the info screen.
- These screenshots show the simple, yet effective design of the iPhone AuthAnvil Software Token.
- Alternate button designs based on built-in ones were made and incorporated into the design.
- The info button (lower right side of the first two screenshots) was also customized to have a larger surface area within which users could tap.
- There was little to no modification done to the UI between the completion of this project and when it was shipped.