The 17 Sustainable Development Goals (SDGs) established by the United Nations Agenda 2030 constitute a global blueprint agenda and instrument for peace and prosperity worldwide. Artificial intelligence and other digital technologies that have emerged in the last years, are being currently applied in virtually every area of society, economy and the environment. Hence, it is unsurprising that their current role in the pursuance or hampering of the SDGs has become critical. This study aims at providing a snapshot and comprehensive view of the progress made and prospects in the relationship between artificial intelligence technologies and the SDGs. A comprehensive review of existing literature has been firstly conducted, after which a series SWOT (Strengths, Weaknesses, Opportunities and Threats) analyses have been undertaken to identify the strengths, weaknesses, opportunities and threats inherent to artificial intelligence-driven technologies as facilitators or barriers to each of the SDGs. Based on the results of these analyses, a subsequent broader analysis is provided, from a position vantage, to (i) identify the efforts made in applying AI technologies in SDGs, (ii) pinpoint opportunities for further progress along the current decade, and (iii) distill ongoing challenges and target areas for important advances. The analysis is organized into six categories or perspectives of human needs: life, economic and technological development, social development, equality, resources and natural environment. Finally, a closing discussion is provided about the prospects, key guidelines and lessons learnt that should be adopted for guaranteeing a positive shift of artificial intelligence developments and applications towards fully supporting the SDGs attainment by 2030.