Skip to content

Latest commit

 

History

History
44 lines (34 loc) · 1.06 KB

dynamodb.md

File metadata and controls

44 lines (34 loc) · 1.06 KB

DynamoDB

ENV

Required ENV variables

AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
AWS_DYNAMODB_ENDPOINT
parameters:
    aws.region.west: 'eu-west-1'
    aws.dynamodb.table-name: 'table-name'
    aws.dynamodb.endpoint: '%env(AWS_DYNAMODB_ENDPOINT)%'

services:
    
    aws.credentials:
        class: Aws\Credentials\Credentials
        arguments: ['%env(AWS_ACCESS_KEY_ID)%', '%env(AWS_SECRET_ACCESS_KEY)%']

    aws.dynamodb.marshaler:
        class: Aws\DynamoDb\Marshaler

    Landingi\AwsBundle\Aws\DynamoDb\ClientFactory: ~
    
    aws.dynamodb.client.west:
        class: Aws\DynamoDb\DynamoDbClient
        factory: ['@Landingi\AwsBundle\Aws\DynamoDb\ClientFactory', 'build']
        arguments:
            - '@aws.credentials'
            - '%aws.region.west%'
            - '%aws.dynamodb.endpoint%'

    Landingi\AwsBundle\Aws\DynamoDb\DynamoDb:
        class: Landingi\AwsBundle\Aws\DynamoDb\DynamoDb
        arguments:
            - '@aws.dynamodb.client.west'
            - '@aws.dynamodb.marshaler'
            - '%aws.dynamodb.table-name%'