Getting error in S3 query (Practice Lab 3 in Week2

An error occurred (MethodNotAllowed) when calling the SelectObjectContent operation: The specified method is not allowed against this resource.

Getting the above error when running the below command:

file_s3_key = ‘csv/ratings_ml_training_dataset.csv’
kwargs = {‘ExpressionType’: ‘SQL’,
‘Expression’: “”“SELECT * FROM s3object AS s WHERE s."productline" = ‘Trains’ LIMIT 20"”",
‘InputSerialization’: {‘CSV’: {“FileHeaderInfo”: “Use”}, ‘CompressionType’: ‘NONE’},
‘OutputSerialization’: {‘CSV’: {}},
}

response = s3_select_object_content(bucket_name=BUCKET_NAME, object_key=file_s3_key, **kwargs)

1 Like

Hello @gazaidi
Are you sure this is about the 1st course, introduction to data engineering? 'Cause there is no lab 3 in week 2 of this course.

@Amir_Zare no it is in course 2, did i tag it wrongly ?

@gazaidi you are right; there is an issue with this part of this lab. The team has been informed and are working on it. For the time being, please, just skip this cell and the one after that. You should be able to go through the rest of the lab without any issue.

1 Like