我想将数据插入到dynamodb local中.但是,我只有一个键属性和多个非键属性.
{
'id':'99876983ydbhdu3739',
'category':'Spa',
'latitude':'33.498',
'longitude':'32.332',
'name':'Studio'
}
Run Code Online (Sandbox Code Playgroud)
我有多个这样的价值观.这是一条记录,是我想插入的一个例子.以下是我的尝试:
table = dynamodb.create_table(
TableName='Trial',
KeySchema=[
{
'AttributeName': 'facebook_id',
'KeyType': 'HASH' #Sort key
},
{
'AttributeName': 'latitude',
'KeyType': 'RANGE' #Sort key
},
],
AttributeDefinitions=[
{
'AttributeName':'id',
'AttributeType':'S'
},
{
'AttributeName': 'category',
'AttributeType': 'S'
},
{
'AttributeName': 'latitude',
'AttributeType': 'S'
},
{
'AttributeName': 'longitude',
'AttributeType': 'S'
},
{
'AttributeName': 'name',
'AttributeType':'S'
}
],
ProvisionedThroughput={
'ReadCapacityUnits': 10,
'WriteCapacityUnits': 10
}
)
Run Code Online (Sandbox Code Playgroud)
我收到以下错误:
调用CreateTable操作时发生错误(ValidationException):密钥模式中的属性数必须与属性定义中定义的属性数相匹配.
我们正在尝试使用Kubernetes实现Apache Presto。我们有一个在云上作为服务运行的kubernetes集群。我尝试在Google上进行搜索,但是无法找到关于使用Kubernetes部署Presto的最佳实践的最终结果。虽然存在Presto的官方github-但无济于事。以下是我要寻求答案的两个问题:
我想启动一个 ec2 实例。我面临的挑战是我需要为此实例配置安全组,并且我希望只允许来自自动缩放组的实例访问它。在这种情况下如何设置入站,因为来自 Auto Scale 的实例会有所不同?