Skip to content

Instantly share code, notes, and snippets.

Table table = dynamoDB.getTable("Table Name");
Map<String, String> consultee = new HashMap<>();
UpdateItemSpec updateItemSpec = new UpdateItemSpec().withPrimaryKey("eventId",eventId)
.withUpdateExpression("set #consultees = list_append(if_not_exists(consultees, :empty_consultees), :consultees) , #url = :url")
.withNameMap(new NameMap().with("#consultees", "consultees").with("#url","url"))
.withValueMap(new ValueMap().withList(":consultees", Arrays.asList(consultee)).withList(":empty_consultees", Arrays.asList()).withString(":url",url)).withReturnValues(ReturnValue.ALL_NEW);
UpdateItemOutcome outcome = table.updateItem(updateItemSpec);
function getItem(){
const params = {
TableName: "",
Key:{
id: ""
},
ProjectionExpression:"#role",
ExpressionAttributeNames:{
'#role':'role'
}
@supun19
supun19 / README.md
Created April 28, 2018 02:12 — forked from nicerobot/README.md
Mac OS X uninstall script for packaged install of node.js

To run this, you can try:

curl -ksO https://gist.githubusercontent.com/nicerobot/2697848/raw/uninstall-node.sh
chmod +x ./uninstall-node.sh
./uninstall-node.sh
rm uninstall-node.sh
@supun19
supun19 / aws
Created November 9, 2017 11:16
M
//echo varible value
eval $${varible_name}