Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 stack accompanies an article on my blog: https://blog.claude.nl/tech/manual/create-a-static-https-site-on-aws-with-cloudformation/ | |
AWSTemplateFormatVersion: 2010-09-09 | |
Description: Creates an https website | |
Metadata: {} | |
Parameters: | |
HostedZoneName: | |
Description: The HostedZoneName of the zone that you want to host the website on. This has to be in the same account, and has to be active (i.e. used as the DNS server for this domain). | |
Type: String |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
# Code accompanying https://blog.claude.nl/tech/howto/2021/02/15/better-lambdas-with-pip-packages-in-cloudformation.html | |
import json | |
import logging | |
import pathlib | |
import re | |
import subprocess as sp | |
import sys | |
import tempfile | |
import typing as t | |
import shutil |
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
# Run as "python getstack.py #filename#", it prints a filename on stdout that contains | |
# the stack in #filename# with some edits | |
# Useful in a commandline such as: | |
# aws cloudformation update-stack --stack-name MyStack --template-body file://$(python getstack.py stack/stack.yaml) --parameters ParameterKey=XXXX,ParameterValue=YYYY --capabilities CAPABILITY_IAM | |
# The following tags are supported | |
# Note that all filenames used are relative to the location of the file that contains | |
# the filename | |
# All files are expected to have utf-8 encoding |
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
# Note: this snippet needs to be placed in the Resources section of a CloudFormation template | |
# By default this will create a layer for the python version that the custom resource lambda is running in, so if you want | |
# a layer for python 3.6, just replace the runtime of the PipLayerLambda. | |
# This gist accomanies an article on my blog: https://blog.claude.nl/tech/howto/2021/02/10/aws-lambda-python-with-packages-through-pip-in-cloudformation.html | |
PipLayerLambdaRole: | |
Type: AWS::IAM::Role | |
Properties: | |
AssumeRolePolicyDocument: |