Question: I am working on a drupal website that has a theme installed to it.

I would like to set the Front/Home page of the website to a .html.twig template I have in a custom module I am busy working on.

How would I go about doing this? I have done some googling and it likes like the answer lies somewhere with page--front.html.twig, but I am not sure where to go from here.

Inside my themeFolder/templates there are page--front.html.twig & page.html.twig

I have tried creating my own page--front.html.twig and storing it inside myModule/templates but this did not help me.

Also, how would I go about applying .html.twig templates to different regions of my website?

Any advice would be greatly appreciated

Answer: 
March 2022 Update: Here are the docs on how to handle the file-exists-behavior: [AppSpec 'files' Section](https://docs.aws.amazon.com/codedeploy/latest/userguide/reference-appspec-file-structure-files.html).

July 2021 Update: Looks like AWS has finally acknowledged this defect -- look [here for updates](https://github.com/aws/aws-codedeploy-agent/issues/14) on all that.

August 2020 answer:
The only way I have seen that you can overwrite files is selecting to overwrite or retain, [as seen here](https://docs.aws.amazon.com/codedeploy/latest/userguide/deployments-rollback-and-redeploy.html), when you're **creating a new deployment**. In no other place will you see those settings. And if I'm not mistaken, this is the only way to do it because it is not supported on the CLI.
An issue to add an overwrite option is open on [GitHub](https://github.com/aws/aws-codedeploy-agent/issues/14) and it has been there for quite a while. I solved this by adding a custom script in the BeforeInstallation hook which will erase all existing files before copying over my new deployment. 

This is how my appspec.yml file looks like

```
version: 0.0
os: linux
files:
  - source: /
    destination: /path/to/destination
hooks:
  BeforeInstall:
    - location: DeploymentScripts/CleanupScript.sh
  AfterInstall:
    - location: DeploymentScripts/InstallScript.sh
      timeout: 600
  ApplicationStart:
    - location: DeploymentScripts/RestartScript.sh
      timeout: 3600

```