Ошибка «AttributeError: модуль« boto3 »не имеет атрибута« client »» при попытке создать лямбда-функцию с использованием boto3 python 3.7 в VSCode - PullRequest
0 голосов
/ 26 января 2020

Вот код функции, который я использую для локального создания лямбда-функции, используя boto3 SDK в VSCode. Я уже установил и настроил boto3 SDK в VSCode

import boto3
import json

client = boto3.client('lambda')

response = client.create_function(
Code={
},
Description='Test LambdaFunction using boto3 SDK',
FunctionName='TestLambda',
# is of the form of the name of your source file and then name of your function handler
Handler='lambda_function.lambda_handler',
MemorySize=128,
Publish=True,
# replace with the actual arn of the execution role you created
Role='arn:aws:iam::xxxxxxxxxx:role/TestRole',
Runtime='python3.7',
Timeout=15,
VpcConfig={
    'SubnetIds': [
        'subnet-xxxxxx',
        'subnet-xxxxxx'
    ],
    'SecurityGroupIds': [
        'sg-xxxxx66',
    ],
    'VpcId': 'vpc-xxxxx'
  },
)

print (response)


Может кто-нибудь помочь мне в том, что я делаю, чтобы создать лямбда-функцию с использованием boto3 SDK

...