我将改用新的 Node AWS SDK (v3),以利用其模块化和 Typescript 支持。我需要做的第一件事是编写 Lambda 函数,但我找不到支持处理函数签名的类型。中的类型@aws/client-lambda似乎都与管理Lambda 的客户端相关。
Node SDK 是否有用于在某处编写Lambda 的官方类型?尤其:
context?event论证,是否有可能来自其他 AWS 服务及其相应类型的事件列表?interface Event {
// This could be anything -- a custom structure or something
// created by another AWS service, so it makes sense that
// there isn't a discoverable type for this. There should be
// corresponding types for each service that can send events
// to Lambda functions though. Where …Run Code Online (Sandbox Code Playgroud) 我的网站需要能够以不同语言提供数据.我设置它所以它使用utf-8并且db设置也被设置为.我一直在管理员身上得到不同的unicode错误.
例如:
如果我为模型设置unicode方法返回例如:
return u'%s' % unicode(self.tag)
Run Code Online (Sandbox Code Playgroud)
这似乎解决了#1和#2,但那时我得到了#3.
我一直在寻找一个解决方案,但找不到能解决所有不同错误的东西.处理这些问题的最佳方法是什么?