- 新しい順
- 投票が多い順
- コメントが多い順
Hi clogwog. You can achieve it by making a call to get_deployment, modifying the result with the new component version, and then calling create_deployment.
An example, using boto3, here: https://github.com/awslabs/aws-greengrass-labs-component-for-home-assistant/blob/main/deploy_component_version.py
In that example, the component has dependencies on the Secret manager component and the Docker application manager component, which is why they're mentioned in the code.
Thanks Greg !
looks like we will switch to python for this bit.
Cheers, Tom
I notice that the search starts by searches for the latest deployment of a particular device.
response = greengrassv2_client.list_deployments( targetArn=thing_arn, historyFilter='LATEST_ONLY', maxResults=1 )
We have devices with multiple deployments, so i can't assume that the latest deployment is the correct one to update.
The list-deployments aws cli (https://docs.aws.amazon.com/cli/latest/reference/greengrass/list-deployments.html) seems to take a group-id not a Target-Arn of a thing ?
--group-id (string) The ID of the Greengrass group.
or is this a different list-deployments call ? or is that a greengrass v1 group ?
Hi Tom. Yes, depending on your deployments, you will need some different logic on the listing to find the right one to get and modify.
FYI you've referenced our Greengrass V1 create deployment API, which doesn't have the concept of a component. For V2, we have a similar API. https://docs.aws.amazon.com/greengrass/v2/developerguide/create-deployments.html
Nice catch Joe. I'd upvote your comment if I could.