Skip to content

Instantly share code, notes, and snippets.

@thoughtspeed7
Created September 23, 2022 12:10
Show Gist options
  • Save thoughtspeed7/23fd54464d7d2ad79388211ef90ee44f to your computer and use it in GitHub Desktop.
Save thoughtspeed7/23fd54464d7d2ad79388211ef90ee44f to your computer and use it in GitHub Desktop.
AWS Glue - Ingest Data From External REST APIs Into Amazon S3
import requests
import boto3
import json
def main():
data = requests.get('https://dummyjson.com/products').json()
s3_client = boto3.client('s3')
s3_client.put_object(Body=json.dumps(data), Bucket='aws-glue', Key='products.json')
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment