Advertisement
Guest User

Untitled

a guest
Feb 26th, 2017
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. functions:
  2. MyLambdaFunction:
  3. role: MyLambdaRole
  4. handler: index.handle
  5. resources:
  6. Resources:
  7. MyEventName:
  8. Type: AWS::Events::Rule
  9. Properties:
  10. Description: An awesome periodic event
  11. Name: MyEventName
  12. ScheduleExpression: "cron(0 6 * * ? *)"
  13. State: ENABLED
  14. RoleArn:
  15. Fn::GetAtt:
  16. - "MyLambdaRole"
  17. - "Arn"
  18. Targets:
  19. -
  20. Arn:
  21. Fn::GetAtt:
  22. - "MyLambdaFunction"
  23. - "Arn"
  24. Id: "MyLambdaFunction"
  25. Input: '{"key": "value"}'
  26. MyLambdaRole:
  27. Type: AWS::IAM::Role
  28. Properties:
  29. Path: /my_uservices/
  30. RoleName: MyLambdaRole
  31. AssumeRolePolicyDocument:
  32. Version: '2012-10-17'
  33. Statement:
  34. - Effect: Allow
  35. Principal:
  36. Service:
  37. - lambda.amazonaws.com
  38. - events.amazonaws.com
  39. Action: sts:AssumeRole
  40. Policies:
  41. - PolicyName: MyLambdaPolicy
  42. PolicyDocument:
  43. Version: '2012-10-17'
  44. Statement:
  45. - Effect: Allow
  46. Action:
  47. - logs:CreateLogGroup
  48. - logs:CreateLogStream
  49. - logs:PutLogEvents
  50. Resource: "arn:aws:logs:*:*:log-group:/aws/lambda/*:*:*"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement