Skip to main content

Posts

Showing posts from May, 2022

Perform Foundational Infrastructure Tasks in Google Cloud: Challenge Lab [GSP315]

Link to the Lab: https://www.qwiklabs.com/focuses/10379?parent=catalog Link to the video:   https://youtu.be/ypbGzTmMUb4 Link to the channel:  https://www.youtube.com/channel/UCiWP5KYh4MWj-yp3j-DMIrA STEPS Task 1 Go to cloud storage Make a bucket with the bucket name given < Bucket Name > Task 2 GO TO PUB/SUB  Name = < Topic Name > Task 3 GO TO CLOUD FUNCTIONS create cloud functions name = < Cloud Function Name > region = us-east1 Trigger type = cloud storage Event type = Finalize/create Select the bucket you made earlier done next entry point = thumbnail index.js: /* globals exports, require */ //jshint strict: false //jshint esversion: 6 "use strict"; const crc32 = require("fast-crc32c"); const { Storage } = require('@google-cloud/storage'); const gcs = new Storage(); const { PubSub } = require('@google-cloud/pubsub'); const imagemagick = require("imagemagick-stream"); exports.thumbnail = (event, context) =>