hands-on lab

Accessing Private VPC Resources Using AWS Lambda

Difficulty: Beginner
Duration: Up to 1 hour
Students: 79
Get guided in a real environmentPractice with a step-by-step scenario in a real, provisioned environment.
Learn and validateUse validations to check your solutions every step of the way.
See resultsTrack your knowledge and monitor your progress.

Description

AWS Lambda is a flexible, cost-effective, and scalable compute service available in the public AWS cloud. Among its many features, it supports being deployed into an existing Amazon Virtual Private Cloud (VPC). Doing so enables you to AWS Lambda functions to access non-publicly accessible VPC-hosted resources.

By learning how to deploy an AWS Lambda function into a private subnet, you will be able to build system architectures that use AWS Lambda and adhere to the principle of least privilege.

In this lab, you will create and implement a new AWS Lambda function in an existing Amazon VPC.

Learning Objectives

Upon completion of this beginner-level lab, you will be able to:

  • Create an AWS Lambda function in an Amazon VPC
  • Implement an AWS Lambda using Python
  • Use Amazon EventBridge to run your function on a schedule

Intended Audience

  • Candidates for the AWS Certified Developer Associate certification
  • Cloud Architects
  • DevOps Engineers
  • Software Engineers

Prerequisites

Familiarity with the following will be beneficial but is not required:

  • AWS Lambda
  • Amazon Virtual Private Cloud (VPC)
  • Amazon EventBridge

The following content can be used to fulfill the prerequisite:

Updates

  • May 31st, 2023: Updated instructions to utilize EventBridge Scheduler

Environment before

Environment after

Covered topics

Lab steps

Accessing Private VPC Resources Using AWS Lambda
Creating an AWS Lambda with VPC Networking
Connecting to the Virtual Machine using EC2 Instance Connect
Reimplementing the Scheduled Task
Scheduling Your AWS Lambda Function