EFS module - subnet does not exist (nondefault VPC)

ansible - v2.3.0
boto3 - v1.4.4

I’m trying to create an EFS share in a non-default VPC in AWS.

  • name: Create EFS share
    efs:
    state: present
    name: “my_happy_efs_share”
    tags:
    name: “my_happy_efs_share”
    targets:
  • subnet_id: subnet-xxxxxxx
    security_groups: [ “sg-xxxxxxx” ]

If I provide the subnet_id of a a subnet in the default VPC, it works. If the subnet exists in a non-default VPC, it fails with:
botocore.errorfactory.SubnetNotFound: An error occurred (SubnetNotFound) when calling the CreateMountTarget operation: The subnet ID ‘subnet-1173763b’ does not exist

I recall reading something about boto3 and nondefault vpcs, but can’t find it now.

Is there a work-around?

  • Will