Skip to content

Commit d25b3a6

Browse files
committed
Release of Version 1.4.0
1 parent 4b27490 commit d25b3a6

5 files changed

Lines changed: 26 additions & 13 deletions

File tree

CHANGELOG.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
CHANGELOG
33
=========
44

5+
1.4.0
6+
======
7+
8+
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.)
9+
10+
511
1.3.0
612
======
713

README.rst

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
Greengrass SDK
22
=====================
33

4-
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.
5-
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>`_.
4+
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.
5+
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>`_.
66

77
===============================
8-
Using AWS Greengrass Core SDK
8+
Using AWS IoT Greengrass Core SDK
99
===============================
1010

11-
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.
11+
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.
1212

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

@@ -48,7 +48,7 @@ Now that you have a lambda client, you can publish requests.
4848
4949
# Invoke the lambda function
5050
response = client.invoke(
51-
FunctionName='arn:aws:lambda:<region>:<account id>:function:<function name>',
51+
FunctionName='arn:<partition>:lambda:<region>:<account id>:function:<function name>',
5252
InvocationType='RequestResponse',
5353
Payload=payload,
5454
Qualifier='2'
@@ -58,12 +58,14 @@ Now that you have a lambda client, you can publish requests.
5858
Compatibility
5959
==============
6060

61-
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.
61+
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.
6262

6363
+-------------+------------------------+
6464
| GGC Version | Compatible SDK Versions|
6565
+=============+========================+
6666
| 1.0.x-1.6.x | 1.0.x-1.2.x |
6767
+-------------+------------------------+
68-
| 1.7.x | 1.0.x-1.3.x |
68+
| 1.7.x-1.8.x | 1.0.x-1.3.x |
69+
+-------------+------------------------+
70+
| 1.9.x | 1.0.x-1.4.x |
6971
+-------------+------------------------+

greengrasssdk/Lambda.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,13 @@ def invoke(self, **kwargs):
5656

5757
final_qualifier = arn_qualifier if arn_qualifier else extraneous_qualifier
5858

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

6367
# ClientContext must be base64 if given, but is an option parameter
6468
try:

greengrasssdk/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@
55
from .client import client
66
from .Lambda import StreamingBody
77

8-
__version__ = '1.3.0'
9-
INTERFACE_VERSION = '1.1'
8+
__version__ = '1.4.0'
9+
INTERFACE_VERSION = '1.3'

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def get_version():
2525
setup(
2626
name='greengrasssdk',
2727
version=get_version(),
28-
description='The AWS Greengrass SDK for Python',
28+
description='The AWS IoT Greengrass SDK for Python',
2929
long_description=open('README.rst').read(),
3030
author='Amazon Web Services',
3131
url='',
@@ -45,5 +45,6 @@ def get_version():
4545
'License :: OSI Approved :: Apache Software License',
4646
'Programming Language :: Python',
4747
'Programming Language :: Python :: 2.7',
48+
'Programming Language :: Python :: 3.7',
4849
],
4950
)

0 commit comments

Comments
 (0)