I am trying to copy files from 2 different bucket which are in two different aws account using same access key.
So it provide an error saying 403 forbidden.So what i want to do is, I want to check whether the access key that i am using to copy the file has permission to those bucket before i copy the file using boto3. Is there are anyway to do this?
If you are copying objects between Amazon S3 buckets that belong to different AWS accounts, then you will need to use a single set of credentials that have:

GetObject permission on the source bucket
PutObject permission on the destination bucket

Also, the CopyObject command should be sent to the destination bucket to avoid problems with object ownership.
Therefore, I would recommend:

Use credentials from the destination account (dest-IAM-user)
Add a bucket policy to the source bucket that permits GetObject access by dest-IAM-user
How to check whether s3 access key has access to a specific bucket or not in aws using boto3