【发布时间】:2019-08-17 17:00:17
【问题描述】:
我正在使用 aws lambda。
我有一个.p8 文件,用于发送apns 通知。因为我不能使用相对或绝对路径,因为它是一个服务器少。我必须从 s3 url 读取它。为此我做了这个
let file = ''
https.get("https://my_file_path.p8", response => {
console.log(response)
})
this.options = {
production: this.production,
token: {
key: file,
keyId: this.keyId,
teamId: this.teamId
}
}
现在我如何附加 S3 上的文件缓冲区?
谢谢!!!
【问题讨论】:
-
你想从s3读取文件吗
-
@RaguSwaminathan 是的
-
你试过fs包了吗
-
@RaguSwaminathan 是的,但它的服务器更少。我遇到了错误
-
检查我的答案。让我知道它是否对您有帮助
标签: node.js file aws-lambda serverless-framework serverless