<?xml version="1.0" encoding="UTF-8" ?><!-- generator=Zoho Sites --><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><atom:link href="https://www.prescient.consulting/blogs/tag/aws/feed" rel="self" type="application/rss+xml"/><title>Prescient Analytics - Blog #AWS</title><description>Prescient Analytics - Blog #AWS</description><link>https://www.prescient.consulting/blogs/tag/aws</link><lastBuildDate>Fri, 12 Sep 2025 06:42:37 -0700</lastBuildDate><generator>http://zoho.com/sites/</generator><item><title><![CDATA[The type initializer for 'Amazon.Runtime.Internal.Settings.PersistenceManager' threw an exception]]></title><link>https://www.prescient.consulting/blogs/post/aws-type-initializer-exception</link><description><![CDATA[How to fix The type initializer for 'Amazon.Runtime.Internal.Settings.PersistenceManager' threw an exception]]></description><content:encoded><![CDATA[<div class="zpcontent-container blogpost-container "><div data-element-id="elm_85OUWBxYTv6-moHrQPSQDA" data-element-type="section" class="zpsection "><style type="text/css"></style><div class="zpcontainer-fluid zpcontainer"><div data-element-id="elm_e1zAgyHFT_ypNwrAe9YRYA" data-element-type="row" class="zprow zprow-container zpalign-items- zpjustify-content- " data-equal-column=""><style type="text/css"></style><div data-element-id="elm_c2ZKmhKEQ8SSrO2IRI6jZg" data-element-type="column" class="zpelem-col zpcol-12 zpcol-md-12 zpcol-sm-12 zpalign-self- "><style type="text/css"></style><div data-element-id="elm_M9NxART0QWuje111M8rIwQ" data-element-type="text" class="zpelement zpelem-text "><style> [data-element-id="elm_M9NxART0QWuje111M8rIwQ"].zpelem-text { border-radius:1px; } </style><div class="zptext zptext-align-center " data-editor="true"><p style="text-align:left;">I was faced with this lovely error message from a process that had been running successfully for some time.</p><p style="text-align:left;"><br></p><p style="text-align:left;">It was a Powershell script running in an Azure Function App, and my initial internet research did not reveal many clues as to why this would be case.</p><p style="text-align:left;"><br></p><p style="text-align:left;">On a hunch, I thought to update the AWS Powershell modules it was using - though they were not particularly old, I figured it couldn't hurt. So I did exactly that and voila, I tested the process and we were back in business.... for a few days least.</p><p style="text-align:left;"><br></p><p style="text-align:left;">The exception was back.</p><p style="text-align:left;"><br></p><p style="text-align:left;">I stumbled on a clue whilst reading a stack overflow response pointing at the parameters of an AWS function the OP was having trouble with. Following this, I double checked the parameters of the function that was failing (<span style="color:inherit;">Get-S3Object) and found I hadn't set the Region parameter. I added the parameter, tested it and no exception! This looks to have been the root cause, though why it worked up to that point is a bit of a mystery to me. A</span><span style="color:inherit;text-align:center;">s an aside, I have not had this issue ever in my local environment (in Powershell ISE).</span></p><p style="text-align:left;"><span style="color:inherit;"><br></span></p><p style="text-align:left;"><span style="color:inherit;">Perhaps it should be made a required parameter given the potential exception it may raise though.</span></p><p style="text-align:left;"><span style="color:inherit;"><br></span></p><p style="text-align:left;">I hope this helps someone, because it was pretty obscure...to me at least!</p></div>
</div></div></div></div></div></div> ]]></content:encoded><pubDate>Thu, 01 Aug 2019 22:31:02 +0930</pubDate></item></channel></rss>