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
| var isError; | |
| exports.handler = function (event, context, callback) { | |
| isError = false; | |
| console.log('Running index.handler'); | |
| console.log('=================================='); | |
| console.log('event', event); | |
| console.log('=================================='); | |
| testRepo(callback); | |
| }; |
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 re | |
| # Returns a tuple (subdomain, path) to match in handler | |
| def process_uri(uri): | |
| pattern_all = re.compile('/(python|rest|r)/?(.*)') | |
| m = pattern_all.match(uri) | |
| if (m != None): | |
| return m.group(1, 2) | |
| else: |
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 logging | |
| import boto3 | |
| def requires_indexing(client, domain_name): | |
| req_indexing = False | |
| response = client.describe_domains(DomainNames=[domain_name]) | |
| if (response != None and response['DomainStatusList'] != None): | |
| domain_status_list = response['DomainStatusList'] | |
| if (len(domain_status_list) == 1): | |
| domain_status = domain_status_list[0] |
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
| 'use strict'; | |
| exports.handler = (event, context, callback) => { | |
| const response = event.Records[0].cf.response; | |
| const headers = response.headers; | |
| const cacheControlHeader = 'Cache-Control'; | |
| const expiresHeader = 'Expires'; | |
| const pragmaHeader = 'Pragma'; | |
| const noCachePragmaValue = 'no-cache'; | |
| const noCacheValue = 'no-cache, max-age=0, must-revalidate, pre-check=0, post-check=0'; |
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 https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/quickref-s3.html#scenario-s3-bucket-website-customdomain | |
| AWSTemplateFormatVersion: 2010-09-09 | |
| Description: >- | |
| Provision a S3 static website (HTTPS) with cloudfront for a SageBionetworks Portal | |
| #Transform: S3Objects | |
| Parameters: | |
| DomainName: | |
| Description: Domain name for your website (example.org) | |
| Type: String | |
| AllowedPattern: (?!-)[a-zA-Z0-9-.]{1,63}(?<!-) |
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 | |
| Description: >- | |
| Provision EC2 instance running Qualys scanner + associated role for auditor | |
| Parameters: | |
| AuditorAccountId: | |
| Description: AccountId of auditor | |
| Type: String | |
| AuditorStsExternalId: | |
| Description: ExternalId of auditor | |
| Type: String |
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 | |
| Description: Basics for Beanstalk Datawarehouse | |
| Parameters: | |
| DwEbAppName: | |
| Description: Elastic Beanstalk Datawarehouse Application Name | |
| Type: String | |
| Default: 'beanstalk-dw' | |
| DwAppDeployBucket: | |
| Description: Bucket where beanstalk deploys apps from | |
| Type: String |
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
| Description: AWS CloudFormation template to create an RDS instance for the warehouse workers build | |
| Parameters: | |
| DBAllocatedStorage: | |
| Default: '5' | |
| Description: The size of the database (Gb) | |
| Type: Number | |
| DBClass: | |
| Default: db.t2.large | |
| Description: Database instance class | |
| Type: String |
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 jenkins/jenkins:lts | |
| LABEL maintainer="[email protected]" | |
| USER root | |
| # Basic deps | |
| RUN apt update && apt install -y apt-transport-https curl software-properties-common python3-pip groff | |
| # To install latest versions | |
| RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - |
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
| Description: AWS CloudFormation template to create an RDS instance for the warehouse workers build | |
| Parameters: | |
| DBAllocatedStorage: | |
| Default: '5' | |
| Description: The size of the database (Gb) | |
| Type: Number | |
| DBClass: | |
| Default: db.t2.micro | |
| Description: Database instance class | |
| Type: String |
NewerOlder