This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ssh -Nn -L 3306:localhost:3306 [email protected] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| echo test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| echo 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ssh -Nn -L 3306:localhost:3306 [email protected] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ssh -Nn -L 3306:172.16.16.200:3306 [email protected] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -N Do not execute a remote command. This is useful for just forwarding ports. | |
| -n Redirects stdin from /dev/null (actually, prevents reading from stdin). This must be used when ssh is run in the background. | |
| -L Specifies that connections to the given TCP port or Unix socket on the local (client) host are to be forwarded to the given host and port, or Unix socket, on the remote side. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Set the region where the lambda function will be created | |
| variable "aws_region" { | |
| default = "us-east-1" | |
| } | |
| # Assign the region to the provider in this case AWS | |
| provider "aws" { | |
| region = "${var.aws_region}" | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 'Hello World' nodejs6.10 runtime AWS Lambda function | |
| exports.handler = (event, context, callback) => { | |
| console.log('Hello world!'); | |
| callback(null, 'It works!'); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ terraform init | |
| Initializing provider plugins... | |
| - Checking for available provider plugins on https://releases.hashicorp.com... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ terraform apply | |
| data.archive_file.lambda_zip: Refreshing state... | |
| An execution plan has been generated and is shown below. | |
| Resource actions are indicated with the following symbols: | |
| + create | |
| Terraform will perform the following actions: | |
| + aws_iam_role.iam_for_lambda_tf |