I'm trying to set up an app that configures my instances upon launch and I want to close down that app's API access as much as possible. My current policy is as follows:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Stmt1388183890000",
"Effect": "Allow",
"Action": [
"ec2:AssociateAddress",
"ec2:CreateTags",
"ec2:DescribeInstances",
"ec2:RebootInstances"
],
"Resource":"*"
}
]
}
However, this allows the app to perform any of these actions on anything in EC2. Is there a way I can lock down the actions of the app on an ec2 instance to either that specific instance, or to all of the boxes that have the same IAM role?