Skip to content

zubairwazir/aws-glue-sagemaker-notebook-terraform-example

 
 

Repository files navigation

AWS GLUE SAGEMAKER NOTEBOOK , A terraform example script

terraform-aws-lakeformation_glue_sagemaker_notebook

pre-commit

This terraform module creates a sagemaker notebook and it's associated Glue Dev Endpoint to access a table shared via lakeformation service.

Is this module versioned?

Yes. The module adheres to Semantic Versioning, by tagging commits on the master branch.

Pre-commit scripts

pre-commit config in the repo does the below things to maintain consistent coding guidelines and fix security issues.

  • terraform_fmt: Rewrites all terraform configuration files to a canonical format.
  • terraform_tflint: Validates all Terraform configuration files with TFLint.
  • terraform_tfsec: TFSec static analysis of terraform templates to spot potential security issues.
  • check-merge-conflict: Check for files that contain merge conflict strings.

Autoupdate pre-commit packages to their latest versions.

pre-commit autoupdate

To temporarily disable these checks, use git commit -m "commit_message" --no-verify or SKIP=terraform_fmt git commit -m "commit_message".

To get started

  • Run the dev dependencies using the below.
brew bundle
pre-commit install
  • If you don't have terraform installed already, do the below. Also, remember to set this version under required_version in versions.tf.
# Install the latest terraform version
tfenv install
# Use the version in the current workspace
tfenv use <x.y.z>

1. Create an IAM Role with below trust policy and AWS managed policies using the AWS Management Console

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "Service": [ "lakeformation.amazonaws.com", "glue.amazonaws.com", "sagemaker.amazonaws.com" ] }, "Action": "sts:AssumeRole" } ] }

a. AWSGlueServiceNotebookRole

b. AWSGlueServiceRole

c. AWSGlueConsoleSageMakerNotebookFullAccess

d. AWSGlueConsoleFullAccess

e. LakeFormationDataAccess

f. AWSGlueSchemaRegistryFullAccess

2

a. Terraform init

a. Terraform plan

a. Terraform apply

Security

See CONTRIBUTING for more information.

License

This library is licensed under the MIT-0 License. See the LICENSE file.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 69.7%
  • HCL 26.9%
  • Ruby 3.4%