Skip to content

Instantly share code, notes, and snippets.

"""
Create SNS Subscription for a give topic with a variable length of subscriptions to create, better than making api calls
"""
from stacker.blueprints.base import Blueprint
from troposphere.sns import SubscriptionResource, Topic
from troposphere.ecr import Repository, LifecyclePolicy
from awacs.aws import Allow, PolicyDocument, AWSPrincipal, Statement
import awacs.ecr as ecr
import awacs.iam as iam
from troposphere import Tags
@josjaf
josjaf / RoleB
Created September 4, 2019 16:37
from aws_cdk import (
aws_iam as aws_iam,
aws_s3 as aws_s3,
aws_ecr,
aws_ec2,
core,
)
@josjaf
josjaf / Role
Created September 3, 2019 13:32
from aws_cdk import (
aws_iam as aws_iam,
aws_s3 as aws_s3,
aws_ecr,
aws_ec2,
core,
)
@josjaf
josjaf / cross
Created September 3, 2019 00:41
from aws_cdk import (
aws_iam as aws_iam,
aws_s3 as aws_s3,
core,
)
from RoleA import Compute
from aws_cdk import (
aws_iam as aws_iam,
aws_s3 as aws_s3,
aws_ecr,
aws_codebuild,
aws_codepipeline,
aws_codepipeline_actions,
aws_s3,
core,
@josjaf
josjaf / SG
Created August 20, 2019 19:26
from aws_cdk import (
aws_iam as aws_iam,
aws_s3 as aws_s3,
aws_ecr,
aws_ec2,
core,
)
from aws_cdk import (
aws_iam as aws_iam,
aws_s3 as aws_s3,
aws_ecr,
aws_codebuild,
core,
)
from aws_cdk import (
aws_iam as aws_iam,
aws_s3 as aws_s3,
core,
)
from aIAMRole import IAMRole
from Build import Base
codebuild_docker_build_aardvark = aws_codebuild. \
PipelineProject(self, "CodebuildDockerBuildAardvark",
project_name=f"{shared_params['namespace']}-Docker-Build-Aardvark",
build_spec=aws_codebuild.BuildSpec.from_source_filename(
filename='pipeline_delivery/aardvark_buildspec.yml'),
environment=aws_codebuild.BuildEnvironment(
privileged=True,
# build_image='LinuxBuildImage.STANDARD_1_0',
),
@josjaf
josjaf / cdk.out
Last active August 15, 2019 21:56
cdkout
{
"Resources": {
"CodepipelineRole3288BFBB": {
"Type": "AWS::IAM::Role",
"Properties": {
"AssumeRolePolicyDocument": {
"Statement": [
{
"Action": "sts:AssumeRole",
"Effect": "Allow",