I used boto3==1.4.1 and botocore==1.4.64 and got the same error as yours, both locally and on lambda.
AWS Lambda should use the old botocor library. I tried using boto3==1.4.4 and botocore==1.5.75 and it worked.
So I decided to download my own zip code containing the latest boto3 and botocore (mentioned above) and it works.
Create Deployment Package
UPDATE
Here is my aws lambda code snippet -
import botocore import boto3 def lambda_handler(event, context): print("Version is {}".format(botocore.__version__)) boto3.client('rds').stop_db_instance(DBInstanceIdentifier='myInstanceID')
output : Version 1.5.52
and 1.5.52 is responsible for the absence of the stop_db_instance attribute in the rds module. So manually creating a zip with the latest version will do the trick.
thanks
source share