Journal 131 — Unity App Development, AWS Setup Part 3

Chris Nielsen
3 min readDec 9, 2021

Objective: To set up additional functionality and communication with Amazon S3

In the last article, I was able to get communication working to Amazon S3 bucket for a demo app to store user data files. In this article, I will go over the Amazon S3 upload process.

Amazon S3 Upload

After creating the project bucket, I want to update the AWS Manager and UI Manager to prepare the user data files and upload them.

Recall in the UI Manager, when the user hits the Submit button, we create a data file of all the current info. We will take that data file and call a new function in the AWS Manager to handle the upload process.

As you see from above, we need to update a few items in the AWS Manager. One is to turn the AWS Manager into a singleton.

The actual upload function is relatively simple, and based on the following in the API.

This has worked previously as you can see in this list. I will delete all files and create a new file now. I will just create the data file on my PC, so the location and photo services are not going to work.

No errors show, so I will check Amazon S3 bucket now.

Success!

To finish up in the app, after successfully logging the user data and submitting, we can restart the app to go back to the Main Menu.

Update to data file prep

While preparing this info, I came across some data security concerns with the BinaryFormatter process used above.

As a result, I used one of the other methods described in the Microsoft article.

Now I will do a build and try on a couple phones. First, I will try a Samsung Galaxy S9.

Next, I will try this app on a Google Pixel 6 Pro.

Unfortunately, the app did not successfully complete the data file save and upload to Amazon S3 process. As an additional check, I confirmed the app also works on a Samsung Galaxy S21+ 5G, so there must be some issue with the build on the Pixel 6 Pro.

I have reached out to Google to ask them some questions, and I will keep troubleshooting and hope to figure out how to get this app working on a Pixel 6 Pro.

Thank you for your time!

--

--

Chris Nielsen

An Engineering Manager consultant who is seeking additional skills using Unity 3D for game and application development.