S3 Blob storage Hashing

Avatar

Avatar
Boost 1
Level 1
erics34811206
Level 1

Likes

2 likes

Total Posts

5 posts

Correct reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 1
erics34811206
Level 1

Likes

2 likes

Total Posts

5 posts

Correct reply

0 solutions
Top badges earned
Boost 1
View profile
erics34811206
Level 1

28-06-2019

I am trying to figure out how to map a  S3 bucket file to an asset.

If I have a file on my PC which I know exists in AEM with S3 Segmented Storage how can i find the file directly in S3?

I tried this without any success:

$ shasum -a256 ~/Downloads/asdf.jpg

08550272769f2ded3cd8f3da8d98cad0a5eb8316fa5662b763dca8c71ca055f8  ~/Downloads/asdf.jpg

$ aws s3 ls s3://bucketname/08550272769f2ded3cd8f3da8d98cad0a5eb8316fa5662b763dca8c71ca055f8

In case its different I am trying to do this in both AEM 6.2 and 6.5.

Thanks in advance

Replies

Avatar

Avatar
Establish
Community Manager
kautuk_sahni
Community Manager

Likes

1,200 likes

Total Posts

6,394 posts

Correct reply

1,147 solutions
Top badges earned
Establish
Coach
Originator
Contributor 2
Contributor
View profile

Avatar
Establish
Community Manager
kautuk_sahni
Community Manager

Likes

1,200 likes

Total Posts

6,394 posts

Correct reply

1,147 solutions
Top badges earned
Establish
Coach
Originator
Contributor 2
Contributor
View profile
kautuk_sahni
Community Manager

16-07-2019

gauravb10066713 any help?

Avatar

Avatar
Boost 1
Level 1
erics34811206
Level 1

Likes

2 likes

Total Posts

5 posts

Correct reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 1
erics34811206
Level 1

Likes

2 likes

Total Posts

5 posts

Correct reply

0 solutions
Top badges earned
Boost 1
View profile
erics34811206
Level 1

16-07-2019

I ended up raising a Daycare ticket along with doing some studying and have a better understanding.

I have found that there is a prop on the asset dam:sha1 which contains a hash which in 6.5 i confirmed i can determine via running this on an asset $ shasum -a256 ~/Downloads/asdf.jpg.   I never figured out the algorithm for 6.2 but if i look in the jcr after uploading I can now map this to a file and the bucket the same way.

If you have an asset with eg hash 08550272769f2ded3cd8f3da8d98cad0a5eb8316fa5662b763dca8c71ca055f8 then you can find this on the filesystem in

repository/datastore/08/55/02/08550272769f2ded3cd8f3da8d98cad0a5eb8316fa5662b763dca8c71ca055f8

I can then map this asset to my bucket

aws s3 ls s3://mybucket/0855-0272769f2ded3cd8f3da8d98cad0a5eb8316fa5662b763dca8c71ca055f8

See how the file path maps to the bucket filename and such.

I confused myself a lot switching between 6.2 and 6.5 not sure exactly what the differences are but I now know what I needed to know to solve my problem hope this helps someone else.

Feel free to add on I like learning more.