The Fly6 is a rear mounted bicycle safety camera and light. It comes with a bunch of versatile saddle post mounting options, but if there isn't room on this part of the bike then you are out of luck.
I made this part so you can mount the rear rack of a bike with a couple of M5 screws.
It took a few revisions to get it sturdy enough to hold the light. I've printed it in PETT (t-glase) and ABS without any issues, it also makes a very satisfying 'click' when the light is inserted.
Because this is attached to a $130 piece of equipment (with video of where you live and work on it) I'd recommend using the highest fill settings you have.
I used M5 countersunk hex screws and nuts to mount it.
It's possible that the clearance between the screws wont work on whatever rack you are using. If you've got SolidWorks, just change the variable for the distance between the screws and rebuild. If it's got some funny configuration, like vertically aligned holes or whatever, then the part will need to be modified further.