amazon web services - Shorten S3 signed url -
i'm creating signed urls , sending them external system later use. unfortunately there length parameters not allow extremely long strings passed along. recently, appears signed urls reformatted , extended subsequently broke app.
is there method generating shorter url s3? prefer not rely on third party url shortening service number of reasons (it's request @ url generation , adds point-of-failure).
you can build very simple url shortener directly within amazon s3:
- turn on static website hosting. give url access bucket, eg:
mybucket.s3-website-ap-southeast-2.amazonaws.com
- create zero-length object in s3 'short name', eg
pic1.jpg
- add metadata zero-length object:
- key:
website redirect location
- value: long url
- key:
then, when access zero-length object (eg mybucket.s3-website-ap-southeast-2.amazonaws.com/pic.jpg
) redirect long url stored in metadata.
simple, no database required!
Comments
Post a Comment