0
votes

In a CloudFormation template, I'm currently deploying a .NET app to Elastic Beanstalk, but would love to mount an EFS file system to it. I looked at this .ebextensions config file and included it in the project, like so:

~/my-app/
 |-- .ebextensions
 |   |-- storage-efs-mountfilesystem.config

Inside this .config file, it asks for the EFS Volume ID:

option_settings:
  aws:elasticbeanstalk:application:environment:
    EFS_VOLUME_ID: '`{"Ref" : "FileSystem"}`'
    EFS_MOUNT_DIR: '/efs_volume'

My question is that in the CloudFormation template, I want to try and pass the EFS ID as a parameter string called "FileSystem". Is it possible for the config files in the .ebextension directory of the app to have access to that parameter so I don't have to manually insert the EFS ID in the config file. In other words, have the { Ref: FileSystem} work accordingly?

Thanks for any help or clarification on this.

1
A .NET app, I assume, means a Windows Server... which isn't yet supported with EFS... is it? The .ebextensions config file seems distinctly Amazon Linux-flavored, too, but I willingly concede that I may be talking utter nonsense, working from a flawed assumption about the OS involved, here. Does this configuration currently work for you, at all?Michael - sqlbot
I haven't actually tested it yet, but will update this thread when I do. You make a really good obvious point though. Just looked it up and saw "Using Amazon EFS with Microsoft Windows Amazon EC2 instances is not supported." Source: docs.aws.amazon.com/efs/latest/ug/whatisefs.htmlJustin
Of course, "is not supported" does not necessarily mean "will not work." Using EFS from machines outside your VPC, including not only Linux but also Solaris, is also "not supported," but I managed to find a way to make that happen. Still, it seems like for now you may not be able to do this without at least some creativity and/or ingenuity, which would tend to exclude built-in CloudFormation support.Michael - sqlbot

1 Answers

0
votes

AWS::EFS::FileSystem - AWS CloudFormation syntax for EFS. http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-efs-filesystem.html You can add EFS ID with key/value pair.