Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Setup an IAM role that allows the lambda function to send a message
- // to the queue.
- iamPolicy := sparta.IAMRoleDefinition{
- Privileges: []sparta.IAMRolePrivilege{
- sparta.IAMRolePrivilege{
- Actions: []string{
- "sqs:SendMessage"},
- Resource: gocf.GetAtt(sqsResourceName, "Arn").String(),
- },
- },
- }
- // The actual lambda functions
- lambdaFn := sparta.NewLambda(iamPolicy,
- helloWorldLambda,
- nil)
- lambdaFn.Decorator = helloWorldDecorator
- lambdaFn.DependsOn = []string{sqsResourceName}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement