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
# Redis (from source) over an AMI-powered AWS EC2 instance | |
sudo yum install -y gcc wget | |
wget http://download.redis.io/redis-stable.tar.gz | |
&& tar xvzf redis-stable.tar.gz | |
&& cd redis-stable | |
&& make | |
sudo cp src/redis-cli /usr/bin/ | |
# source: https://gist.github.com/todgru/14768fb2d8a82ab3f436?permalink_comment_id=2369248#gistcomment-2369248 |
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
# Serverless Framework function that looks for scheduled Laravel jobs and spawns a Lambda instance if needed. | |
artisan: | |
name: ${self:service}-${self:provider.stage}-artisan | |
description: Artisan CLI & Cron Scheduler | |
handler: artisan | |
timeout: 60 | |
runtime: php-82-console | |
layers: | |
- ${bref-extra:redis-php-82} |
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
# Creates a Docker-compatible AWS environment based on LocalStack. | |
# Allows for locally testing AWS resources, rather than depending on a sandbox/test AWS account. | |
# Initialization of certain AWS services (i.e. SQS, S3) can be automatized on bootstrap. | |
version: '3.8' | |
services: | |
aws: | |
image: localstack/localstack | |
ports: | |
- "127.0.0.1:4566:4566" |
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
# Provisions an AWS Aurora Serverless v2 cluster .. | |
# .. with stage-based ACU parameters and instance replication. | |
Resources: | |
BackendDatabaseCluster: | |
Type: AWS::RDS::DBCluster | |
DeletionPolicy: Snapshot | |
Properties: | |
Engine: aurora-mysql | |
EngineVersion: "8.0.mysql_aurora.3.03.1" |
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
# Common use-case example of an AWS-managed state machine that orchestrates AWS Lambda instances. | |
# Provisioned via Serverless Framework as a CloudFormation stack. | |
provider: | |
name: aws | |
stage: ${opt:stage, self:custom.defaultStage} | |
region: eu-central-1 // us-east-1, us-west-2, ... | |
runtime: python3.9 // 3.7, 3.8, ... | |
stackName: ${self:service}-${self:provider.stage} | |
timeout: 300 |