I have a python script that generate pdf participation certificates based on data pulled from Google sheet and send them through Amazon SES to each individual email. I want to run that script in EC2 to benefit from the alway free Amazon SES quota. Is there an easy and quick way to trigger/execute this script remotely from Google sheet after updating the names and emails there?
Rather than 'triggering' the code on the instance (which is difficult because you want to keep your instance secure), I would recommend an alternative architecture:
receive_message(...,WaitTimeSeconds=20)
to reduce the number of callsThis way, your instance can remain secure without needing to open it to the Internet.
Some services that seem to offer the ability to send messages to SQS from Google Sheets:
Otherwise, you'd need to run a web server on the EC2 instance and have the Google Sheet 'call' the web server with your request.
Or, if you want to get fancy, you could convert your code into an AWS Lambda function and use API Gateway to 'call' the code. This way, you won't need an Amazon EC2 instance but it is more complex to configure.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.