boto3 1.9.212 not able to create channel ChannelClass not setting up

0

Hi,
I am trying to setup the channel through python in boto3 documentation they have given the option of selecting channelclass while creating the channel but getting this error.
Unknown parameter in input: "ChannelClass", must be one of: Destinations, EncoderSettings, InputAttachments, InputSpecification, LogLevel, Name, RequestId, Reserved, RoleArn: ParamValidationError
Traceback (most recent call last):
File "/var/task/streamingConfig.py", line 13, in handler
responseData=create_channel(config)

But according documentaion as of 1.9.212 we can pass the channelclass also

已提问 5 年前243 查看次数
3 回答
0

himanshubhatt

The error indicates that the version of boto3 you are trying to use does not support this new field.

I see that you added a tag "lambda" to your post. Are you seeing this issue in a lambda deployment or when you run the script local?

If in a lamdba then the issue is that lambda doesn't use the latest version of boto3. You therefore have to bundle this with your deployment. To verify which version of boto3 and botocore is running in your lambda instance you can run the following in a python script:
print("boto3 version:"+boto3.version)
print("botocore version:"+botocore.version)

See https://www.mandsconsulting.com/lambda-functions-with-newer-version-of-boto3-than-available-by-default/ as an example of a similar experience as you reported and how this was resolved.

If local, then run "pip list" in the environment in which you execute your script and see what version of boto3 it reports.

已回答 5 年前
0

I am running it on lambda locally on sam cli.
The version in the pip list of boto and botocore is 1.9.212 & 1.12.212 but when I print it that shows up the version 1.7.74 & 1.10.74.

已回答 5 年前
0

himanshubhatt

As described in the link I had previously provided, you will have to bundle the updated boto3 version (and updated botocore) with your deployment.

See also https://docs.aws.amazon.com/lambda/latest/dg/lambda-python-how-to-create-deployment-package.html

已回答 5 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则