Prevent access of S3 bucket for admin via consoleDownloading an entire S3 bucket?Force Server Side Encryption for S3 BucketAccess Denied for new bucket with same IAM, Cognito, and permission configurationAllow admin access to sub_foldier in s3 bucket. Keep all other folders publicHow do I limit access to S3 Bucket for particular IAM Role?Unable to access anonymously uploaded S3 objects when authenticatedAWS IAM Policy to allow user access to specific S3 bucket for backupaws s3 Bucket policy not working as expectedAWS S3 bucket access controlaccess files from s3 bucket on client side meteor.js

GraphicsGrid with a Label for each Column and Row

How much character growth crosses the line into breaking the character

Closed-form expression for certain product

What should you do if you miss a job interview (deliberately)?

Problem with TransformedDistribution

250 Floor Tower

When were female captains banned from Starfleet?

Yosemite Fire Rings - What to Expect?

How should I respond when I lied about my education and the company finds out through background check?

Why Shazam when there is already Superman?

What was this official D&D 3.5e Lovecraft-flavored rulebook?

Is it possible to have a strip of cold climate in the middle of a planet?

Why electric field inside a cavity of a non-conducting sphere not zero?

How to explain what's wrong with this application of the chain rule?

The screen of my macbook suddenly broken down how can I do to recover

WiFi Thermostat, No C Terminal on Furnace

How can we generalize the fact of finite dimensional vector space to an infinte dimensional case?

Create all possible words using a set or letters

Fear of getting stuck on one programming language / technology that is not used in my country

On a tidally locked planet, would time be quantized?

Not using 's' for he/she/it

Are the IPv6 address space and IPv4 address space completely disjoint?

Non-trope happy ending?

How do you respond to a colleague from another team when they're wrongly expecting that you'll help them?



Prevent access of S3 bucket for admin via console


Downloading an entire S3 bucket?Force Server Side Encryption for S3 BucketAccess Denied for new bucket with same IAM, Cognito, and permission configurationAllow admin access to sub_foldier in s3 bucket. Keep all other folders publicHow do I limit access to S3 Bucket for particular IAM Role?Unable to access anonymously uploaded S3 objects when authenticatedAWS IAM Policy to allow user access to specific S3 bucket for backupaws s3 Bucket policy not working as expectedAWS S3 bucket access controlaccess files from s3 bucket on client side meteor.js













0















I have some very highly confidential data that i want to store in s3 bucket.
I want to make policies ( bucket or iam whatever required) in such a way that no one ( not even admin) can read the contents of files in that bucket from aws console.
But i will have a program running on my host that needs to put and get data from that s3 bucket.
Also i will be using server side encryption of s3 but i can't use client side encryption of s3.










