Ensure the EC2 instance role has the necessary Quick permissions, such as quicksight:CreateDataSource, and allows Quick to assume its service linked roles. Attach relevant IAM policies.
As a Quick administrator, go to Manage Quick → Security & permissions in the console, and verify or enable access to Athena (including query result locations in S3).
Please refer to the below Quick documentations and community post this might be helpful for you.