code: private boolean tagResource(String resourceId, String tagName) {
  		boolean result = false;
  		if(! Utils.isEmptyOrWhitespaces(tagName)) {
  			Tag tag = new Tag( "Name", tagName );
  			CreateTagsRequest ctr = new CreateTagsRequest(Collections.singletonList(resourceId), Arrays.asList( tag ));
  			try {
  				this.ec2Api.createTags( ctr );
  			} catch(Exception e) {
  				this.logger.warning("Error tagging resource " + resourceId + " with name=" + tagName + ": " + e);
  			}
  			result = true;
  		}
  		return result;
  	}
docs: Tags the specified resource, eg. a VM or volume (basically, it gives it a name).
  @param resourceId The ID of the resource to tag
  @param tagName The resource's name
  @return true if the tag was done, false otherwise