amazon-web-servicesamazon-s3mailtopre-signed-url

how to have short user defined aws s3 pre-signed url


We have need to share the aws s3 pre-signed url through email. However the generated url is very long and in our case the bucket file name are dynamic which can have long file names.

What are the option available to generate aws s3 pre-signed url with short name without exposing these parameters in the url X-Amz-Algorithm, X-Amz-SignedHeaders, X-Amz-Expires,X-Amz-Credential,X-Amz-Signature

how can i make this s3 url short when generating message for email and pass it to my mailto function.

Thanks Anjana.


Solution

  • You can't. All that information is required in the URL.

    However, you could use/create a URL Shortening Service (eg http://bit.ly), which will translate a short URL into the full URL.

    The simplest version of this would be:

    See: How to build a Serverless URL shortener using AWS Lambda and S3