I am trying to deploy docker containers to IoT devices using Greengrass. The docker-compose.yml
file is stored inside of an s3 bucket. The IAM policies and Greengrass policies that I am using allow me to retrieve from s3 buckets.
My recipe.yaml
looks like this:
---
RecipeFormatVersion: '2020-01-25'
ComponentName: com.example.DockerTest
ComponentVersion: '1.0.0'
ComponentDescription: 'Uses Greengrass to deploy NodeRed and Mosquitto to docker containers on the IoT defices.'
ComponentPublisher: Amazon
ComponentDependencies:
aws.greengrass.DockerApplicationManager:
VersionRequirement: ~2.0.0
Manifests:
- Platform:
os: all
Lifecycle:
run: docker-compose -f {artifacts:path}/docker-compose.yaml up
Artifacts:
- URI: "docker:nodered/node-red:latest"
- URI: "docker:eclipse-mosquitto:latest"
- URI: "s3://<bucket name>/docker-compose.yml"
My gdk-config.json
looks like this:
{
"component": {
"com.example.DockerTest": {
"author": "<custom author name>",
"version": "1.0.0",
"build": {
"build_system": "zip"
},
"publish": {
"bucket": "<bucket name>",
"region": "<region>"
}
}
},
"gdk_version": "1.0.0"
}
Everything in angle brackets is valid, by the way - just left out for privacy.
However, whenever i run gdk component build
where the component is specified, I get this error:
Exception: Could not find artifact with URI 's3://<bucket name>/docker-compose.yml' on s3 or inside the build folders
I made sure to specify the URI correctly, after copy + pasting it from s3. Why is this happening?