I am importing a react component from static resource in lightning container, that component itself communicates with AWS. When I load this component in lightning:container, I am getting below errors:

Code of my aura app:
<aura:application access="GLOBAL">
<lightning:container aura:id="jsApp" src="{!$Resource.abc + '/index.html'}" onmessage="{!c.handleMessage}"
onerror="{!c.handleError}"/>
</aura:application>
The endpoint to which it communicates is already added in CSP list with connect src as true and also in Trusted sites under session settings.