For AWS / lightsail
you can simply connect via ssh extension from vscode -
(just configure ssh config with pem file - should look like this)
Host bitnami-wordpress
HostName 111.1.1.1 (your external ec2 ip address)
User bitnami
IdentityFile /Users/USERNAME/your-ec2-pem-file.pem
Now just open up the /opt/bitnami/wordpress folder


Just drag and drop the apple-app-site-association file into this directory
Open .htaccess / add this at bottom.
<Files apple-app-site-association>
Header set Content-type "application/pkcs7-mime"
</Files>
TROUBLESHOOTING
if you get a permissions problem saving file - you can save it as a different name. eg. 2.htaccess
open a new terminal -

then remove old file (you'll likely need to change permissions to appropriate user. For lightsail - bitnami it's sudo chown -R bitnami:daemon .htaccess
rm .htaccess
mv 2.htaccess .htaccess
(WARNING ONLY FOR AWS) sudo chown -R bitnami:daemon .htaccess
sudo apachectl -k graceful