2021-06-13

AWS essentials - 2 - try Java SDK - S3 example

1. Set up env (this step is done before)

https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/get-started.html

2. Get the code from ASW Java SDK 

2.1. Set up pom.xml

(waiting for IntelliJ finished it's background tasks,indexing etc)

(I'd use Java 11,  not 1.7)

(dealing with duplicates in pom.xml - "build" section)

ok, the issue is fixed - it's time to run the code

find AWS SDK for Java 2.0 documentation examples

(fixing missing  imports: org.apache.logging.log4j.Logger;TestInstance)

Looks like all the issues are fixed - time to run the test - confirm S3 bucket is created

the bucket is created - bucket-name-2021-06-13, it is empty now - let's upload a file - it says "Test 3 passed" - let's see AWS S3 contents - looks good: the file asdf.txt is copied to S3 as "asdf.in.s3.txt"


No comments: