Advertisement
Guest User

Untitled

a guest
Aug 26th, 2016
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. // Setup an IAM role that allows the lambda function to send a message
  2. // to the queue.
  3. iamPolicy := sparta.IAMRoleDefinition{
  4. Privileges: []sparta.IAMRolePrivilege{
  5. sparta.IAMRolePrivilege{
  6. Actions: []string{
  7. "sqs:SendMessage"},
  8. Resource: gocf.GetAtt(sqsResourceName, "Arn").String(),
  9. },
  10. },
  11. }
  12.  
  13. // The actual lambda functions
  14. lambdaFn := sparta.NewLambda(iamPolicy,
  15. helloWorldLambda,
  16. nil)
  17. lambdaFn.Decorator = helloWorldDecorator
  18. lambdaFn.DependsOn = []string{sqsResourceName}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement