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 Gist collection contains all localstack related examples | |
################## ############################# | |
################## ############################# | |
############################################################################################################ |
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
1) Start consul cluster - | |
# consul agent -server -bootstrap-expect=1 -data-dir=consul-data -ui -bind=127.0.0.1 | |
2) put key-values | |
# consul kv put config/key value | |
3) get key-values - | |
# consul kv get config/key | |
4) get keys from consul with host and acl-token(Your own hosted consul) - |
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 Gist collection contains all scripts for python | |
################## ############################# | |
################## ############################# | |
############################################################################################################ |
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
## dependency | |
<dependency> | |
<groupId>io.swagger</groupId> | |
<artifactId>swaggerhub-maven-plugin</artifactId> | |
<version>1.0.8</version> | |
</dependency> | |
## plugin | |
<plugin> | |
<groupId>io.swagger</groupId> |
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
======================================================================================================= | |
======================================================================================================= | |
All-about-reactive-programming-java | |
======================================================================================================= | |
======================================================================================================= |
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
=========================================================================================================================== | |
=========================================================================================================================== | |
=========================================================================================================================== | |
All about core java | |
=========================================================================================================================== | |
=========================================================================================================================== | |
=========================================================================================================================== |
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
version: '3.8' | |
services: | |
localstack: | |
container_name: "localstack-container" | |
image: localstack/localstack:latest | |
ports: | |
- "4566:4566" | |
- "9200:4571" | |
environment: | |
- SERVICES=es, s3, ec2, dynamodb, sqs |
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
import boto3 | |
dynamo_db_connection = boto3.resource('dynamodb', region_name='us-east-1') | |
anime_table_name = os.environ['anime_table_name'] | |
def lambda_handler(event, context): | |
print("Incoming event ", event) | |
anime_name = str(event["anime_name"]) | |
response = dynamodb_connection.query( |
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
import unittest | |
import boto3 | |
import os | |
from moto import mock_dynamodb | |
from unittest.mock import patch | |
@mock_dynamodb # Decorator applied to whole class. This will provides mock for each dynamodb calls which creates inside this class. | |
@patch.dict(os.environ, { |
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
import unittest | |
class LambdaFunctionTest(unittest.TestCase): | |
def setUp(self) -> None: | |
pass | |
def tearDown(self) -> None: | |
pass |
OlderNewer