-
Notifications
You must be signed in to change notification settings - Fork 0
/
template.yml
28 lines (28 loc) · 1.01 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: An AWS Lambda application that calls the Lambda API.
Resources:
function:
Type: AWS::Serverless::Function
Properties:
CodeUri: build/distributions/aws-account-onboarding-lambda.zip
Handler: com.logicmonitor.aws.lambdas.CreateAndAttachPolicyToRoleHandler
Runtime: java11
Description: Java function
MemorySize: 512
Timeout: 900
# Function's execution role permissions
Policies:
- AWSLambdaBasicExecutionRole
- Statement:
- Sid: AllowLambdaFunctionToIAM
Effect: Allow
Action:
- iam:CreatePolicy
- iam:GetRole
- iam:GetPolicy
- iam:CreateRole
- iam:AttachRolePolicy
- sts:AssumeRole # cannot invoke lambda without this. function needs to assume role whenever it's invoked.
Resource: '*'
Tracing: Active