[AWS Lab] VPC – Public Subnet

In this lab, we will learn how to create a public subnet and test it with an EC2 instance.

Overview

  • VPC
    • Create a VPC and a public subnet
  • EC2
    • Create an EC2 instance inside the public subnet
    • Setup the website in the EC2 instance using “httpd
    • Access the website via the public IP address of the EC2 instance
Continue reading “[AWS Lab] VPC – Public Subnet”

[Spark By Example] SparkSession

The following sample code (by Python and C#) shows how to use SparkSession.

SparkSession

  • SparkSession is an entry point to your spark application since Spark version 2.
  • SparkSession wraps all different contexts (SparkContext, SQLContext, HiveContext, …) to a single entry point.
  • You can create as many SparkSessions as you want.
  • In the Spark shell, such as PySpark shell, the SparkSession object (named as “spark”) is created for you.
  • In the application, you need to create a SparkSession object.
Continue reading “[Spark By Example] SparkSession”

[AWS Lab] Lambda – Environment Variables

In this lab, we will learn how to use environment variables in a Lambda function.

Overview

  • S3
    • Create a bucket
    • Upload an image file
  • Lambda – Function
    • Get the bucket name and the image name from environment variables
    • Retrieves the object properties
    • Python, boto3
Continue reading “[AWS Lab] Lambda – Environment Variables”