Amazon.com Inc. is investing $2 billion on “sustainable and decarbonizing technologies” in an effort to eliminate its carbon footprint.