Trouble Accessing Local File in Terraform for AWS S3 Object Upload

Hello everyone,

I’m encountering an issue while trying to upload a Python file (trigger_controller_dag.py) to an S3 bucket using Terraform. I am consistently receiving an error that the file cannot be found, despite confirming that the file does exist at the specified path on my Windows machine.

Error Message:

Error: opening S3 object source (C:\Users\xxxxxx\Downloads\trigger_controller_dag.py): open C:\Users\xxxxxx\Downloads\trigger_controller_dag.py: no such file or directory

resource “aws_s3_object” “object” {
bucket = aws_s3_bucket.risk-cmdr-airflow-s3-bucket.id
key = “dags/trigger_controller_dag.py”
source = “C:\Users\xxxxxx\Downloads\trigger_controller_dag.py”
}