AWS S3 and Presigned URL

Step 01: Starting from the last Step!

Last picture: AWS Presingned URL create from AWS SDK from Java
URL Presigned URL created, and Upload “miobject” in S3 and return a 200 status code
One Object is created On S3 after printed the 200 status code
Bucket private

Step 02: recap: Where is te code?

GeneratingPresignedUrlAndUploadObject Sample Java Code
Java Project with the pom.xml and the GeneratingPresignedUrlAndUploadObject.java

Step 03: Let’s build and run

$ git clone https://github.com/PabloEzequiel/shared-images.git
$ cd shared-images/lambda/java-aws-sample
$ mvn clean install
git clone https://github.com/PabloEzequiel/shared-images.git
mvn clean install
$ mvn exec:java -Dexec.mainClass="aws.s3sample.GeneratePresignedUrlAndUploadObject"
The Bucket “ninja-presigned-web” don’t exist on S3

Step 04: Let’s Upload (PUT) the Object in S3

The bucket name (to create) and the object name (to upload)
aws configure
Let’s create the bucket with default (private) access
The Bucket is Private
$ mvn exec:java -Dexec.mainClass="aws.s3sample.GeneratePresignedUrlAndUploadObject"
We get 200 ok ~> The Object was created and we get the presigned URL
The Object Created
Method PUT in the Presigned URL ~ Text in the Object

Step 05: Let’s Recover (GET) the Object from S3

Using The presigned URL to access to the Object by GET (on a private Bucket)

Final words

Resources

--

--

--

#cloud . #mobile ~} Sharing IT while learning It! ... Opinions are for my own

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

How to extract Sinhala Language Tweets using Tweepy

Technical Release 11

Syncing S3 buckets from different providers/endpoints (part 1)

How I tricked myself into cracking my own legacy App — and failed.

Information

The 3 Most Popular APIs On Marketplace.

Kuro Shiba dApp Preview: the First Stakeable NFTs on Harmony!

Galaxy Expansion Pack | Volume 1.0

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Pablo Ezequiel Inchausti

Pablo Ezequiel Inchausti

#cloud . #mobile ~} Sharing IT while learning It! ... Opinions are for my own

More from Medium

Want to Win on OTT? Invest in UI With a Focus on Search

AWS OpsWorks Docker | An Overview

Multi — Cloud K8S Cluster

Let’s Learn ELK(Part 3) — Logstash Architecture