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
| data "external" "generate_priority_80" { | |
| program = [ | |
| "python3", | |
| "${path.module}/../helpers/alb_priority/generate_priority.py"] | |
| query { | |
| listener_arn = "${aws_alb_listener.test123-listener-80.arn}" | |
| region = "eu-central-1" | |
| component = "${aws_alb_listener_rule.test_rule_80.arn}" | |
| } | |
| } |
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 boto3 | |
| import logging | |
| import json | |
| import os | |
| import smart_open | |
| import requests | |
| from botocore.exceptions import ClientError, ParamValidationError |
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 json | |
| import mock | |
| import os | |
| import pytest | |
| import responses | |
| import requests | |
| from moto import mock_dynamodb2 |
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
| #!/bin/bash | |
| set -e | |
| function cleanup { | |
| echo "Cleaning up..." | |
| rm -rf .pytest_cache __pycache__ *.pyc | |
| } | |
| ENV=$1 |
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: A lambda to upload to S3 | |
| Parameters: | |
| Environment: | |
| Type: String | |
| AllowedValues: | |
| - dev | |
| - staging | |
| - 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
| import pytest | |
| import boto3 | |
| from botocore.exceptions import ClientError, ParamValidationError | |
| from moto import mock_dynamodb2 | |
| from dynamodb_get_item import get_from_dynamodb | |
| @mock_dynamodb2 | |
| def test_get_from_dynamodb(): |
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 | |
| from botocore.exceptions import ClientError, ParamValidationError | |
| dynamodb2 = boto3.resource('dynamodb') | |
| def get_from_dynamodb(table, key): | |
| try: |
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
| #!/bin/bash | |
| aws dynamodb create-table \ | |
| --table-name SanAntonioSpurs \ | |
| --attribute-definitions AttributeName=PlayerName,AttributeType=S AttributeName=JerseyNumber,AttributeType=N \ | |
| --key-schema AttributeName=PlayerName,KeyType=HASH AttributeName=JerseyNumber,KeyType=RANGE \ | |
| --provisioned-throughput ReadCapacityUnits=5,WriteCapacityUnits=5 | |
| aws dynamodb put-item --table-name SanAntonioSpurs --item "{\"PlayerName\":{\"S\":\"Manu Ginobili\"},\"JerseyNumber\":{\"N\":\"20\"}, \"Position\":{\"S\":\"Shooting Guard\"}}" |
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
| package main | |
| import ( | |
| "fmt" | |
| "github.com/aws/aws-sdk-go/aws" | |
| "github.com/aws/aws-sdk-go/aws/session" | |
| "github.com/aws/aws-sdk-go/service/dynamodb" | |
| "github.com/aws/aws-sdk-go/service/dynamodb/dynamodbattribute" | |
| "github.com/aws/aws-sdk-go/service/dynamodb/dynamodbiface" |
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
| package main | |
| import ( | |
| "fmt" | |
| "testing" | |
| "github.com/aws/aws-sdk-go/aws" | |
| "github.com/aws/aws-sdk-go/service/dynamodb" | |
| "github.com/aws/aws-sdk-go/service/dynamodb/dynamodbiface" | |
| "github.com/stretchr/testify/assert" |
OlderNewer