
Security News
Another Round of TEA Protocol Spam Floods npm, But It’s Not a Worm
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.
mypy-boto3-lambda
Advanced tools
Type annotations for boto3 Lambda 1.40.64 service generated with mypy-boto3-builder 8.11.0

Type annotations for boto3 Lambda 1.40.64 compatible with VSCode, PyCharm, Emacs, Sublime Text, mypy, pyright and other tools.
Generated with mypy-boto3-builder 8.11.0.
More information can be found on boto3-stubs page and in mypy-boto3-lambda docs.
See how it helps you find and fix potential bugs:

You can generate type annotations for boto3 package locally with
mypy-boto3-builder. Use
uv for build
isolation.
uvx --with 'boto3==1.40.64' mypy-boto3-builderboto3-stubs AWS SDK.Lambda service.Add
AWS Boto3
extension to your VSCode and run AWS boto3: Quick Start command.
Click Modify and select boto3 common and Lambda.
Install boto3-stubs for Lambda service.
# install with boto3 type annotations
python -m pip install 'boto3-stubs[lambda]'
# Lite version does not provide session.client/resource overloads
# it is more RAM-friendly, but requires explicit type annotations
python -m pip install 'boto3-stubs-lite[lambda]'
# standalone installation
python -m pip install mypy-boto3-lambda
Add conda-forge to your channels with:
conda config --add channels conda-forge
conda config --set channel_priority strict
Once the conda-forge channel has been enabled, mypy-boto3-lambda can be
installed with:
conda install mypy-boto3-lambda
List all available versions of mypy-boto3-lambda available on your platform
with:
conda search mypy-boto3-lambda --channel conda-forge
python -m pip uninstall -y mypy-boto3-lambda
Pylance as your Python Language Serverboto3-stubs[lambda] in your environment:python -m pip install 'boto3-stubs[lambda]'
Both type checking and code completion should now work. No explicit type
annotations required, write your boto3 code as usual.
⚠️ Due to slow PyCharm performance on
Literaloverloads (issue PY-40997), it is recommended to use boto3-stubs-lite until the issue is resolved.
⚠️ If you experience slow performance and high CPU usage, try to disable
PyCharmtype checker and use mypy or pyright instead.
⚠️ To continue using
PyCharmtype checker, you can try to replaceboto3-stubswith boto3-stubs-lite:
pip uninstall boto3-stubs
pip install boto3-stubs-lite
Install boto3-stubs[lambda] in your environment:
python -m pip install 'boto3-stubs[lambda]'
Both type checking and code completion should now work.
boto3-stubs with services you use in your environment:python -m pip install 'boto3-stubs[lambda]'
(use-package lsp-pyright
:ensure t
:hook (python-mode . (lambda ()
(require 'lsp-pyright)
(lsp))) ; or lsp-deferred
:init (when (executable-find "python3")
(setq lsp-pyright-python-executable-cmd "python3"))
)
boto3-stubsType checking should now work. No explicit type annotations required, write
your boto3 code as usual.
boto3-stubs[lambda] with services you use in your environment:python -m pip install 'boto3-stubs[lambda]'
Type checking should now work. No explicit type annotations required, write
your boto3 code as usual.
Not tested, but as long as your IDE supports mypy or pyright, everything
should work.
mypy: python -m pip install mypyboto3-stubs[lambda] in your environment:python -m pip install 'boto3-stubs[lambda]'
Type checking should now work. No explicit type annotations required, write
your boto3 code as usual.
pyright: npm i -g pyrightboto3-stubs[lambda] in your environment:python -m pip install 'boto3-stubs[lambda]'
Optionally, you can install boto3-stubs to typings directory.
Type checking should now work. No explicit type annotations required, write
your boto3 code as usual.
It is totally safe to use TYPE_CHECKING flag in order to avoid
mypy-boto3-lambda dependency in production. However, there is an issue in
pylint that it complains about undefined variables. To fix it, set all types
to object in non-TYPE_CHECKING mode.
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from mypy_boto3_ec2 import EC2Client, EC2ServiceResource
from mypy_boto3_ec2.waiters import BundleTaskCompleteWaiter
from mypy_boto3_ec2.paginators import DescribeVolumesPaginator
else:
EC2Client = object
EC2ServiceResource = object
BundleTaskCompleteWaiter = object
DescribeVolumesPaginator = object
...
LambdaClient provides annotations for boto3.client("lambda").
from boto3.session import Session
from mypy_boto3_lambda import LambdaClient
client: LambdaClient = Session().client("lambda")
# now client usage is checked by mypy and IDE should provide code completion
mypy_boto3_lambda.paginator module contains type annotations for all
paginators.
from boto3.session import Session
from mypy_boto3_lambda import LambdaClient
from mypy_boto3_lambda.paginator import (
ListAliasesPaginator,
ListCodeSigningConfigsPaginator,
ListEventSourceMappingsPaginator,
ListFunctionEventInvokeConfigsPaginator,
ListFunctionUrlConfigsPaginator,
ListFunctionsByCodeSigningConfigPaginator,
ListFunctionsPaginator,
ListLayerVersionsPaginator,
ListLayersPaginator,
ListProvisionedConcurrencyConfigsPaginator,
ListVersionsByFunctionPaginator,
)
client: LambdaClient = Session().client("lambda")
# Explicit type annotations are optional here
# Types should be correctly discovered by mypy and IDEs
list_aliases_paginator: ListAliasesPaginator = client.get_paginator("list_aliases")
list_code_signing_configs_paginator: ListCodeSigningConfigsPaginator = client.get_paginator(
"list_code_signing_configs"
)
list_event_source_mappings_paginator: ListEventSourceMappingsPaginator = client.get_paginator(
"list_event_source_mappings"
)
list_function_event_invoke_configs_paginator: ListFunctionEventInvokeConfigsPaginator = (
client.get_paginator("list_function_event_invoke_configs")
)
list_function_url_configs_paginator: ListFunctionUrlConfigsPaginator = client.get_paginator(
"list_function_url_configs"
)
list_functions_by_code_signing_config_paginator: ListFunctionsByCodeSigningConfigPaginator = (
client.get_paginator("list_functions_by_code_signing_config")
)
list_functions_paginator: ListFunctionsPaginator = client.get_paginator("list_functions")
list_layer_versions_paginator: ListLayerVersionsPaginator = client.get_paginator(
"list_layer_versions"
)
list_layers_paginator: ListLayersPaginator = client.get_paginator("list_layers")
list_provisioned_concurrency_configs_paginator: ListProvisionedConcurrencyConfigsPaginator = (
client.get_paginator("list_provisioned_concurrency_configs")
)
list_versions_by_function_paginator: ListVersionsByFunctionPaginator = client.get_paginator(
"list_versions_by_function"
)
mypy_boto3_lambda.waiter module contains type annotations for all waiters.
from boto3.session import Session
from mypy_boto3_lambda import LambdaClient
from mypy_boto3_lambda.waiter import (
FunctionActiveV2Waiter,
FunctionActiveWaiter,
FunctionExistsWaiter,
FunctionUpdatedV2Waiter,
FunctionUpdatedWaiter,
PublishedVersionActiveWaiter,
)
client: LambdaClient = Session().client("lambda")
# Explicit type annotations are optional here
# Types should be correctly discovered by mypy and IDEs
function_active_v2_waiter: FunctionActiveV2Waiter = client.get_waiter("function_active_v2")
function_active_waiter: FunctionActiveWaiter = client.get_waiter("function_active")
function_exists_waiter: FunctionExistsWaiter = client.get_waiter("function_exists")
function_updated_v2_waiter: FunctionUpdatedV2Waiter = client.get_waiter("function_updated_v2")
function_updated_waiter: FunctionUpdatedWaiter = client.get_waiter("function_updated")
published_version_active_waiter: PublishedVersionActiveWaiter = client.get_waiter(
"published_version_active"
)
mypy_boto3_lambda.literals module contains literals extracted from shapes
that can be used in user code for type checking.
Full list of Lambda Literals can be found in
docs.
from mypy_boto3_lambda.literals import ApplicationLogLevelType
def check_value(value: ApplicationLogLevelType) -> bool: ...
mypy_boto3_lambda.type_defs module contains structures and shapes assembled
to typed dictionaries and unions for additional type checking.
Full list of Lambda TypeDefs can be found in
docs.
# TypedDict usage example
from mypy_boto3_lambda.type_defs import AccountLimitTypeDef
def get_value() -> AccountLimitTypeDef:
return {
"TotalCodeSize": ...,
}
Fully automated
mypy-boto3-builder carefully
generates type annotations for each service, patiently waiting for boto3
updates. It delivers drop-in type annotations for you and makes sure that:
boto3 services are covered.boto3 service gets valid type
annotations extracted from botocore schemas.boto3, botocore, aiobotocore and aioboto3
librariesmypy, pyright, VSCode, PyCharm, Sublime Text and Emacs
compatibilityClient, ServiceResource, Resource, Waiter Paginator type
annotations for each serviceTypeDefs for each serviceLiterals for each serviceboto3.client and boto3.resource callssession.client and session.resource callsclient.get_waiter and client.get_paginator
callsServiceResource and Resource collectionsaiobotocore.Session.create_client callsBuilder changelog can be found in Releases.
mypy-boto3-lambda version is the same as related boto3 version and follows
Python Packaging version specifiers.
All services type annotations can be found in boto3 docs
This package is auto-generated. Please reports any bugs or request new features in mypy-boto3-builder repository.
FAQs
Type annotations for boto3 Lambda 1.40.64 service generated with mypy-boto3-builder 8.11.0
We found that mypy-boto3-lambda demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.

Security News
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads

Research
/Security News
A malicious Chrome extension posing as an Ethereum wallet steals seed phrases by encoding them into Sui transactions, enabling full wallet takeover.