-
Notifications
You must be signed in to change notification settings - Fork 5
/
template.yml
28 lines (27 loc) · 1.06 KB
/
template.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
AWSTemplateFormatVersion: '2010-09-09'
Transform: 'AWS::Serverless-2016-10-31'
Description: Template to deploy the lambda connector in your account.
Resources:
ConnectorFunction:
Type: 'AWS::Serverless::Function'
Properties:
Handler: "org.custom.connector.jdbc.handler.JDBCConnectorLambdaHandler::handleRequest"
CodeUri: "./target/appflow-custom-jdbc-connector-1.0.jar"
Description: "AppFlow custom JDBC connector example"
Runtime: java11
Timeout: 30
MemorySize: 1024
Policies:
Version: '2012-10-17'
Statement:
Effect: Allow
Action: 'secretsmanager:GetSecretValue'
Resource: !Sub 'arn:aws:secretsmanager:${AWS::Region}:${AWS::AccountId}:secret:appflow!${AWS::AccountId}-*'
PolicyPermission:
Type: 'AWS::Lambda::Permission'
Properties:
FunctionName: !GetAtt ConnectorFunction.Arn
Action: lambda:InvokeFunction
Principal: 'appflow.amazonaws.com'
SourceAccount: !Ref 'AWS::AccountId'
SourceArn: !Sub 'arn:aws:appflow:${AWS::Region}:${AWS::AccountId}:*'