ODK Collect - submitting encrypted submissions fails

Hello,

I am running an ODK Aggregate server using AWS. I installed the server using the instructions here with no modifications. I am using ODK Collect v1.21.1.

I am able to collect, upload, and download data using unencrypted forms without issue, including forms with media (such as a picture).

However, submitting encrypted form data fails. The submission.xml.enc document does not upload, so the submission is incomplete. However, if I manually upload the data under Form Management -> Submission Admin -> Manually Upload Submission Data, then everything works perfectly fine and submission.xml.enc is attached. I manually updated the data from the same Android device on the same internet connection.

I also tried manually creating the API request and that also worked.

Here is the xml form definition with the actual url omitted:

<?xml version="1.0"?><h:html xmlns="http://www.w3.org/2002/xforms" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:jr="http://openrosa.org/javarosa" xmlns:odk="http://www.opendatakit.org/xforms" xmlns:orx="http://openrosa.org/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><h:head><!-- ODK Aggregate upload time: 2019-04-18T09:29:29.523Z on https://odk.my.url --><h:title>EncryptedFormTest</h:title>
<model>
<submission action="https://odk.my.url/submission" base64RsaPublicKey="MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAslXwxqnREGSAZ0vi6xsiDW2zmvDbhAlu/TkFqr61VfLQPacC7hAMrZQpVMfJyaP1PEKuePIZZVnmf6958QedsgLe0yZyHKMOchWRCuZwXUsQ1JFuiZzW6Pbq/L9I8iD9vu7+MTHdukoak8V7iqCZFdf2fn9rWYTS4HW+Zwqetlymw/vzCqEfcUVsioY2dSf8mdPPPBk6PXn417yO1I350zD32w8lWOVqALzCRSJe4FUPcBnLQTE6pbVhQVNDfGxhW1ahj4ncZusLJ9jMr/TM558ZBz6YQe7K1GUSjJ1rzSRH/NA0WxyTIM7EOC9/N2kIUgAWCqJw4vLPFcEW+kUsCQIDAQAB" method="form-data-post"/><instance><encrypted_form_v3 id="encryptedform3" version="1904181228">
<starttime/><endtime/><deviceid/><subscriberid/><simid/><devicephonenum/><id/><meta><instanceID/><instanceName/></meta></encrypted_form_v3></instance>
<bind jr:preload="timestamp" jr:preloadParams="start" nodeset="/encrypted_form_v3/starttime" type="dateTime"/><bind jr:preload="timestamp" jr:preloadParams="end" nodeset="/encrypted_form_v3/endtime" type="dateTime"/><bind jr:preload="property" jr:preloadParams="deviceid" nodeset="/encrypted_form_v3/deviceid" type="string"/><bind jr:preload="property" jr:preloadParams="subscriberid" nodeset="/encrypted_form_v3/subscriberid" type="string"/><bind jr:preload="property" jr:preloadParams="simserial" nodeset="/encrypted_form_v3/simid" type="string"/><bind jr:preload="property" jr:preloadParams="phonenumber" nodeset="/encrypted_form_v3/devicephonenum" type="string"/><bind nodeset="/encrypted_form_v3/id" type="string"/><bind calculate="concat('uuid:', uuid())" nodeset="/encrypted_form_v3/meta/instanceID" readonly="true()" type="string"/><bind calculate="concat('EncryptedForm3',format-date-time(today(),'%Y-%m-%d'),'_', /encrypted_form_v3/id )" nodeset="/encrypted_form_v3/meta/instanceName" type="string"/>
</model>
</h:head>
<h:body>
<input ref="/encrypted_form_v3/id"><label>Enter your ID</label></input>
</h:body></h:html>

Does anyone know what is creating this issue or have any idea of how to fix it?

Thank you,
Grady