Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.23 KB | None | 0 0
  1. service: donkeyjob
  2.  
  3. provider:
  4. name: aws
  5. runtime: nodejs6.10
  6. functions:
  7. getdonkeyjobs:
  8. handler: handler.getdonkeyjobs
  9.  
  10. resources:
  11. Resources:
  12. donkeyjobs:
  13. Type: AWS::DynamoDB::Table
  14. Properties:
  15. TableName: donkeyjobs
  16. AttributeDefinitions:
  17. - AttributeName: listingId
  18. AttributeType: S
  19. KeySchema:
  20. - AttributeName: listingId
  21. KeyType: HASH
  22. ProvisionedThroughput:
  23. ReadCapacityUnits: 1
  24. WriteCapacityUnits: 1
  25.  
  26. # A policy is a resource that states one or more permssions. It lists actions, resources and effects.
  27.  
  28. DynamoDBIamPolicy:
  29. Type: AWS::IAM::Policy
  30. DependsOn: donkeyjobs
  31. Properties:
  32. PolicyName: lambda-dynamodb
  33. PolicyDocument:
  34. Version: '2012-10-17'
  35. Statement:
  36. - Effect: Allow
  37. Action:
  38. - dynamodb:DescribeTable
  39. - dynamodb:Query
  40. - dynamodb:Scan
  41. - dynamodb:GetItem
  42. - dynamodb:PutItem
  43. - dynamodb:UpdateItem
  44. - dynamodb:DeleteItem
  45. Resource: arn:aws:dynamodb:*:*:table/donkeyjobs
  46. Roles:
  47. - Ref: IamRoleLambdaExecution
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement