Link to home
Create AccountLog in
Avatar of Marthaj
MarthajFlag for United States of America

asked on

AWS examples for Java/Javascript

This is going to sound really stupid - so be it - but with the AWS examples - I see a lot of this coding - Can someone explain to me - basically - what the code is describing ??
I think I know, its giving substance/value to "Version", "Statement" etc but when I try this in Java, especially when compiling it in a package it does not fly. And I found this example in AWS SDK examples for Javascript/Java.
Could someone clear the air for me ?? And yes, I feel pretty stupid.
thank you.

{
  "Version":"2012-10-17",
  "Statement":[
    {
      "Sid":"PublicRead",
      "Effect":"Allow",
      "Principal": "*",
      "Action":["s3:GetObject"],
      "Resource":["arn:aws:s3:::examplebucket/*"]
    }
  ]
}

Open in new window

Avatar of Phil Phillips
Phil Phillips
Flag of United States of America image

That's an IAM policy (see: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html).  You normally attach to those an IAM role/group (can be done in the AWS console). Basically, it's a way of defining access to AWS resources. Another resource to check out is the AWS IAM policy generator: https://awspolicygen.s3.amazonaws.com/policygen.html
ASKER CERTIFIED SOLUTION
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of Marthaj

ASKER

well smack myself on the forehead.....then smack myself on the back of the head too ! Thank you both !!
Really clears the air...
Avatar of Marthaj

ASKER

Thank you both so very much...
:)