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

demandé il y a 5 ans255 vues
3 réponses
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.

répondu il y a 5 ans
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.

répondu il y a 5 ans
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

répondu il y a 5 ans

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions