This file contains 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
# | |
# This is the config file used for the docker images. | |
# It allows all users to do anything, so don't use it on production systems. | |
# | |
# Do not configure host and port under `listen` in this file | |
# as it will be ignored when using docker. | |
# see https://github.com/verdaccio/verdaccio/blob/master/wiki/docker.md#docker-and-custom-port-configuration | |
# | |
# Look here for more config file examples: | |
# https://github.com/verdaccio/verdaccio/tree/master/conf |
This file contains 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
#!/usr/bin/env bash | |
# See: https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html | |
# Set DEBUG to true for enhanced debugging: run prefixed with "DEBUG=true" | |
# Credits: https://github.com/ModusCreateOrg/devops-infra-demo | |
${DEBUG:-false} && set -o verbose; set -o xtrace | |
# Set CHECK to true to check script for syntax errors. | |
${CHECK:-false} && set -o noexec |
This file contains 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
$ aws apigateway test-invoke-method \ | |
--rest-api-id 3obl3k5ugh \ | |
--resource-id 5z8bpy \ | |
--http-method GET \ | |
--path-with-query-string '/test/path?key1=val1&key2=val2&key3=val3' |
This file contains 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
$ curl \ | |
-X GET \ | |
-s \ | |
-w "%{url_effective}\n%{http_code}\n%{redirect_url}" \ | |
"https://3obl3k5ugh.execute-api.us-east-1.amazonaws.com/Prod/test/path?key1=val1&key2=val2&key3=val3" |
This file contains 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
$ curl \ | |
-X GET \ | |
-s \ | |
-w "%{url_effective}\n%{http_code}\n%{redirect_url}" \ | |
"https://3obl3k5ugh.execute-api.us-east-1.amazonaws.com/Prod" | |
https://3obl3k5ugh.execute-api.us-east-1.amazonaws.com/Prod | |
302 |
This file contains 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
$ aws cloudformation package \ | |
--template-file app_spec.yml \ | |
--output-template-file packaged.yml \ | |
--s3-bucket MyRedirectorBucket | |
Successfully packaged artifacts and wrote output template to file packaged.yml. | |
Execute the following command to deploy the packaged template | |
aws cloudformation deploy --template-file /home/housni/modus-create/lambda-redirector/packaged.yml --stack-name <YOUR STACK NAME> | |
$ aws cloudformation deploy \ | |
--template-file packaged.yml \ | |
--stack-name Redirector \ |
This file contains 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
--- | |
AWSTemplateFormatVersion: '2010-09-09' | |
Transform: AWS::Serverless-2016-10-31 | |
Parameters: | |
HTTPResponse: | |
Type: Number | |
Default: 302 | |
AllowedValues: [301, 302] | |
Description: "The HTTP response status code." | |
NewDomain: |
This file contains 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
$ curl \ | |
-X GET \ | |
-s \ | |
-w "%{url_effective}\n%{http_code}\n%{redirect_url}" \ | |
"https://3obl3k5ugh.execute-api.us-east-1.amazonaws.com/Prod" | |
https://3obl3k5ugh.execute-api.us-east-1.amazonaws.com/Prod | |
301 | |
http://example.org |
This file contains 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
$ aws cloudformation package \ | |
--template-file app_spec.yml \ | |
--output-template-file packaged.yml \ | |
--s3-bucket MyRedirectorBucket | |
Successfully packaged artifacts and wrote output template to file packaged.yml. | |
Execute the following command to deploy the packaged template | |
aws cloudformation deploy --template-file /home/housni/modus-create/lambda-redirector/packaged.yml --stack-name <YOUR STACK NAME> | |
$ aws cloudformation deploy \ |
This file contains 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
--- | |
AWSTemplateFormatVersion: '2010-09-09' | |
Transform: AWS::Serverless-2016-10-31 | |
Resources: | |
GetFunction: | |
Type: AWS::Serverless::Function | |
Properties: | |
Description: "Handles GET requests." | |
Handler: get.handler | |
Runtime: nodejs6.10 |
NewerOlder