amazon-web-services - Aws Lambda 写入 Firebase 存储
问题描述
我想使用AWS Lambda将下载的文件写入 Firebase存储。我已经写了一个用于消防的动态链接
有人可以提示我该怎么做吗?我已经为 s3 做好了准备,我现在想将它存储在 Firestorage 中。
- 只有index.html存储在火存储名称google-list/index.html
def lambda_handler(event, context):
url='https://www.google.com/index.html' # put your url here
bucket = 'google-list' #your s3 bucket
key = 'index.html' #your path
#write to s3 want to replace with firestorage.
#s3=boto3.client('s3')
#http=urllib3.PoolManager()
#s3.upload_fileobj(http.request('GET', url,preload_content=False), bucket, key, ExtraArgs={'ACL':'public-read'})```
解决方案
推荐阅读
- reactjs - ModuleParseError:模块解析失败:nextjs 中出现意外字符“�”(1:0)
- regex - 将 pandas 地址拆分为街道和门牌号
- python - 如何将一个模型的字段值分配给另一个模型的字段?
- xml - 在 Nest.js 中获取 Post 请求正文中的 XML
- javascript - jQuery 表单提交按钮根据选中的复选框转到 URL
- javascript - react-spring:使用 useChain 进行缩放和翻译
- vue.js - Vue2 - 路由级别的延迟加载不起作用?
- r - 如何仅针对每个文件中的某些值组合多个 .RDS 文件?
- c++ - 在 C++ 中运行项目时出现未定义的引用错误
- visual-studio - 您好,我有一个使用 specflow 用 c# 编写的自动化框架