Entradas

Stack to create a table with DynamoDB in AWS

Stack to create a table with DynamoDB in AWS Cloudformation: Description: Table for create an user Parameters: Stage: Description: Environment Name Type: String DynamodbTableName: Description: Table name Type: String Resources: SATContractsDBTable: Type: AWS::DynamoDB::Table Properties: TableName: !Sub "${DynamodbTableName}" BillingMode: PAY_PER_REQUEST AttributeDefinitions: - AttributeName: id AttributeType: N - AttributeName: username AttributeType: S KeySchema: - AttributeName: id KeyType: HASH - AttributeName: username KeyType: RANGE Tags: -

Stack to create a S3 bucket

Stack to create a S3 bucket Cloudformation: Description: Stack to create a S3 bucket for only read files. Parameters: Stage: Description: Environment Name Type: String BucketName: Type: String Description: The bucket name OriginURL: Description: Origin url name Type: String Resources: S3FilesBucket: Type: AWS::S3::Bucket Properties: BucketName: !Ref BucketName VersioningConfiguration: Status: Enabled BucketEncryption: ServerSideEncryptionConfiguration: - ServerSideEncryptionByDefault: SSEAlgorithm: AES256 PublicAccessBlockConfiguration: BlockPublicAcls : true BlockPublicPolicy : true IgnorePublicAcls : true RestrictPublicBuckets : true CorsConfiguration: CorsRules: - AllowedHeaders: - x-amz-* AllowedMethods: - PUT AllowedOrigins: - !Ref OriginURL ExposedHeaders: - Connection - Server -

Creation of SQS FIFO in AWS

Creation of SQS FIFO in AWS Cloudformation: AWSTemplateFormatVersion: '2010-09-09' Description: Template to create the sqs of websocket connections Parameters: StandardQueueName: Type: String Description: Queue Name Resources: QueueRefDLQ: Type: AWS::SQS::Queue Properties: FifoQueue: true #QueueName: !Join [ "-", [!Ref StandardQueueName, "dlq"] ] QueueName: Fn::Join: - '' - - Ref: StandardQueueName - dlq - ".fifo" QueueRef: Type: AWS::SQS::Queue Properties: ContentBasedDeduplication: true FifoQueue: true QueueName: Fn::Join: - '

Websocket with API Gateway AWS | Websocket con API Gateway AWS

Ejemplo de implementación de Websocket con API Gateway de AWS. Cloudformation: AWSTemplateFormatVersion: '2010-09-09' #Transform: AWS::Serverless-2016-10-31 Description: websockets to notify to the frontend. Parameters: WebSocketName: Description: Websocket name Type: String Resources: WebSocket: Type: AWS::ApiGatewayV2::Api Properties: Name: !Sub ${WebSocketName} ProtocolType: WEBSOCKET RouteSelectionExpression: "$request.body.action" Description: "Mock WebSocket API Gateway." ConnectRoute: Type: AWS::ApiGatewayV2::Route Properties: ApiId: !Ref WebSocket RouteKey: $connect #RouteResponseSelectionExpression: '$default' AuthorizationType: NONE OperationN

Ejemplo Log4j 2 en JAVA | Log4j 2 en Springboot | Configuración Log4j 2 | Log4j 2 in SpringBoot| Example Log4j 2 in SpringBoot | Configuring Log4j 2

Imagen
Log4j versión 2.x en JAVA |  Log4j versión 2.x en  SpringBoot Apache Log4j 2 o 2.x es una actualización muy importante de Log4j, la cual proporciona innumerables mejoras con respecto a las versiones anteriores, entre estas mejoras: Logback, manejo asíncrono, etc. Objetivo Configurar Log4j versión 2 o 2.x en proyectos Spring. Requisitos: Java 11 (Open) Eclipse SpringBoot 2.2.4.RELEASE Maven En Acción: Para este ejemplo se debe contar con un proyecto en SpringBoot, el cual se pueda implementar o mejorar el uso de Log4j 2 o 2.x. log4j2-spring.xml El archivo de configuración para Log4j versión 2 se define de dos formas: logj2.xml para proyectos sin Spring log4j-spring.xml para proyectos que usen Spring Para ambos archivos se mantiene la misma declaración de propiedades. <? xml version = "1.0" encoding = "UTF-8" ?> <!--https://logging.apache.org/log4j/2.x/manual/configuration.html--> < Configuration status = "TRACE" monitorInterval = "