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
| import * as apigateway from '@aws-cdk/aws-apigateway' | |
| import * as iam from '@aws-cdk/aws-iam' | |
| const whitelistedIps = ['8.8.8.8','12.123.124.21'] | |
| const apiResourcePolicy = new iam.PolicyDocument({ | |
| statements: [ | |
| new iam.PolicyStatement({ | |
| actions: ['execute-api:Invoke'], |
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
| from aws_cdk import ( | |
| core as cdk, | |
| aws_rds as rds, | |
| aws_ec2 as ec2, | |
| aws_secretsmanager as secretsmanager | |
| ) | |
| class IngressStack(cdk.Stack): |
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
| from __future__ import print_function # Python 2/3 compatibility | |
| import boto3 | |
| import json | |
| import decimal | |
| from boto3.dynamodb.conditions import Key, Attr | |
| # Helper class to convert a DynamoDB item to JSON. | |
| class DecimalEncoder(json.JSONEncoder): | |
| def default(self, o): | |
| if isinstance(o, decimal.Decimal): |
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
| --- | |
| AWSTemplateFormatVersion: '2010-09-09' | |
| Transform: AWS::Serverless-2016-10-31 | |
| Description: AWS SAM template with API defined | |
| Resources: | |
| ApiGatewayApi: | |
| Type: AWS::Serverless::Api | |
| Properties: | |
| StageName: Prod |
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
| #!groovy | |
| import groovy.json.JsonOutput | |
| import groovy.json.JsonSlurper | |
| def label = "mypod-${UUID.randomUUID().toString()}" | |
| podTemplate(label: label, yaml: """ | |
| spec: | |
| containers: | |
| - name: mvn | |
| image: maven:3.3.9-jdk-8-alpine |