aws glue tag-resource --resource-arn arn:aws:glue:eu-central-1:1234567890:job/windowTesting \
--tags-to-add '{"Account Name" : "DNS Dev"}'
$ aws glue get-tags --resource-arn arn:aws:glue:eu-central-1:1234567890:job/windowTesting
{
#!/usr/bin/env python | |
""" | |
mocking requests calls | |
""" | |
import mock | |
import unittest | |
import requests | |
from requests.exceptions import HTTPError |
# ssh key generator data source expects the below 3 inputs, and produces 3 outputs for use: | |
# "${data.external.ssh_key_generator.result.public_key}" (contents) | |
# "${data.external.ssh_key_generator.result.private_key}" (contents) | |
# "${data.external.ssh_key_generator.result.private_key_file}" (path) | |
data "external" "ssh_key_generator" { | |
program = ["bash", "${path.root}/../ssh_key_generator.sh"] | |
query = { | |
customer_name = "${var.customer_name}" | |
customer_group = "${var.customer_group}" |
#!/bin/bash -x | |
#Date: 21/7/2017 | |
#Author: Mohan | |
#Purpose: To upload files to AWS S3 via Curl | |
#Uploads file at the top level folder by default | |
#S3 parameters | |
S3KEY="XXXXXXXXXXX" | |
S3SECRET="XXXXXXXXXXXXXXXX" |
{ | |
"APIGatewayServiceRolePolicy": { | |
"Arn": "arn:aws:iam::aws:policy/aws-service-role/APIGatewayServiceRolePolicy", | |
"AttachmentCount": 0, | |
"CreateDate": "2019-10-22T18:22:01+00:00", | |
"DefaultVersionId": "v6", | |
"Document": { | |
"Statement": [ | |
{ | |
"Action": [ |
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "VisualEditor0", | |
"Effect": "Allow", | |
"Action": "ec2:RunInstances", | |
"Resource": [ | |
"arn:aws:ec2:us-east-2::instance/", | |
"arn:aws:ec2:us-east-2::network-interface/", |
$ terraform init | |
Initializing the backend... | |
Initializing provider plugins... | |
- Reusing previous version of hashicorp/aws from the dependency lock file | |
- Installing hashicorp/aws v3.23.0... | |
- Installed hashicorp/aws v3.23.0 (signed by HashiCorp) | |
//https://blog.bearer.sh/node-http-request/ | |
//https://nodejs.org/en/knowledge/HTTP/clients/how-to-create-a-HTTP-request/ | |
const http = require("http") | |
let body = JSON.stringify({ | |
title: "Make a request with Node's http module" | |
}) | |
let options = { |
AWSTemplateFormatVersion: 2010-09-09 | |
Description: My API Gateway and Lambda function | |
Parameters: | |
apiGatewayName: | |
Type: String | |
Default: my-api | |
apiGatewayStageName: | |
Type: String | |
AllowedPattern: "[a-z0-9]+" |
This shows how to convert a basic REST ApiGateway template to its equivalent HTTP ApiGatewayV2.
The original code before refactoring to ApiGatewayV2 comes from this article
Replace MY_PROFILE
, MY_REGION
and MY_STACK_NAME