Folium Connection Failed on AWS

Hi,

I’m deploying the streamlit app on aws (ubuntu 18.04)
When I test on my local (mac BigSur), I can use folium without any issues. However, when I run the same code on aws, the app, the connection killed after st.write('test4'). Does anybody has the same issue?

m = folium.Map(location=[37.0902, -95.7129], zoom_start=3)

	def color(row):
	    if row['wotus'] == 1:
	        return 'blue'
	    else:
	        return 'red'

	full_df_v2['color'] = full_df_v2.apply (lambda row: color(row), axis=1)
	st.write('test3')
	for i, row in full_df_v2.dropna(how="any").iterrows():
		folium.CircleMarker([row['latitude'], row['longitude']], radius=.2, color=row['color']).add_to(m)
	st.write('test4')
	folium_static(m)

Solved the problem by changing the instance type from t2.micro to t2.small.