share|improve this question


























    0















    I have some very highly confidential data that i want to store in s3 bucket.
    I want to make policies ( bucket or iam whatever required) in such a way that no one ( not even admin) can read the contents of files in that bucket from aws console.
    But i will have a program running on my host that needs to put and get data from that s3 bucket.
    Also i will be using server side encryption of s3 but i can't use client side encryption of s3.










    share|improve this question
























      0












      0








      0








      I have some very highly confidential data that i want to store in s3 bucket.
      I want to make policies ( bucket or iam whatever required) in such a way that no one ( not even admin) can read the contents of files in that bucket from aws console.
      But i will have a program running on my host that needs to put and get data from that s3 bucket.
      Also i will be using server side encryption of s3 but i can't use client side encryption of s3.










      share|improve this question














      I have some very highly confidential data that i want to store in s3 bucket.
      I want to make policies ( bucket or iam whatever required) in such a way that no one ( not even admin) can read the contents of files in that bucket from aws console.
      But i will have a program running on my host that needs to put and get data from that s3 bucket.
      Also i will be using server side encryption of s3 but i can't use client side encryption of s3.







      amazon-s3 aws-sdk amazon-iam aws-security-group






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 8 at 4:56









      Shubham BansalShubham Bansal

      32




      32






















          1 Answer
          1






          active

          oldest

          votes


















          0














          You are looking for something like this;



           
          "Id": "bucketPolicy",
          "Statement": [

          "Action": "s3:*",
          "Effect": "Deny",
          "NotPrincipal":
          "AWS": [
          "arn:aws:iam::111111111111:user/USERNAME",
          "arn:aws:iam::111111111111:role/ROLENAME"
          ]
          ,
          "Resource": [
          "arn:aws:s3:::examplebucket",
          "arn:aws:s3:::examplebucket/*"
          ]

          ],
          "Version": "2012-10-17"



          For test purposes make sure you replace arn:aws:iam::111111111111:user/USERNAME with your user arn. So in case you lock out everybody you can at least perform actions on the bucket.



          arn:aws:iam::111111111111:role/ROLENAME should be replaced by the role arn which is attached to your EC2 instance (I am assuming that is what you mean by host).






          share|improve this answer

























          • Two problems: explicit deny cannot be overridden by explicit allow, and it is impossible to prevent the root credentials from deleting and then replacing a bucket policy, giving the root credentials a backdoor to the bucket.

            – Michael - sqlbot
            Mar 8 at 21:26











          • @Michael-sqlbot you are correct I missed the condition in the deny statement. I shall fix it in my answer soon.

            – MC_
            Mar 8 at 22:00











          • @Michael-sqlbot policy is updated. It only allows actions to the bucket for specified user/role.

            – MC_
            Mar 9 at 10:38










          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55056948%2fprevent-access-of-s3-bucket-for-admin-via-console%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          You are looking for something like this;



           
          "Id": "bucketPolicy",
          "Statement": [

          "Action": "s3:*",
          "Effect": "Deny",
          "NotPrincipal":
          "AWS": [
          "arn:aws:iam::111111111111:user/USERNAME",
          "arn:aws:iam::111111111111:role/ROLENAME"
          ]
          ,
          "Resource": [
          "arn:aws:s3:::examplebucket",
          "arn:aws:s3:::examplebucket/*"
          ]

          ],
          "Version": "2012-10-17"



          For test purposes make sure you replace arn:aws:iam::111111111111:user/USERNAME with your user arn. So in case you lock out everybody you can at least perform actions on the bucket.



          arn:aws:iam::111111111111:role/ROLENAME should be replaced by the role arn which is attached to your EC2 instance (I am assuming that is what you mean by host).






          share|improve this answer

























          • Two problems: explicit deny cannot be overridden by explicit allow, and it is impossible to prevent the root credentials from deleting and then replacing a bucket policy, giving the root credentials a backdoor to the bucket.

            – Michael - sqlbot
            Mar 8 at 21:26











          • @Michael-sqlbot you are correct I missed the condition in the deny statement. I shall fix it in my answer soon.

            – MC_
            Mar 8 at 22:00











          • @Michael-sqlbot policy is updated. It only allows actions to the bucket for specified user/role.

            – MC_
            Mar 9 at 10:38















          0














          You are looking for something like this;



           
          "Id": "bucketPolicy",
          "Statement": [

          "Action": "s3:*",
          "Effect": "Deny",
          "NotPrincipal":
          "AWS": [
          "arn:aws:iam::111111111111:user/USERNAME",
          "arn:aws:iam::111111111111:role/ROLENAME"
          ]
          ,
          "Resource": [
          "arn:aws:s3:::examplebucket",
          "arn:aws:s3:::examplebucket/*"
          ]

          ],
          "Version": "2012-10-17"



          For test purposes make sure you replace arn:aws:iam::111111111111:user/USERNAME with your user arn. So in case you lock out everybody you can at least perform actions on the bucket.



          arn:aws:iam::111111111111:role/ROLENAME should be replaced by the role arn which is attached to your EC2 instance (I am assuming that is what you mean by host).






          share|improve this answer

























          • Two problems: explicit deny cannot be overridden by explicit allow, and it is impossible to prevent the root credentials from deleting and then replacing a bucket policy, giving the root credentials a backdoor to the bucket.

            – Michael - sqlbot
            Mar 8 at 21:26











          • @Michael-sqlbot you are correct I missed the condition in the deny statement. I shall fix it in my answer soon.

            – MC_
            Mar 8 at 22:00











          • @Michael-sqlbot policy is updated. It only allows actions to the bucket for specified user/role.

            – MC_
            Mar 9 at 10:38













          0












          0








          0







          You are looking for something like this;



           
          "Id": "bucketPolicy",
          "Statement": [

          "Action": "s3:*",
          "Effect": "Deny",
          "NotPrincipal":
          "AWS": [
          "arn:aws:iam::111111111111:user/USERNAME",
          "arn:aws:iam::111111111111:role/ROLENAME"
          ]
          ,
          "Resource": [
          "arn:aws:s3:::examplebucket",
          "arn:aws:s3:::examplebucket/*"
          ]

          ],
          "Version": "2012-10-17"



          For test purposes make sure you replace arn:aws:iam::111111111111:user/USERNAME with your user arn. So in case you lock out everybody you can at least perform actions on the bucket.



          arn:aws:iam::111111111111:role/ROLENAME should be replaced by the role arn which is attached to your EC2 instance (I am assuming that is what you mean by host).






          share|improve this answer















          You are looking for something like this;



           
          "Id": "bucketPolicy",
          "Statement": [

          "Action": "s3:*",
          "Effect": "Deny",
          "NotPrincipal":
          "AWS": [
          "arn:aws:iam::111111111111:user/USERNAME",
          "arn:aws:iam::111111111111:role/ROLENAME"
          ]
          ,
          "Resource": [
          "arn:aws:s3:::examplebucket",
          "arn:aws:s3:::examplebucket/*"
          ]

          ],
          "Version": "2012-10-17"



          For test purposes make sure you replace arn:aws:iam::111111111111:user/USERNAME with your user arn. So in case you lock out everybody you can at least perform actions on the bucket.



          arn:aws:iam::111111111111:role/ROLENAME should be replaced by the role arn which is attached to your EC2 instance (I am assuming that is what you mean by host).







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Mar 9 at 10:37

























          answered Mar 8 at 8:15









          MC_MC_

          303213




          303213












          • Two problems: explicit deny cannot be overridden by explicit allow, and it is impossible to prevent the root credentials from deleting and then replacing a bucket policy, giving the root credentials a backdoor to the bucket.

            – Michael - sqlbot
            Mar 8 at 21:26











          • @Michael-sqlbot you are correct I missed the condition in the deny statement. I shall fix it in my answer soon.

            – MC_
            Mar 8 at 22:00











          • @Michael-sqlbot policy is updated. It only allows actions to the bucket for specified user/role.

            – MC_
            Mar 9 at 10:38

















          • Two problems: explicit deny cannot be overridden by explicit allow, and it is impossible to prevent the root credentials from deleting and then replacing a bucket policy, giving the root credentials a backdoor to the bucket.

            – Michael - sqlbot
            Mar 8 at 21:26











          • @Michael-sqlbot you are correct I missed the condition in the deny statement. I shall fix it in my answer soon.

            – MC_
            Mar 8 at 22:00











          • @Michael-sqlbot policy is updated. It only allows actions to the bucket for specified user/role.

            – MC_
            Mar 9 at 10:38
















          Two problems: explicit deny cannot be overridden by explicit allow, and it is impossible to prevent the root credentials from deleting and then replacing a bucket policy, giving the root credentials a backdoor to the bucket.

          – Michael - sqlbot
          Mar 8 at 21:26





          Two problems: explicit deny cannot be overridden by explicit allow, and it is impossible to prevent the root credentials from deleting and then replacing a bucket policy, giving the root credentials a backdoor to the bucket.

          – Michael - sqlbot
          Mar 8 at 21:26













          @Michael-sqlbot you are correct I missed the condition in the deny statement. I shall fix it in my answer soon.

          – MC_
          Mar 8 at 22:00





          @Michael-sqlbot you are correct I missed the condition in the deny statement. I shall fix it in my answer soon.

          – MC_
          Mar 8 at 22:00













          @Michael-sqlbot policy is updated. It only allows actions to the bucket for specified user/role.

          – MC_
          Mar 9 at 10:38





          @Michael-sqlbot policy is updated. It only allows actions to the bucket for specified user/role.

          – MC_
          Mar 9 at 10:38



















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55056948%2fprevent-access-of-s3-bucket-for-admin-via-console%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Thal And Out Agency railway station See also References External links Navigation menuOfficial Web Site of Pakistan RailwaysArchivedOfficial Web Site of Pakistan Railwayseeexpanding ite

          Understanding generators in Python2019 Community Moderator ElectionGenerator function not working pythonFor loop not executing two timesGenerators - Printing generated valuesWhy can a python generator only be used once?What exactly do generators do?What does the “yield” keyword do?What does “list comprehension” mean? How does it work and how can I use it?sklearn Kfold acces single fold instead of for loopIs a generator the callable? Which is the generator?Apply Border To Range Of Cells Using OpenpyxlCalling an external command in PythonWhat are metaclasses in Python?What is the difference between @staticmethod and @classmethod?Finding the index of an item given a list containing it in PythonDifference between append vs. extend list methods in PythonHow can I safely create a nested directory in Python?Does Python have a ternary conditional operator?Understanding slice notationUnderstanding Python super() with __init__() methodsDoes Python have a string 'contains' substring method?

          How can I change the color of pagination dots of UIPageControl?How to change UIPageControl dotsIs there a way to change page indicator dots colorCustomize dot with image of UIPageControl at index 0 of UIPageControlNo visible @interface for 'NSObject<PageControlDelegate>' declares the selector 'pageControlPageDidChange:'How to change the color of pagination dots in UIPageControl with a different color per pagepagecontrol indicator custom image instead of DefaultChanging the colour of UIPageControl dots in MonoTouchpagecontrol selectable page visibility color?Alternative way to load ViewControllers on a UIPageControlHow to set only layer.border-color for UIpage control dots in swiftHow can I develop for iPhone using a Windows development machine?How to change the name of an iOS app?UITableView - change section header coloruipagecontrol indicator(dot)issueCustom UIPageControl dots color not changingchange the interspace between UIPageControl dotsHow to change Status Bar text color in iOSHow can I change image tintColor in iOS and WatchKitUIPageControl dots with larger space in between each dotsHow to change the color of pagination dots in UIPageControl with a different color per page