I have created a lambda and I would like to access some files from a different directory (ie. data_dir).
How do I include them?
So far, I tried using layers and efs mount but I didn't manage to get either of these to work...
Here is my file system structure:
src
|__lambdas
|__my_lambdas.py
data_dir
|__transform.xsl
|__schema.json
|__config.ini
I am currently using this template to sam build --use-container and sam local invoke IngestFunction
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: Description
Resources:
IngestFunction:
Type: AWS::Serverless::Function
Properties:
CodeUri: src/lambdas/
Handler: my_lambdas.some_handler_method
Runtime: python3.7
Events:
IngestSQS:
Type: SQS
Properties:
Queue: arn:aws:sqs:eu-west-1:xxx:xxx
BatchSize: 10