service: lambda-invoke-tests

plugins:
  - ../../../

provider:
  iamRoleStatements:
    - Effect: Allow
      Action:
        - lambda:InvokeAsync
        - lambda:InvokeFunction
      Resource: '*'
  memorySize: 128
  name: aws
  region: us-east-1
  runtime: nodejs12.x
  stage: dev
  versionFunctions: false

functions:
  invokeInvocationTypeEvent:
    events:
      - http:
          method: get
          path: invocation-type-event
    handler: lambdaInvokeHandler.invokeInvocationTypeEvent

  testHandler:
    events:
      - http:
          method: get
          path: test-handler
    handler: lambdaInvokeHandler.testHandler

  invokeInvocationTypeRequestResponse:
    events:
      - http:
          method: get
          path: invocation-type-request-response
    handler: lambdaInvokeHandler.invokeInvocationTypeRequestResponse

  invokedHandler:
    handler: lambdaInvokeHandler.invokedHandler

  invokeAsync:
    events:
      - http:
          method: get
          path: invoke-async
    handler: lambdaInvokeAsyncHandler.invokeAsync

  invokedAsyncHandler:
    handler: lambdaInvokeAsyncHandler.invokedAsyncHandler

service: lambda-invoke-tests

plugins:
  - ../../../

provider:
  iamRoleStatements:
    - Effect: Allow
      Action:
        - lambda:InvokeAsync
        - lambda:InvokeFunction
      Resource: '*'
  memorySize: 128
  name: aws
  region: us-east-1
  runtime: nodejs12.x
  stage: dev
  versionFunctions: false

functions:
  invokeInvocationTypeEvent:
    events:
      - http:
          method: get
          path: invocation-type-event
    handler: lambdaInvokeHandler.invokeInvocationTypeEvent

  testHandler:
    events:
      - http:
          method: get
          path: test-handler
    handler: lambdaInvokeHandler.testHandler

  invokeInvocationTypeRequestResponse:
    events:
      - http:
          method: get
          path: invocation-type-request-response
    handler: lambdaInvokeHandler.invokeInvocationTypeRequestResponse

  invokedHandler:
    handler: lambdaInvokeHandler.invokedHandler

  invokeAsync:
    events:
      - http:
          method: get
          path: invoke-async
    handler: lambdaInvokeAsyncHandler.invokeAsync

  invokedAsyncHandler:
    handler: lambdaInvokeAsyncHandler.invokedAsyncHandler

custom:
  serverless-offline:
    allowCache: true

Test update for invoke's recursive nature
Test update for invoke's recursive nature
