How can I use Tridion.ContentManager.ApplicationData within ECL

As part of my usecase I am looking for a mapping where I can save my Key with GUID in a Dictionary in an ECL Provider.

using (IEclSession eclSession = SessionFactory.CreateEclSession(engine.GetSession()))
{
} 

Since ECL is an external application, in above code SessionFactory.CreateEclSession(engine.GetSession()) does not seem to work. refer this

I have tried below code, But does not seem to work, see comments in code inline.

// Creating GUID;
Guid guid = Guid.NewGuid();     

//I know this won't work, How can we get a sesion?
Session session = new Session();  

// Throws error as it aspects some configuration
var TcmId = "tcm:0-" + eclUri.PublicationId + "-1";   //tcm:0-2-1
var pubTcmId = new TcmUri(TcmId);

Publication pub = new Publication(session);             
IdentifiableObject pubItem = pub.GetObject(pubTcmId);

Dictionary<string, string> s3IdSet = new Dictionary<string, string>();
s3IdSet.Add(directory.FullName, guid.ToString());

ApplicationData appData = new ApplicationData(s3IdSet.ToString());
identification = appData.ApplicationId;
pubItem.SaveApplicationData(appData);

Any help would be much appreciated?