python模块和cli将python lambda函数打包并上载到aws lambda。

python-mu的Python项目详细描述


python模块和cli将python lambda函数打包并上载到 aws lambda

安装

pip install python-mu

配置

您需要创建一个boto配置文件。这可以用 awscli

pip install awscli
aws configure

用法

usage: mu [-h] [--with-pyc] [--zip-file ZIP_FILE] [--profile PROFILE]
          [--zip-only]
          [config]

positional arguments:
  config               JSON file describing this lambda function. Default
                       lambda.json

optional arguments:
  -h, --help           show this help message and exit
  --with-pyc           Package pyc/pyo files
  --zip-file ZIP_FILE  Name to give ZIP file. Default lambda.zip
  --profile PROFILE    boto/awscli profile name. Default default
  --zip-only           Only create the ZIP file, do not upload

lambda.json

{
    "name": "helloworld",
    "description": "Hello, World!",
    "region": "us-east-1",
    "role": "arn:aws:iam::000000000000:role/lambda_basic_execution",
    "handler": "helloworld.lambda_handler",
    "memory_size": 128,
    "timeout": 3,
    "py_modules": [
        "helloworld"
    ],
    "packages": {
        "exclude": [
            "tests",
            "tests.*"
        ]
    },
    "deps": [
        "requests",
        "-rrequirements.txt"
    ],
    "publish": true
}

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java_主路径未指向正确路径   EclipseNullPointerException来自java。lang.j9vm   Java中的图像颜色算法   java测试驱动开发问题   使用Java API将任何文件类型转换为pdf   java检查特定jframe是否从另一个框架打开   java将对象分配给接口变量而不实现接口   java JTable、JLabel及其图标(JLabel不能用图标定制)?   Java netbeans如何显示保存在E分区目录中的映像   java中来自数据库的Json对象   变量Java Passbyreference不工作?   macos“将我的Java应用程序带到MacOSX”:菜单   java JavaFX/Bundling/MacOS商店   java内部类“实例无法访问外部类”数据成员