I am seeing the below error when I try to pass WorkGroup info in the format listed below using my boto3 code in AWS Lambda -
"errorMessage": "Parameter validation failed:\nUnknown parameter in input: \"WorkGroup\", must be one of: QueryString, ClientRequestToken, QueryExecutionContext, ResultConfiguration",
query_id = client.start_query_execution(
QueryString=query_string,
QueryExecutionContext={
'Database': 'sample_db'
},
ResultConfiguration={
'OutputLocation': 's3://sample_db/output/'
},
WorkGroup='workgroup1'
)['QueryExecutionId']
As per boto3 documentation , this is something that can be passed - https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/athena.html#Athena.Client.start_query_execution
Follow-up answer from the discussion below the question:
The bundled version of boto3 in the Lambda execution environment is not up to date with the latest boto3 release.
You can make a newer version available either by includin it in the deployment package or adding it as a Lambda Layer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With