[Solved] Trying to build an AWS Greengrass container on Fin

Hey Fins!

I’ve been thinking about an issue that I wanted to tackle, which involves controlling Amazon Alexa devices from code as opposed to voice, with additional requirements. So yesterday I started looking into AWS Greengrass, which can be run inside of a container.

I can do it on my dev machine docker instance without any issues, but when I try to push it to the Fin I consistently get

$ balena push
[Info] Starting build on device
[Info] Compose file detected
Some services failed to build:
greengrass: read ECONNRESET

My docker-compose file looks like this

version: ‘2’

container_name: greengrass
image: 216483018798.dkr.ecr.us-west-2.amazonaws.com/aws-iot-greengrass:latest -u AWS -p …removed…
hostname: greengrass
- “8883”
- QPKG=Armv7l
network_mode: “host”
privileged: true

And this is my Dockerfile for the project

FROM ubuntu:trusty

RUN adduser --system ggc_user
&& groupadd --system ggc_group

RUN apt-get update
&& apt-get install -y sqlite3 python2.7 binutils

ADD downloads/greengrass-ubuntu-x86-64-1.6.0.tar.gz /

RUN apt-get install -y ca-certificates


COPY start.sh /

ENTRYPOINT ["/start.sh"]

How can I go about debugging this to figure out what’s going on?

Thank you for any help :slight_smile: :grin:

Hello there, could you try pushing the app with debug on? The command would be DEBUG=1 balena push ...

Sorry, just did that and forgot I didn’t post it that way.

[debug] Using . as build source
[Debug] Checking we can access device
[Debug] Sending request to
[Debug] Checking device version: 9.15.7
[Info] Starting build on device
[Debug] Loading project…
[Debug] Resolving project…
[Info] Compose file detected
[Debug] Creating project…
[Debug] Sending request to
[Debug] Found build tasks:
[Debug] greengrass: image pull [aws-iot-greengrass -u AWS -p removed]
[Debug] Resolving services with [fincm3|armv7hf]
[Debug] Found project types:
[Debug] greengrass: External image
[Debug] Probing remote daemon for cache images
[Debug] Using 7 on-device images for cache…
[Debug] Starting builds…
Some services failed to build:
greengrass: read ECONNRESET

Thank you

Also, I don’t have strong docker-foo, so apologies in advance if it’s something simple.


Hey no problem! I think the issue is how you are supplying the credentials for your private registry. Please take a look at the following section on our docs:

You’ll notice you need to provide the credentials on a registry-secrets.yml file. Hope this is helpful

Also, not sure if this could be of use to you, but we have a WIP sample integration with greengrass:

Oh very nice. Yeah I’m just using a base image right now, so anything that gets me a little further.
I tried moving my data to a secrets.yml file, but get the same result. That being said, my password is actually the contents of a private key so I may need to expand on a simple secrets file.

I’ll take a look into the repo though.


Thanks :slight_smile:

That got me up and running!

Great. Let us know if there’s anything else we can do to help.

@tmigone Just wanted to let you know that everything is running fine now. I did have an issue which I posted a ticket about on the github repo, but also solved that.
I am able to deploy run the basic “Hello, World” lambda function from GG to the Fin.
In the Default Lambda function containerization settings for the group -> settings, I set containerization to “No Container” as opposed to “Greengrass Container”.

Thanks for giving us feedback and feel free to contact us with any further problems