AWS - SAM을 통한 Lambda [3]Layer with Pycharm
·
Platform/AWS
Pycharm 환경에서 Layer를 생성하고 배포하는 과정이다. 1. Layer 선언 프로젝트에 패키지 하나를 따로 생성해 Layer로 쓸 function들을 정의한다. 이후 template.yaml 파일에 해당 패키지를 mapping해준다. [ template.yaml ] TestCommon: Type: AWS::Serverless::LayerVersion Properties: ContentUri: test_common/ CompatibleRuntimes: - python3.9 LayerName: test_common RetentionPolicy: Retain 명시한 Layer(TestCommon)를 배포 시 해당 함수에 물리게끔 하는 작업이 필요하다. 2가지 방법이 있는데, Globals부분 또는 R..