title: How to configure EnyimMemcachedCore to access Elasticache in AWS Lambda?
body: <p>I am trying to port a simple memcached client from .NET 4 to .Net Core on AWS Lambda.  I am struggling to configure the new EnyimMemcachedCore client because the examples (<a href="https://github.com/cnblogs/EnyimMemcachedCore" rel="nofollow noreferrer">https://github.com/cnblogs/EnyimMemcachedCore</a>) use appsettings.json to setup the config, but Lambda functions using .net core do not use appsettings.json.  I need to be able to setup the server/port/endpoint in the C# code.</p>
  
  <p>Can anyone give me an example using EnyimMemcachedCore that creates the configuration manually?</p>
  
  <p>The standard .net use of Enyim was trivial to fetch by key and return a value:</p>
  
  <pre><code>using Enyim.Caching;
  using Enyim.Caching.Configuration;
  using Enyim.Caching.Memcached;
  
  ...
  // setup Enyim memcached client
  MemcachedClient myCache;
  MemcachedClientConfiguration config;
  config = new MemcachedClientConfiguration(); 
  config.AddServer("theIP", thePort);
  config.Protocol = MemcachedProtocol.Text;
  
  // instantiate client
  myCache = new MemcachedClient(config);
  
  // get the stored item
  var result = myCache.Get(key);
  </code></pre>
  
  <p>How do I do something similar (configure the memcached client in code, not in a config file) with EnyimMemcachedCore?</p>