Commit ea382b04 authored by chaithra@openxcellinc.com's avatar chaithra@openxcellinc.com
Browse files

Delete CF-Lambd-cloudwatch

parent 8c56540a
No related merge requests found
Pipeline #20121 passed with stage
in 46 seconds
Showing with 0 additions and 59 deletions
+0 -59
Resources:
LambdaExecutionRole:
Properties:
AssumeRolePolicyDocument:
Statement:
- Action:
- sts:AssumeRole
Effect: Allow
Principal:
Service:
- lambda.amazonaws.com
Version: '2012-10-17'
Path: /
Policies:
- PolicyDocument:
Version: '2012-10-17'
Statement:
- Action: s3:*
Effect: Allow
Resource: '*'
PolicyName: root
Type: AWS::IAM::Role
LambdaFunction:
Properties:
Code:
S3Bucket: bucketname
S3Key: //Zip file URL of your code in s3//
Handler: index.lambda_handler
MemorySize: 128
Role:
Fn::GetAtt:
- LambdaExecutionRole
- Arn
Runtime: python3.7
Timeout: 60
Type: AWS::Lambda::Function
LambdaFunctionSchedule:
Properties:
ScheduleExpression: cron(0 8,16 ? * MON-FRI *)
Targets:
- Arn:
Fn::GetAtt:
- LambdaFunction
- Arn
Id: '1'
Type: AWS::Events::Rule
LambdaFunctionCwPermission:
Properties:
Action: lambda:InvokeFunction
FunctionName:
Fn::GetAtt:
- LambdaFunction
- Arn
Principal: events.amazonaws.com
SourceArn:
Fn::GetAtt:
- LambdaFunctionSchedule
- Arn
Type: AWS::Lambda::Permission
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment