Skip to content

Commit

Permalink
Release of Version 1.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
seanc-amazon committed May 1, 2019
1 parent 4b27490 commit d25b3a6
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 13 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
CHANGELOG
=========

1.4.0
======

Added support for Python 3.7 Lambda runtime. Lambda functions that use Python 3.7 can now run on an AWS IoT Greengrass core. (AWS IoT Greengrass continues to support Python 2.7 runtime.)


1.3.0
======

Expand Down
16 changes: 9 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Greengrass SDK
=====================

The AWS Greengrass Core SDK is meant to be used by AWS Lambda functions running on an AWS Greengrass Core. It will enable Lambda functions to invoke other Lambda functions deployed to the Greengrass Core, publish messages to the Greengrass Core and work with the local Shadow service.
You can find the latest, most up to date, documentation at our `doc site <http://aws-greengrass-core-sdk-python-docs.s3-website-us-east-1.amazonaws.com/v1.3.0/index.html>`_.
The AWS IoT Greengrass Core SDK is meant to be used by AWS Lambda functions running on an AWS IoT Greengrass Core. It will enable Lambda functions to invoke other Lambda functions deployed to the Greengrass Core, publish messages to the Greengrass Core and work with the local Shadow service.
You can find the latest, most up to date, documentation at our `doc site <http://aws-greengrass-core-sdk-python-docs.s3-website-us-east-1.amazonaws.com/v1.4.0/index.html>`_.

===============================
Using AWS Greengrass Core SDK
Using AWS IoT Greengrass Core SDK
===============================

To use the AWS Greengrass Core SDK, you must first import the AWS Greengrass Core SDK in your Lambda function as you would with any other external libraries. You then need to create a client for 'iot-data' or 'lambda'. Use 'iot-data' if you wish to publish messages to the local AWS Greengrass Core and interact with the local Shadow service. Use 'lambda' if you wish to invoke other Lambda functions deployed to the same AWS Greengrass Core.
To use the AWS IoT Greengrass Core SDK, you must first import the AWS IoT Greengrass Core SDK in your Lambda function as you would with any other external libraries. You then need to create a client for 'iot-data' or 'lambda'. Use 'iot-data' if you wish to publish messages to the local Greengrass Core and interact with the local Shadow service. Use 'lambda' if you wish to invoke other Lambda functions deployed to the same Greengrass Core.

Here is an example for using the 'iot-data' client

Expand Down Expand Up @@ -48,7 +48,7 @@ Now that you have a lambda client, you can publish requests.
# Invoke the lambda function
response = client.invoke(
FunctionName='arn:aws:lambda:<region>:<account id>:function:<function name>',
FunctionName='arn:<partition>:lambda:<region>:<account id>:function:<function name>',
InvocationType='RequestResponse',
Payload=payload,
Qualifier='2'
Expand All @@ -58,12 +58,14 @@ Now that you have a lambda client, you can publish requests.
Compatibility
==============

As new features are added to AWS Greengrass, previous versions of the Greengrass SDK will be incompatible with newer versions of the AWS Greengrass core. The following table lists the compatible SDKs for all GGC releases.
As new features are added to AWS IoT Greengrass, previous versions of the AWS IoT Greengrass SDK will be incompatible with newer versions of the AWS IoT Greengrass core. The following table lists the compatible SDKs for all GGC releases.

+-------------+------------------------+
| GGC Version | Compatible SDK Versions|
+=============+========================+
| 1.0.x-1.6.x | 1.0.x-1.2.x |
+-------------+------------------------+
| 1.7.x | 1.0.x-1.3.x |
| 1.7.x-1.8.x | 1.0.x-1.3.x |
+-------------+------------------------+
| 1.9.x | 1.0.x-1.4.x |
+-------------+------------------------+
10 changes: 7 additions & 3 deletions greengrasssdk/Lambda.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,13 @@ def invoke(self, **kwargs):

final_qualifier = arn_qualifier if arn_qualifier else extraneous_qualifier

function_arn = FunctionArnFields.build_arn_string(
arn_fields.region, arn_fields.account_id, arn_fields.name, final_qualifier
)
try:
# GGC v1.9.0 or newer
function_arn = FunctionArnFields.build_function_arn(arn_fields.unqualified_arn, final_qualifier)
except AttributeError:
# older GGC version
raise AttributeError('class FunctionArnFields has no attribute \'build_function_arn\'. build_function_arn '
'is introduced in GGC v1.9.0. Please check your GGC version.')

# ClientContext must be base64 if given, but is an option parameter
try:
Expand Down
4 changes: 2 additions & 2 deletions greengrasssdk/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
from .client import client
from .Lambda import StreamingBody

__version__ = '1.3.0'
INTERFACE_VERSION = '1.1'
__version__ = '1.4.0'
INTERFACE_VERSION = '1.3'
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def get_version():
setup(
name='greengrasssdk',
version=get_version(),
description='The AWS Greengrass SDK for Python',
description='The AWS IoT Greengrass SDK for Python',
long_description=open('README.rst').read(),
author='Amazon Web Services',
url='',
Expand All @@ -45,5 +45,6 @@ def get_version():
'License :: OSI Approved :: Apache Software License',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.7',
],
)

0 comments on commit d25b3a6

Please sign in to comment.