AWS IoT Greengrass Stream Manager SDK
raw JSON → 1.1.1 verified Fri May 01 auth: no python
The AWS IoT Greengrass Stream Manager SDK for Python allows you to manage and interact with the Greengrass Stream Manager feature, enabling efficient export of data streams to AWS cloud services. Current version 1.1.1, released infrequently.
pip install stream-manager Common errors
error ModuleNotFoundError: No module named 'stream_manager.client' ↓
cause Using wrong import path or outdated version (<1.0).
fix
Install stream-manager >=1.0 and use
from stream_manager.client import StreamManagerClient. error ImportError: cannot import name 'StreamManagerClient' from 'stream_manager' ↓
cause Trying to import from top-level package, but it's in a submodule.
fix
Use
from stream_manager.client import StreamManagerClient. error AttributeError: 'NoneType' object has no attribute 'close' ↓
cause Client creation failed silently (e.g., not running on Greengrass Core) and returned None.
fix
Check that code runs on a Greengrass Core device and that the client is properly initialized.
Warnings
breaking Version 1.0.x: The import paths changed. `from stream_manager import StreamManagerClient` no longer works; use `from stream_manager.client import StreamManagerClient`. ↓
fix Update imports to `from stream_manager.client import StreamManagerClient`.
gotcha Resource leaks are common if the client is not closed explicitly. Use context managers (`with` statement) or ensure `client.close()` is called. ↓
fix Always close the client after use, ideally via `client.close()` or a `try/finally` block.
gotcha The SDK requires AWS IoT Greengrass Core environment and will fail silently if not running on Greengrass Core. Expect import or connection errors outside Greengrass. ↓
fix Run code only on a Greengrass Core device or use mock/unit tests when developing off-device.
Imports
- StreamManagerClient wrong
from stream_manager import StreamManagerClientcorrectfrom stream_manager.client import StreamManagerClient
Quickstart
from stream_manager.client import StreamManagerClient
from stream_manager.sagemaker_edge_manager import SagemakerEdgeManager
# Note: client requires valid Greengrass group configuration
client = StreamManagerClient()
print("Stream manager client created")
# Remember to close the client to release resources
client.close()