service: IM-CAPITAL-BACKEND-SERVICE-JAVA
frameworkVersion: '3'
provider:
  name: aws
  runtime: java11
  stage: dev
  region: eu-west-1

  deploymentBucket:
    name: imcapital-dev-lambda-deployment
    serverSideEncryption: AES256 
  iam:
    role: arn:aws:iam::597707462019:role/IMCapital_serverless_deployment
  vpc:
    securityGroupIds:
      - sg-0089502251d79aa23
    subnetIds:
      - subnet-08882af1374cdd5d2
      - subnet-0b9b9e77b66be7a4d
  iamRoleStatements:
    - Effect: Allow
      Action:
        - ec2:DescribeNetworkInterfaces
        - ec2:CreateNetworkInterface
        - ec2:DeleteNetworkInterface
        - ec2:DescribeInstances
        - ec2:AttachNetworkInterface
      Resource: "*"

package:
  artifact: build/libs/getToken-dev-all.jar

functions:
  getTokenJava:
    handler: com.serverless.Handler
    events:
      - http:
          path: /getTokenJava
          method: get
  getTokenCheckJava:
    handler: com.serverless.TokenCheck
    events:
      - http:
          path: /getTokenCheckJava
          method: get
  getStatementsJava:
    handler: com.serverless.SanlamStatementData
    events:
      - http:
          path: /getStatementsJava
          method: get
  getMembersJava:
    handler: com.serverless.SanlamSubgroupMembers
    events:
      - http:
          path: /getMembersJava
          method: get
