You can make @index
updates on one "amplify push". Under the hood, Amplify CLI needs to locally sequence multiple individual deployments to your DynamoDB table because each Global Secondary Index (GSI), managed by @index
, change requires time to create the new index.
If your deployment fails locally when updating multiple GSIs, you'll have the ability to run:
amplify push --iterative-rollback
to rollback the last-known-good stateamplify push --force
to rollback the last-known-good state and try redeploying your changes again using.Attempting to mutate more than 1 global secondary index at the same time.
If you're running into the error above during amplify push
, it is likely that you don't have this feature enabled. To enable multiple GSI updates, set the "enableIterativeGsiUpdates" feature flag to true in your amplify/cli.json
file.
When you add @searchable
to a @model
type with existing data, then you need to backfill the OpenSearch index. Download the following Python script to help you backfill your OpenSearch index:
DynamoDB to OpenSearch backfill script
The script creates an event stream of your DynamoDB records and sends them to your OpenSearch Index. Execute the script with the following parameters to initiate the backfill:
In the example below, the Post
table data in us-west-2
gets backfilled in the OpenSearch index.
When you add an @index
directive with 2 or more sort key fields, you will need to backfill the new composite sort key for existing data. With @index(sortKeyFields: ["status", "date"])
, you will need to backfill the status#date
field with composite key values made up of each object's status
and date
fields joined by a #
. You do not need to backfill data for @index
directives with zero to one sort key field(s).
If you have increased the soft limit of GSI per table in DynamoDB beyond 20, then iterative deployments will fail with the following warning.
DynamoDB <Table Name> can have max of 20 GSIs.
To disable this check, use the --disable-gsi-limit-check option.
In order to disable this behavior, update your deploy scripts or ci commands to include the --disable-gsi-limit-check
option to circumvent this validation during pushes.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4