2 Antworten
- Neueste
- Die meisten Stimmen
- Die meisten Kommentare
0
The Greengrass team do need to work on information given to local Lambda.
For now, as the group ID will never change, the simplest way would be to add the known Group ID to the Lambda Environmental Variables when setting up the function resource definition, such as the following:
response = greengrass_client.create_function_definition_version(
FunctionDefinitionId=definition_id,
Functions=[
{
'Id': 'somearn',
'FunctionArn': 'somearn',
'FunctionConfiguration': {
'Environment': {
'AccessSysfs': False,
'Variables': {
'GG_GROUP_ID': gg_group_id,
'LOG_LEVEL': 'debug'
},
'ResourceAccessPolicies': resource_access_policies,
},
'MemorySize': 512000,
'Pinned': True,
'Timeout': 30
},
}
]
)
I assume it is is also possible to define environmental variables from the Greengrass console also,
Hope this helps,
Marty
beantwortet vor 5 Jahren
0
Thanks, that'll work. It will create some overhead in the group creation, but I guess I can live with that.
beantwortet vor 5 Jahren
Relevanter Inhalt
- Wie veröffentliche ich MQTT-Nachrichten von meinem Gerät auf AWS IoT Core, wenn ich Python verwende?AWS OFFICIALAktualisiert vor 3 Jahren
- AWS OFFICIALAktualisiert vor 3 Jahren
- AWS OFFICIALAktualisiert vor 10 Monaten
- AWS OFFICIALAktualisiert vor 2 Jahren