简体   繁体   中英

Link S3 Bucket with Dynamodb android?

I want to do the following(Android App) :-

  1. Upload UserProfile photo to S3 bucket.
  2. Connect S3 bucket to Dynamodb(userprofile.png link next to user id in Table).

I have read the Amazon documentation which is quie confusing ?

Can anyone give the sample code of uploading image to AWS S3 and get the image file's S3 bucket url and save it to dynamodb all at once?

There might be two possibilities of doing this:

First possibility:(Done completely internal to app)

  1. In the android app upload the image to the s3 bucket using the Java sdk (refer : https://github.com/awsdocs/aws-doc-sdk-examples/tree/master/java/example_code/s3/src/main/java )
  2. Once the image is uploaded add the url to the Dynamodb table

Second possibility:

  1. Upload the image to S3
  2. Enable and Configure Event Notifications for S3 Bucket and send to SNS topic
  3. Subscribe a lambda function to SNS topic
  4. Execute a lambda function to add s3 object url to dynamodb table

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM