In the AWS SDK for Go V2, you can configure common settings for service clients, such as the logger, log level, and retry configuration. Most settings are optional. However, for each service client, you must specify an AWS Region and your credentials. The SDK uses these values to send requests to the correct Region and sign requests with the correct credentials. You can specify these values as programmatically in code, or via the execution environment.
config.LoadDefaultConfig(context.TODO()) will construct an aws.Config using the AWS shared configuration sources. This includes configuring a credential provider, configuring the AWS Region, and loading service specific configuration. Service clients can be constructed using the loaded aws.Config, providing a consistent pattern for constructing clients.
Moving ahead, ExecuteStatement API operation for Amazon DynamoDB.
func (c *DynamoDB) ExecuteStatement(input *ExecuteStatementInput) (*ExecuteStatementOutput, error)
This operation allows you to perform reads and singleton writes on data stored in DynamoDB, using PartiQL.
For PartiQL reads (SELECT statement), if the total number of processed items exceeds the maximum dataset size limit of 1 MB, the read stops and results are returned to the user as a LastEvaluatedKey value to continue the read in a subsequent operation. If the filter criteria in WHERE clause does not match any data, the read will return an empty result set.
A single SELECT statement response can return up to the maximum number of items (if using the Limit parameter) or a maximum of 1 MB of data (and then apply any filtering to the results using WHERE clause). If LastEvaluatedKey is present in the response, you need to paginate the result set.
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Amazon DynamoDB's API operation ExecuteStatement for usage and error information.
GO SDK V2 - configure STS client enpoint urlasked 5 months ago
How to pull a list of items from a DynomoDB table without using primary key in Go.
Question about writing a Cognito post-auth lambda in goAccepted Answerasked 6 months ago
Cognito - CustomSMSSender InvalidCiphertextException: null on Code Decrypt (Golang)asked a year ago
DynamoDB response time on a simple PartiQL queryAccepted Answerasked 4 months ago
AWS Dynamodb - PartiQLasked 6 months ago
Using PartiQL with DAX client for dynamodbAccepted Answerasked 7 months ago
How to Add Filter in DynamoDB Query with Number Set using Java SDK/PartiQL?Accepted Answerasked 6 months ago
How do I use config.LoadDefaultConfig() for a partiql query for dynamodb in go?
Can we query first n rows from DynamoDB using PartiQL?asked a month ago