Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in AWS by (5.6k points)

Here is my piece of code 

private static String bucketName     = "*** Provide bucket name ***";

private static String keyName        = "*** Provide key ***";

private static String uploadFileName = "*** Provide file name ***"; 

 And my question is, What is that keyName for? Is it the name of the object that should be in my bucket or the key is given on account creation?

1 Answer

0 votes
by (12.4k points)

In S3 keys looks like file path, what it means is that you can upload objects using a key like 

/some/key/to/an/image/file.jpg

without first having to create a path 

/some/key/to/an/image

So when you upload any objects to S3 you specify a unique public key for the object.

 Want to learn more about AWS? Come & join: AWS Online training.

Related questions

0 votes
1 answer
Want to get 50% Hike on your Salary?

Learn how we helped 50,000+ professionals like you !

0 votes
1 answer
+16 votes
2 answers

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...