scar icon indicating copy to clipboard operation
scar copied to clipboard

Allow creating a function inside a VPC

Open EliteMasterEric opened this issue 4 years ago • 0 comments

Initializing the lambda function with defined subnets and security groups should be possible by adding support for an optional VpcConfig object in https://github.com/grycap/scar/blob/99a8cb250ecfe60cbc182d8ebd55d9b6b1dbc683/scar/providers/aws/lambdafunction.py#L52

Example: The following configuration:

functions:
  aws:
  - lambda:
      name: scar-cowsay
      run_script: runcow.sh
      container:
        image: grycap/cowsay
        vpc_config:
          SubnetIds:
            - <SUBNETA-ID>
            - <SUBNETB-ID>
          SecurityGroupIds:
            - <GROUPA-ID>
            - <GROUPB-ID>

should configure the resulting lambda function to use Subnet IDs A and B, and Security Groups A and B.

This would be necessary once #360 is implemented, in order to allow access to Elastic File Shares contained within a VPC.

EliteMasterEric avatar Oct 17 '20 06:10 EliteMasterEric