Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- service: donkeyjob
- provider:
- name: aws
- runtime: nodejs6.10
- functions:
- getdonkeyjobs:
- handler: handler.getdonkeyjobs
- resources:
- Resources:
- donkeyjobs:
- Type: AWS::DynamoDB::Table
- Properties:
- TableName: donkeyjobs
- AttributeDefinitions:
- - AttributeName: listingId
- AttributeType: S
- KeySchema:
- - AttributeName: listingId
- KeyType: HASH
- ProvisionedThroughput:
- ReadCapacityUnits: 1
- WriteCapacityUnits: 1
- # A policy is a resource that states one or more permssions. It lists actions, resources and effects.
- DynamoDBIamPolicy:
- Type: AWS::IAM::Policy
- DependsOn: donkeyjobs
- Properties:
- PolicyName: lambda-dynamodb
- PolicyDocument:
- Version: '2012-10-17'
- Statement:
- - Effect: Allow
- Action:
- - dynamodb:DescribeTable
- - dynamodb:Query
- - dynamodb:Scan
- - dynamodb:GetItem
- - dynamodb:PutItem
- - dynamodb:UpdateItem
- - dynamodb:DeleteItem
- Resource: arn:aws:dynamodb:*:*:table/donkeyjobs
- Roles:
- - Ref: IamRoleLambdaExecution
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement