dynamodb表字段字节大小的解决方法

时间:2019-03-29 14:15:23

标签: boto3

我正在将列表插入到dynamodb表中,但出现以下错误:“ errorMessage”:“调用PutItem操作时发生错误(ValidationException):一个或多个参数值无效:所有范围键的总大小超过了1024个字节的大小限制”。

这就是我要插入的政策: {'版本':'2012-10-17','声明':[{'动作':['直接连接:','ec2:AcceptVpcEndpointConnections','ec2:AcceptVpcPeeringConnection','ec2:AssociateDhcpOptions', 'ec2:AssociateRouteTable','ec2:AssociateSubnetCidrBlock','ec2:AssociateVpcCidrBlock','ec2:AttachClassicLinkVpc','ec2:AttachInternetGateway','ec2:AttachVpnGateway','ec2:CreateCustomerGate' :CreateDefaultVpc','ec2:CreateDhcpOptions','ec2:CreateEgressOnlyInternetGateway','ec2:CreateFlowLogs','ec2:CreateInternetGateway','ec2:CreateNatGateway','ec2:CreateNetworkAcl','ec2:CreateNetworkAclEntry','ec2:CreateRoute ','ec2:CreateRouteTable','ec2:CreateSubnet','ec2:CreateVpc','ec2:CreateVpcEndpoint','ec2:CreateVpcEndpointConnectionNotification','ec2:CreateVpcEndpointServiceConfiguration','ec2:CreateVpcPeeringConnection','ec2:CreateVpnConnection', 'ec2:CreateVpnConnectionRoute','ec2:CreateVpnGateway','ec2:DeleteCustomerGateway','ec2:DeleteDhcpOptions','ec2:DeleteEgressOn lyInternetGateway”,“ ec2:DeleteFlowLogs”,“ ec2:DeleteInternetGateway”,“ ec2:DeleteNatGateway”,“ ec2:DeleteNetworkAcl”,“ ec2:DeleteNetworkAclEntry”,“ ec2:DeleteRoute”,“ ec2:DeleteRouteTable”,“ Subnet2” ,'ec2:DeleteVpc','ec2:DeleteVpcEndpoints','ec2:DeleteVpcEndpointConnectionNotifications','ec2:DeleteVpcEndpointServiceConfigurations','ec2:DeleteVpcPeeringConnection','ec2:DeleteVpnConnection','ec2:DeleteVpnGateway','ec2:DeleteVpnGateway', ec2:DetachClassicLinkVpc','ec2:DetachInternetGateway','ec2:DetachVpnGateway','ec2:DisableVgwRoutePropagation','ec2:DisableVpcClassicLink','ec2:DisableVpcClassicLinkDnsSupport','ec2:DisassociateSubCateC',' DisassociateVpcCidrBlock','ec2:EnableVgwRoutePropagation','ec2:EnableVpcClassicLink','ec2:EnableVpcClassicLinkDnsSupport','ec2:ModifySubnetAttribute','ec2:ModifyVpcAttribute','ec2:ModifyVpcEndpointNot','ec2:配置'',``ec2:ModifyVpcEndpointServicePermissions'',``ec2:ModifyVpcPeeringConnectionOptions'',``ec2:ModifyVpcTenancy'',``ec2:MoveAddressToVpc'',``ec2:RejectVpcEndpointConnections'',``ec2:RejectVpcPeeringConnection'',``ec2:ReplaceNetworkAclAssociation'' ,'ec2:ReplaceRoute','ec2:ReplaceRouteTableAssociation'],'Resource':'','Effect':'Deny','Sid':'sfDenyNetworkActions'}]}}

这是我的代码: dynamodb.put_item(TableName = backupTable_name,Item =     {

    'Arn':{'S':arn},
    'Policy': {'S':str(policy)},
})    

是否有解决方法?

0 个答案:

没有答案