With help from @bosco , I was able to figure it out. Below is the working code:
//get archived posts per year
add_shortcode( 'archived-posts', 'archived_posts' );
function archived_posts($atts) {
$a = shortcode_atts( array( 'year' => date('Y') ), $atts );
$q = new WP_Query(array(
'post_type' => 'post',
'posts_per_page' => -1 ,
'post_status' => 'archive' ,
'year' => $a['year'],
));
while ($q->have_posts()) {
$q->the_post();
$buffer .= '<div class="archived-post-item"><a href="'.get_permalink().'">'.get_the_title().'</a></div>';
}
wp_reset_postdata();
return $buffer;
}