English 中文(简体)
在VSCode与英特尔利斯群岛合作开展工作
原标题:Working AWS lambda functions and layers with Intellisense in VSCode

我正在部署两把马拉姆布达斯,使用 c和沙里。

我的结构如下:

lambda_funcs/_layers/common_layer.py
lambda_funcs/creditor_checks/internal_checks/index.py
lambda_funcs/creditor_checks/external_checks/index.py

内部和外部检查都使用普通层——继器。 我在Mlambda的指数.py在当地从事VSCode工作时,需要用像这一类进口说明进口该层。

from _layers import common_layer as common_

然而,如果我向核武器国家部署这样的守则,就没有发现层层层,我需要作这一改正。

import common_layer as common_

在VSCode进行这项工作有没有办法,使我能够使用<条码>进口公用公用电器——光是,而不必使用实际途径?

问题回答

The best way I found so far for this is to add your Lambda layer paths as extra paths for Python extension analysis & autocomplete - creating a .vscode/settings.json something like the below in the root of your project:

{
  "python.analysis.extraPaths": [
    "path/to/your/lambda/layer/source"
  ],
  "python.autoComplete.extraPaths": [
    "path/to/your/lambda/layer/source"
  ]
}

With this, IntelliSense will be aware of your layer modules like common_layer.py... But will think they re available anywhere in your project - so try to avoid getting confused if you have very generic-sounding layer module names that seem like they might be relevant elsewhere too!





相关问题
VS Code run selection in terminal creating multiple shells

Running selection/line in terminal (shift + enter) started creating opening two shells. The first shell runs commands to activate the environment and start python. The second shell runs the python ...

从案卷中获取简单明朗戈功能——现在可以提供

如果你想到,在纽瓦特被点击之后,如何把服务器的辅助功能从javascript文档中打上下面的几页。 你们必须利用吉大港山区开发计划的要求,把服务器的侧端点称作终端点。 ......

在《科索沃法典》中是否有办法进行沙尘处理

目前,开始学习基因图像处理,我希望在民主选举学会之外使用这种图像,使之更容易编码,因为在处理民主选举学会时,没有很好地掌握合成物的错误。 I ......

Rust Visual Studio Code code completion not working

I m trying to learn Rust and installed the Rust extension for VSCode. But I m not seeing auto-completions for any syntax. I d like to call .trim() on String but I get no completion for it. I read that ...

热门标签