amazon web services - AWS/IAM Policy for RDS snapshot management? -


I am working on a script to take an RDS snapshot every day and give it a name based on the appropriate pattern The script is very straightforward (like mydb-snapshot-20141031) but I ran into issues trying to shut down things so that if the key pair connected to the script was compromised, the attacker only damaged my snapshot. And database only O.

There is not much to help me by searching the web and looking at it (at least I am not able to reproduce it) so I'm hoping someone solved this before (Or it can be as good as I can manually). mydb-snapshot - *

  • Permission to match snapshots
  • >
  • Permission to delete snapshots mailing mydb-snapshot - *

Here I am trying to protect against:

  • I do not want this user to interact with any part of the AWS outside of the RDS
  • I do not want this user to actually convert any of my RDSs, for example "mydb" Including
  • I do not want this to change the user snapshot that no match mydb-snapshot - *

probably Can not be done (I can not get the documentation for "delete" companion for rds: CreateDBSnapshot policy). It would be nice if there really is a list of permissions required to use it.

I finally found DeleteDBSnapshot permission but later I realized that In fact, I wanted to limit the functions of a specific DB instance identifier, which I now agree with is possible because the AWS command actually works. In this way, you should create a policy that looks like this:

  {"Statement": [{"Effect": "Allow", "Action" ":" [RDS: AddTagsToResource "," Rds: DeleteDBSnapshot "]," Condition ": {" streq ": {" rds: snapshot-tag / MY_TAG_KEY ": [" MY_TAG_VALUE "]}}," resource ":" arn : "Rds: us-west-2 ::", "espress": "allow", "action": ["RDS: listtorfor resource", "RDS: createDBnapshot"], "resource": "ARN: ASS: RDS: ("RDS: Description DBSNopshot"], "Resource": "*"}]}  
P> Some notes / gestures:

  • For most command related to snapshots, the property of resource policy DBSnapshotIdentifier , but CreateDBS For napshot it refers to DBInstanceIdentifier (RDS database name).
  • Description DBSnapshots always works globally, so it should also be provided on all resource values. You can not limit it to the area too.
  • ListTagsForceSource throws a permission error if you try to limit it to the full snapshot resource path.
  • You do not need it, but I've included an example condition block for those people who want to ban tags further (or alternatively) by resource , ListTagsForResource and CreateDBSnapshot .

This resolves to solve my primary concern if the keys attached to this policy have been compromised - The attacker can only remove my rolling snapshot, manually created snapshots Or the database gives an example to itself Unfortunately, it still allows to create an unlimited snapshot in the specific area, but there is no way to restrict CreateDBSnapshot . The breakfast.


Comments

  1. Very nice information... Thanks for sharing details on AWS RDS snapshot. Share more details on AWS RDS snapshot pricing.

    ReplyDelete

Post a Comment

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

asp.net mvc - How to attach sql database to a javascript graph -

c# - How to know the number of Threads created and limit the Tasks accordingly -