Relative Content

Tag Archive for amazon-web-servicesautomationterraform-provider-awsinfrastructure-as-coderemote-execution

Terraform remote-exec provisioner commands fail to start my Flask app through AWS, but work when run manually over SSH?

I’m setting up a Terraform script to deploy Flask applications on AWS instances behind a load balancer. I’ve configured everything correctly, including security groups, subnets, and instances. However, when I use Terraform’s remote-exec provisioner to install Python packages and start the Flask app, it doesn’t seem to work correctly—the load balancer gives 504 errors.