This guide covers deploying the component using the Greengrass Development Kit (GDK).
- GDK CLI
- Follow Install GDK step below if not installed already.
- AWS credentials configured
- Easiest is to export a permissive role's token
- S3 bucket for component artifacts
- Built localproxy binary (see localproxy.md)
Install GDK:
pip3 install git+https://github.com/aws-greengrass/aws-greengrass-gdk-cli.git@v1.6.0Exporting AWS Credentials
export AWS_ACCESS_KEY_ID=<AWS_ACCESS_KEY_ID>
export AWS_SECRET_ACCESS_KEY=<AWS_SECRET_ACCESS_KEY>
export AWS_SESSION_TOKEN=<AWS_SESSION_TOKEN>Edit gdk-config.json:
{
"component": {
"aws.greengrass.SecureTunneling": {
"publish": {
"bucket": "your-bucket-name",
"region": "us-east-1"
}
}
}
}Build the component and create the artifact zip:
gdk component buildUpload to S3 and create the component version:
gdk component publishCreate a deployment:
gdk component list # Verify component is publishedThen deploy via AWS Console or CLI:
aws greengrassv2 create-deployment \
--target-arn "arn:aws:iot:REGION:ACCOUNT:thing/THING_NAME" \
--components '{
"aws.greengrass.SecureTunneling": {
"componentVersion": "2.0.0"
}
}'