我很难将我的 Lambda 与 AWS Memcache 连接起来。我正在使用下面的代码片段,我没有看到任何错误日志并且函数超时。你能建议我出了什么问题吗?
const MemcachePlus = require("memcache-plus");
const client = new MemcachePlus("test_memcached.cfg.use1.cache.amazonaws.com:11211");
exports.index = async (event) => {
try {
await client.set("firstName", "Victor", 10000);
console.log("Successfully set the key firstName");
const firstName = await client.get("firstName");
console.log(`Successfully got the key firstName: ${firstName}`);
} catch (e) {
console.log("error", e);
}
}