Run sam build -pc && sam local start-api Caveats Cannot connect to Docker on localhost aws/aws-sam-cli#4329 To Read How to connect to MongoDB with Golang https://www.mongodb.com/blog/post/quick-start-golang-mongodb-starting-and-setup How to handle JSON in Go https://go.dev/blog/json Interfaces in Go https://jordanorelli.com/post/32665860244/how-to-use-interfaces-in-go https://go.dev/doc/effective_go#interfaces DBRef Specs https://www.mongodb.com/docs/manual/reference/database-references/ https://github.com/mongodb/specifications/blob/master/source/dbref.rst