We are trying to create a system that reads and performs some computation on data coming in via serial port (from a CAN network) and send the results to the cloud. I have been looking into AWS Greengrass and am wondering if it would be possible to create a device that does the processing/sending results to the Core, AND a Core that forwards the results to the cloud on the same machine (e.g. a Raspberry Pi)?
AWS Greengrass is designed to do IoT processing at the edge, rather than (or in addition to) sending it to the cloud.
So, if you want to do some processing of your data at the edge, you can use any IoT Edge platform that fulfills your requirements. If Greengrass, Amazon documents where this runs. We have only tested it under Intel Linux.
Else, if you just want to forward the data to the cloud, then you just want a "gateway" functionality that packages the data that your device is generating into the format that your cloud platform wants. That is usually MUCH less effort than integrating with an edge platform.
I'm not super familiar with Greengrass, but I'm assuming it's similar in design to Azure IoT Edge. Where IoT Edge runs Docker to manage local "modules", it sounds like Greengrass takes Lambda functions which from my understanding could fulfill the same need. Have you looked a creating a Lambda function to read the data stream, format it and publish it? Looks like Lambda supports common languages like Python and Java.
I doubt Greengrass Core was designed to run side-by-side on a single device. I imagine it's theoretically possible, but I would look first at how it was designed to be used.
It looks like they also support something called "Connectors" so they may already have a CANBUS connector?