In a chalice route, I'm using boto3 to execute queries against my RDS Aurora Serverless DB cluster. This works as expected locally ($ chalice local
) but when deployed on Lamdba I receive the error: An error occurred (BadRequestException) when calling the ExecuteStatement operation: Failed to fetch secret arn:aws:secretsmanager:us-west-2...
I've updated a variety of policies between the VPC following the instructions here https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html?icmpid=docs_lambda_help.
boto3.client('rds-data').execute_statement( resourceArn = cluster_arn, secretArn = secret_arn, database = 'XXX', sql = sql, # sql string )