Hi. To start, this seems like way too many permissions that your Lambda function does not need. At all.I would encourage you to remove 90% of the permissions that are set here.
With that said, assuming your policy does not actually read
<my-bucket-name> in the resource, two things:
For bucket level actions, having
arn:aws:s3:::<bucket-name> is fine, but for objects, you need to indicate the path.
For example, for all objects in the bucket, you would have
Also note that if you are encrypting files in the bucket with a CMK (a KMS key that you created manually yourself, not the aws/s3 one), you need to provide the services (lambda, scripts etc.) also with access to that KMS key in order to manipulate the encryption of the files (encrypt or decrypt or both).
Hope this helps.
Accessing S3 bucket from LambdaAccepted Answerasked 3 months ago
Writing to S3 bucket from Lambda, same account, “InvalidARN" messageasked 2 years ago
Send a trigger to Lambda function when I upload to an S3 Bucket folderasked 2 months ago
Upload to S3 from Lambda doesn't create file in bucket, no errorasked 2 years ago
From S3 bucket to SFTP serverasked 4 months ago
Insufficient privileges for accessing data in S3 when running a lambda function to create a Personalize dataset import jobAccepted Answerasked 5 months ago
S3 bucket permissions to run CloudFormation from different accounts and create Lambda Funtions.asked a year ago
A lambda function to delete old archive files in s3 bucketasked 4 years ago
How to save a file to a tmp/temp folder in lambda?asked 7 months ago
How to merge 2 csv files from S3 bucket using Lambda.Accepted Answerasked 2 months ago