This can be accomplished using Lambda up to a maximum of 7 days. 10 days is beyond the maximum valid expiration period for any pre-signed url scenario using Sig V4. To have a pre-signed URL be valid for the entire 7 days you need to use valid credentials for an IAM User to generate the URL. To do this in Lamdba you'd need to give the Lambda access to long-lived IAM User credentials and and use them to generate the pre-signed URL w/ Sig v4.
You could do this with encrypted ENV Variables or Secrets Manager for example. Then configure your lambda to use these credentials, and not a the Lambda's execution role credentials when generating the pre-signed urls.
This is related to a topic located here: https://repost.aws/questions/QUN4e24VL5QM6ygP99mEydUA/generate-presigned-url-for-s-3-object-lambda.
To see an updated guide for how to build presigned URLs and set the expiration date, this guide is pretty helpful: https://howtocloud.io/generate-s3-presigned-urls-with-boto3/.
Generate S3 Presigned URL with 7 Day Expiry via LambdaAccepted Answerasked 2 years ago
showing search results with download links with presigned urlsasked 3 months ago
S3 pre signed url with block public access on a bucketAccepted Answerasked 2 years ago
Can we generate a custom URL to access the s3 bucket object lifetime?asked 2 months ago
How To Invalidate A S3 Pre-Signed URLAccepted Answerasked 4 years ago
S3 presigned url access DeniedAccepted Answerasked 8 months ago
Recent created bucket doesn't support sigv4 presigned urlasked 2 months ago
Generate presigned url for S3 Object LambdaAccepted Answerasked 2 years ago
S3 Presigned Get Object Request with encryptionasked 4 months ago
How to enable presigned S3 URL for different users?asked 7 months ago