schickling / chromeless

🖥 Chrome automation made simple. Runs locally or headless on AWS Lambda.
https://chromeless.netlify.com
MIT License
13.24k stars 575 forks source link

Lookup IOT Endpoint as part of deploy #446

Open waynerobinson opened 6 years ago

waynerobinson commented 6 years ago

Thanks for the great library! :)

Not sure where best to put this, but I recently created a simple CloudFormation stack that has a single output, the IOT Endpoint that makes it easy to use in other stacks throughout your AWS account.

https://github.com/waynerobinson/aws-iot-endpoint-stack

This allows me to replace the awsIotHost definition with awsIotHost: ${cf:iot-endpoint.IotEndpointAddress} and as long as the stack is deployed in the account I'm using Chromeless in, it can refer to the correct IOT endpoint.

Happy to create a PR here, but not quite sure where you'd like this added. It's possible to just add this function to the serverless.yml file and have it called directly as part of the deploy, rather than relying on a pre-existing stack.