API Reference

PREVIEW DOCUMENTATION - This is a preview of a new format for the AWS SDK for Go API Reference documentation. For the current AWS SDK for Go API Reference, see

We welcome your feedback on this new version of the documentation. Send your comments to


import ""

func AttributeType(nameBuilder NameBuilder, attributeType DynamoDBAttributeType) ConditionBuilder

AttributeType returns a ConditionBuilder representing the result of the attribute_type function in DynamoDB Condition Expressions. The DynamoDB types are represented by the type DynamoDBAttributeType. The resulting ConditionBuilder can be used as a part of other Condition Expressions or as an argument to the WithCondition() method for the Builder struct.


// condition represents the boolean condition of whether the item // attribute "Age" has the DynamoDB type Number or not condition := expression.AttributeType(expression.Name("Age"), expression.Number) // Used in another Condition Expression anotherCondition := expression.Not(condition) // Used to make an Builder builder := expression.NewBuilder().WithCondition(condition)

Expression Equivalent:

expression.AttributeType(expression.Name("Age"), expression.Number) // Let :type be an ExpressionAttributeValue representing the value "N" "attribute_type (Age, :type)"


NameBuilder represents a name of a top level item attribute or a nested attribute. Since NameBuilder represents a DynamoDB Operand, it implements the OperandBuilder interface. Methods and functions in the package take NameBuilder as an argument and establishes relationships between operands. NameBuilder should only be initialized using the function Name().


// Create a NameBuilder representing the item attribute "aName" nameBuilder := expression.Name("aName")

DynamoDBAttributeType specifies the type of an DynamoDB item attribute. This enum is used in the AttributeType() function in order to be explicit about the DynamoDB type that is being checked and ensure compile time checks. More Informatin at


ConditionBuilder represents Condition Expressions and Filter Expressions in DynamoDB. ConditionBuilders are one of the building blocks of the Builder struct. Since Filter Expressions support all the same functions and formats as Condition Expressions, ConditionBuilders represents both types of Expressions. More Information at: More Information on Filter Expressions:

On this page: