You can edit the policy attached to your EC2 instance and give it access to your S3 bucket. You just need to add these rules into your policy:
{
"Action": [
"s3:DeleteObject",
"s3:GetObject",
"s3:PutObject"
],
"Resource": [
"arn:aws:s3:::<YOUR_S3_BUCKET_NAME>/*"
],
"Effect": "Allow"
},
{
"Action": [
"s3:ListBucket",
"s3:GetBucketLocation"
],
"Resource": [
"arn:aws:s3:::<YOUR_S3_BUCKET_NAME>"
],
"Effect": "Allow"
},
{
"Action": [
"s3:ListAllMyBuckets"
],
"Resource": "arn:aws:s3:::",
"Effect": "Allow"
}
Replace <YOUR_S3_BUCKET_NAME>
with your bucket name.
After editing the policy, delete the variables in your .env OPENVIDU_PRO_AWS_ACCESS_KEY
and OPENVIDU_PRO_AWS_SECRET_KEY
and restart OpenVidu. It will not be necessary with the policy.