First of my AWS project at hand~ I feel so happy to work with a great team! Thanks Vicky, Kyle and Dishi~ During the whole process, my responsibility is to build a connection from AWS to Google Bigquery. Here is my solution~
Requirements:
Try to get the Metadata from Google BigQuery by using AWS Lambda function
Build connection between AWS Lambda and Google BigQuery
Write Python code to get metadata from Google BigQuery
format the metadata schema
Solution
Get google-cloud-bigquery.zip Method 1
Instead of getting the GCP Layer via EC2 and Session, You can also download the zip file locally by running the following code
1 2
pip install google-cloud-bigquery -t ./python/ zip -r google-cloud-bigquery.zip python
Add the zip file to Lambda function as a layer from your local device
Get google-cloud-bigquery.zip Method 2
Create EC2 in AWS
create an EC2
Amazon Linux 2
free tier is enough- instance type: t2.micro
the IAM role grants only “Amazon EC2Role for SSM“ so that Session Manager of Systems Manager can connect to this EC2
leave the other options as default
Get AWS Access Key ID and Secret Access Key
Go to service “Identity and Access Management”
click “Users” and find your user name
click “Security credentials”
create access key and please remember that you can only view the credential once.