AWSTemplateFormatVersion: '2010-09-09' Transform: 'AWS::Serverless-2016-10-31' Description: 'test-remote-defined-enum-as-header-value deployment' Parameters: Env: Description: The environment name. Type: String Default: dev Resources: ContextFunction: Type: AWS::Serverless::Function Properties: CodeUri: ../../.. Environment: Variables: ENV: !Ref Env Events: GetById: Type: Api Properties: Path: '/contexts/{id}' Method: get Ping: Type: Schedule Properties: Schedule: rate(5 minutes) Input: '{"httpMethod": "PING"}' FunctionName: !Sub '${AWS::StackName}-context' Handler: src/main/js/handlers/context.handler Policies: - AWSLambdaBasicExecutionRole - Version: 2012-10-17 Statement: - Action: - secretsmanager:GetSecretValue Effect: Allow Resource: '*' - Action: - kms:Decrypt Effect: Allow Resource: '*' Runtime: nodejs8.10 ContextFunctionLogRetention: Type: AWS::Logs::LogGroup Properties: LogGroupName: !Sub '/aws/lambda/${ ContextFunction}' RetentionInDays: 7 Outputs: ContextFunction: Description: The name of the Lambda function for the Context model Value: !Ref ContextFunction Export: Name: !Sub '${AWS::StackName}-functions-Context' ContextFunctionRole: Description: The name of the Lambda function role for the Context model Value: !Ref ContextFunctionRole Export: Name: !Sub '${AWS::StackName}-roles-Context'