Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding dynamodb scaler documentation #680

Merged
merged 30 commits into from
Mar 22, 2022
Merged
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
3304a6a
Upgrade Hugo and add NPM CI scripts (#665)
chalin Feb 20, 2022
c92fe21
Adding dynamodb scaler.
samueleresca Feb 24, 2022
960bff4
Applying suggestions.
samueleresca Feb 25, 2022
21cf4f8
Moving dynamo scaler from 2.6 to 2.7.
samueleresca Feb 28, 2022
cceb32d
Updating documentation.
samueleresca Mar 11, 2022
a18663c
Update build instructions, drop yarn and one _redirect file (#670)
chalin Feb 22, 2022
9c93e91
Update 404 layout to better support analytics (#677)
chalin Feb 23, 2022
ea7a0b6
chore: Add @JorTurFer as code owner (#684)
tomkerkhove Mar 2, 2022
12a5129
chore: Migrate to CNCF-based Zoom account and Google Docs (#683)
tomkerkhove Mar 2, 2022
0792533
Clarify datadog rate limit (#682)
arapulido Mar 4, 2022
336cd48
Fix some broken anchors (#689)
chalin Mar 4, 2022
0722419
Netlify CLI: add framework flag (#690)
chalin Mar 4, 2022
1614eba
Update link checking scripts / targets (#696)
chalin Mar 7, 2022
4344620
Upgrade Hugo to 0.93.2 (#695)
chalin Mar 7, 2022
228866b
Add Stilingue as KEDA user (#688)
luistilingue Mar 7, 2022
eb64cf4
Layout cleanup in preparation of title format change (#691)
chalin Mar 7, 2022
28e9e4c
docs: Provide guidance on how CRON scaler works (#698)
tomkerkhove Mar 7, 2022
a497340
Drop prebuild placeholder and associated scripts (#699)
chalin Mar 7, 2022
fa3a98f
Make HTML titles consistent: "<page-title> | KEDA" (#700)
chalin Mar 7, 2022
126ba66
Remove make targets using non npx-hugo, adjust Netlify config (#701)
chalin Mar 7, 2022
8927943
docs: Add troubleshooting section on checkpointing for EventHub Azure…
v-shenoy Mar 9, 2022
e907faf
Add blog re post of how Zapier uses KEDA (#687)
rtnpro Mar 9, 2022
51ea742
Solace scaler file name fix (#705)
chalin Mar 10, 2022
905b9c6
docs: Provide Azure Data Explorer Scaler (#658)
yardenoff Mar 14, 2022
76af269
Added documentation for the new GCP storage scaler (#660)
RamCohen Mar 14, 2022
ea58b16
Document GCP PodIdentity for PubSub contributed by (#614)
tomkerkhove Mar 14, 2022
5e88264
Datadog: add more information related to polling intervals that may a…
arapulido Mar 14, 2022
5c7acd0
Add new metricUnavailableValue (#710)
arapulido Mar 14, 2022
e502ae2
Update content/docs/2.7/scalers/aws-dynamodb.md
samueleresca Mar 17, 2022
526d462
Merge branch 'main' of https://github.com/kedacore/keda-docs into add…
samueleresca Mar 17, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
162 changes: 162 additions & 0 deletions content/docs/2.7/scalers/aws-dynamodb.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
+++
title = "AWS DynamoDB"
availability = "v2.7+"
maintainer = "Community"
description = "Scale applications based on the records count in AWS DynamoDB"
layout = "scaler"
go_file = "aws_dynamodb_scaler"
+++

### Trigger Specification

This specification describes the AWS DynamoDB scaler. This scaler uses a specified DynamoDB query to determine if and when to scale a given workload.

```yaml
triggers:
- type: aws-dynamodb
metadata:
# Required: awsRegion
awsRegion: "eu-west-1"
# Required: tableName
tableName: myTableName
# Required: targetValue
targetValue: "1"
# Required: expressionAttributeNames
expressionAttributeNames: '{ "#k" : "partition_key_name"}'
# Required: keyConditionExpression
keyConditionExpression: "#k = :key"
# Required: expressionAttributeValues
expressionAttributeValues: '{ ":key" : {"S":"partition_key_target_value"}}'
# Optional. Default: pod
identityOwner: pod | operator
```

**Parameter list:**

- `awsRegion` - AWS Region for the DynamoDB Table.
- `tableName` - The target table where the scaler execute the query.
- `targetValue` - The target value for the number of items retrieved by the query.
- `expressionAttributeNames` - one or more substitution tokens for attribute names in an expression. Defined as JSON.
- `keyConditionExpression` - the condition that specifies the key values for items to be retrieved by the Query action.
- `expressionAttributeValues` - one or more values that can be substituted in an expression. Defined as JSON.
- `identityOwner` - Receive permissions on the DynamoDB Table via Pod Identity or from the KEDA operator itself (see below). (Values: `pod`, `operator`, Default: `pod`, Optional)

> When `identityOwner` set to `operator` - the only requirement is that the KEDA operator has the correct IAM permissions on the DynamoDB Table. Additional Authentication Parameters are not required.

### Authentication Parameters

> These parameters are relevant only when `identityOwner` is set to `pod`.

You can use `TriggerAuthentication` CRD to configure the authenticate by providing either a role ARN or a set of IAM credentials.

**Pod identity based authentication:**

- `podIdentity.provider` - Needs to be set to either `aws-kiam` or `aws-eks` on the `TriggerAuthentication` and the pod/service account must be configured correctly for your pod identity provider.

**Role based authentication:**

- `awsRoleArn` - Amazon Resource Names (ARNs) uniquely identify AWS resource.

**Credential based authentication:**

- `awsAccessKeyID` - Id of the user.
- `awsSecretAccessKey` - Access key for the user to authenticate with.
- `awsSessionToken` - Session token, only required when using [temporary credentials](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html).

The user will need access to read properties from the specified AWS SQS queue.

### Example

#### Scaling a deployment using IAM Role


```yaml
apiVersion: v1
kind: Secret
metadata:
name: test-secrets
data:
AWS_ROLE_ARN: <encoded-iam-role-arn>
---
apiVersion: keda.sh/v1alpha1
kind: TriggerAuthentication
metadata:
name: keda-trigger-auth-aws-credentials
namespace: default
spec:
secretTargetRef:
- parameter: awsRoleArn # The property in KEDA.
name: test-secrets # The name of the kubernetes secret.
key: AWS_ROLE_ARN # The key from the kubernetes secret.
---
apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
name: aws-dynamodb-table-scaledobject
namespace: keda-test
spec:
scaleTargetRef:
name: nginx-deployment
triggers:
- type: aws-dynamodb
authenticationRef:
name: keda-trigger-auth-aws-credentials
metadata:
awsRegion: eu-west-2
tableName: keda-events
expressionAttributeNames: '{ "#k" : "event_type"}'
keyConditionExpression: "#k = :key"
expressionAttributeValues: '{ ":key" : {"S":"scaling_event"}}'
targetValue: "5"
```


#### Scaling a deployment using IAM Users

```yaml
apiVersion: v1
kind: Secret
metadata:
name: test-secrets
data:
AWS_ACCESS_KEY_ID: <encoded-user-id> # Required.
AWS_SECRET_ACCESS_KEY: <encoded-key> # Required.
AWS_SESSION_TOKEN: <encoded-session-token> # Required when using temporary credentials.
---
apiVersion: keda.sh/v1alpha1
kind: TriggerAuthentication
metadata:
name: keda-trigger-auth-aws-credentials
namespace: default
spec:
secretTargetRef:
- parameter: awsAccessKeyID # Required.
name: test-secrets # Required.
key: AWS_ACCESS_KEY_ID # Required.
- parameter: awsSecretAccessKey # Required.
name: test-secrets # Required.
key: AWS_SECRET_ACCESS_KEY # Required.
- parameter: awsSessionToken # Required when using temporary credentials.
name: test-secrets # Required when using temporary credentials.
key: AWS_SESSION_TOKEN # Required when using temporary credentials.
---
apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
name: aws-dynamodb-table-scaledobject
namespace: keda-test
spec:
scaleTargetRef:
name: nginx-deployment
triggers:
- type: aws-dynamodb
authenticationRef:
name: keda-trigger-auth-aws-credentials
metadata:
awsRegion: eu-west-2
tableName: keda-events
expressionAttributeNames: '{ "#k" : "event_type"}'
keyConditionExpression: "#k = :key"
expressionAttributeValues: '{ ":key" : {"S":"scaling_event"}}'
targetValue: "5"
```