What is the right design for UI apps backed by Cloud services like AWS

I am looking for some general architectural guidance about designing good cloud apps, primarily using AWS. For the sake of argument, lets say it’s a single page app, written in JS, hitting a couple of services like S3 and maybe some Lambda functions that read/write to a DynamoDB.

Option 1 – Make calls directly using AWS SDK So, this seems to be how the documentation is written. Your app would auth the user using Cognito, exchange for the tokens, then connect to the services directly.

Benefits here: Code is in the UI, so less moving parts. Cognito seems geared towards this type of dev…otherwise your server parts would have to cache the tokens or you’d somehow have to pass them around from the client. It also seems like less cost since you wouldn’t be paying for an “intermediary” service to bounce calls off of.

Cons: Well, your code is all in the UI, making your UI bloated. It feels like too much business logic would be in the client, which feels wrong.

Option 2 – Intermediary services Basically you would write some service, be it a Lambda function or an EC2 microservice or the like, to “bounce” the calls off of.

Benefits here: Well, you would have some additional level of control. Also, these intermediaries could house most, if not all, of the business logic.

Cons: Well, the biggest one is cost as you would now have to host a bunch of extra “things” to service your calls. Also, for the most part, it would seem like most of your intermediary services would be pass-through, so where is the benefit?

What actually gets backed up, how many times?

Say I have a photo A taken by the phone camera. It is stored somewhere, but can be seen in the stock Gallery app as well as the Google Photos app. Q1:Are both apps using the same physical copy or are there two copies?

Then, say, my WhatsApp has a photo B I received in a conversation. It is I presumed stored in /WhatsApp/Media/whatsApp Images. It can also be seen in the Gallery and Photos apps.

My WhatsApp has backup set to Back up to Google Drive Daily using Google Account X. Q2:Is this a special arrangement between Google and WhatsApp, because I cannot see anything regarding this in https://drive.google.com.

In the Photos app, Settings, Back up & Sync, the BACKUP ACCOUNT is Y, my other Google Account I have configured on the same phone. In the Back Up device folders details, WhatsApp Images is enabled. Q3:Does this mean that my WhatsApp photo B is backed up to my Google Drive in account Y as well as the special WhatsApp backup in Google Drive in account X?

Why were my files backed up again by Time Machine?

My 200 GB music library resides on a SD card that is permanently inserted into my MacBook Pro. The volume is encrypted using Filevault. Time Machine will include that volume when doing backups onto an external USB disk. This solutions worked very well for the past 1–2 years.

However, today Time Machine decided to backup the entire SD card again (I verified this using BackupLoupe) and it is a complete mystery to me why it did that. The md5 checksums of both versions are identical and also permissions seem identical between the two backed up versions and the original one. May main drive was backed up as usual (i.e. no full backup).

The only actual change I can think of, is an upgrade to the macOS 10.14.4 from 10.14.3.

Any ideas why these files have been backed up again and how I can investigate this?

How to create a cryptocurrency backed by an asset (say a fiat currency or physical commodity)

I want to create a cryptocurrency for use between myself and a collection of friends (as a proof of concept).

Assuming that I want to peg my cryptocurrency to (say) the Chinese Renminbi and the price of Wheat, what would be the steps in creating such a cryptocurrency?

How can I get bitcoin backed loan?

I have spent a couple of time on this website that says they give bitcoin loan but I don’t have the full understanding of the process. Can someone tell me more? The advertise says below;

Get cash now and save your crypto for the future!

There is no need to find a lender like in a P2P model. With automated KYC/AML checks, loan approvals take seconds and funds can be released almost instantaneously.

We accepts BTC, ETH, LTC, BCH, XRP, and other popular cryptocurrencies as collateral.

Bitcoin Backed Loan www.youholder.com

Restoring ownership in TWRP backed up data

So, my Nexus 7 (2012) is in a bootloop and I want to backup my data.
Recovery (TWRP 3.2.3) works without a problem but I don’t have a USB-OTG to do it and there’s not enough space on the internal storage (Nexus 7 doesn’t support SD cards) so I did an adb backup.
I couldn’t do a “regular” adb -all backup because it asks a confirmation from the tablet and I can’t give it from a recovery. What I could do was adb –twrp and it produced an .ab file. This .ab file is different from a standard .ab file since it can’t be extracted using tools from https://forum.xda-developers.com/showthread.php?t=2011811, but some nice guy had the same kind of problems and created a solution for it – https://github.com/arifogel/twrpabx.
I ended up with .win file that I renamed to .tar and extracted. So far so good.
The problem with the extracted files is that they didn’t preserve original ownership information.
Now if I want to manually repack apps and get them back (like games), things won’t work.
I’ve created a list in the recovery (ls -lR > data_details.list) which has all the permission and ownership information.
What I need now is a script that will go trough the list and change the files ownership.
Is it possible to do this with a bash script or something?
Thx in advance!