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년 전252회 조회
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년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