Error calling AssociateAddress- AWS Transfer family

107 Views Asked by At

I have tried to create AWS Transfer family in VPC public subnet from console. It failed with below error "Error calling AssociateAddress: You are not authorized to perform this operation". Decoded the message to find that missing it missing permission for ec2:AssociateAddress

Added below policy to the role. Still the error persist while creating server. Can you please help

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Action": "ec2:AssociateAddress",
            "Resource": "arn:aws:ec2:us-east-1:111111:elastic-ip/*",
            "Effect": "Allow"
        }
    ]
}
1

There are 1 best solutions below

2
On

AssociateAddress does not only apply to elastic-ip. You should try with:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Action": "ec2:AssociateAddress",
            "Resource": [
               "arn:aws:ec2:us-east-1:111111:elastic-ip/*",
               "arn:aws:ec2:us-east-1:111111:instance/*",
               "arn:aws:ec2:us-east-1:111111:network-interface/*",
             ],
            "Effect": "Allow"
        }
    ]
}