Skip to content

Latest commit

 

History

History
91 lines (69 loc) · 2.59 KB

plugin-aws-dynamodb.adoc

File metadata and controls

91 lines (69 loc) · 2.59 KB

AWS DynamoDB Plugin

The plugin provides functionality to interact with Amazon DynamoDB.

Cross-account Access

Cross-account access is achieved by switching roles. Use the following property to specify the Amazon Resource Name (ARN) of the role to assume:

aws.dynamodb.role-arn=

The property is empty by default: no role is assumed.

Steps

Querying Data

Execute PartiQL SELECT statement and save the result as JSON to the specified variable.

When I execute query `$partiqlQuery` against DynamoDB and save result as JSON to $scopes variable `$variableName`
  • $partiqlQuery - The PartiQL (A SQL-Compatible Query Language for Amazon DynamoDB) query representing the SELECT statement to execute.

  • $scopes - The comma-separated set of the variables scopes.

  • $variableName - The variable name to store results in JSON format.

Execute SELECT statement and validate result
When I execute query `
    SELECT * FROM Music
    WHERE Artist='Roxette' and SongTitle='The Look'
` against DynamoDB and save result as JSON to scenario variable `song`
Then JSON element from `${song}` by JSON path `$` is equal to `
{
    "Artist": "Roxette",
    "SongTitle": "The Look"
}`

Manipulating Data

Execute PartiQL INSERT, UPDATE, DELETE statements.

When I execute query `$partiqlQuery` against DynamoDB
  • $partiqlQuery - The PartiQL (A SQL-Compatible Query Language for Amazon DynamoDB) query representing the INSERT, UPDATE or DELETE statement to execute.

Execute INSERT statement
When I execute query `
    INSERT INTO Music
    value {'Artist':'Roxette','SongTitle':'The Look'}
` against DynamoDB
Execute UPDATE statement
When I execute query `
    UPDATE Music
    SET AwardsWon=1
    SET AwardDetail={'Grammis':[1989, 1990]}
    WHERE Artist='Roxette' and SongTitle='The Look'
` against DynamoDB
Execute DELETE statement
When I execute query `
    DELETE FROM Music
    WHERE Artist='Roxette' and SongTitle='The Look'
` against DynamoDB