Skip to content

Instantly share code, notes, and snippets.

View efekarakus's full-sized avatar
📚

Efe Karakus efekarakus

📚
View GitHub Profile
View proposal.md
@efekarakus
efekarakus / env-addons-proposal.md
Created December 9, 2021 18:48
Draft proposal to support Environment Addons in AWS Copilot
View env-addons-proposal.md

Today, users can associate new AWS resources to a single microservice through service addons [1]. However, there are resources such as Application Load Balancers or Elastic File Systems that are designed to be shared by multiple consumers. Today, Copilot provides a managed experience for sharable resources via the manifest file with the http, alias, or efs fields.

This document proposes a way for users to create their own sharable resources between microservices so that they are not blocked on the Copilot team to support the integration.

Target use cases

AWS resources that are meant to be shared typically (and ideally should) support a “decoupling layer”.

View sample-addon-with-s3-policy.yaml
Parameters:
App:
Type: String
Description: Your application's name.
Env:
Type: String
Description: The environment name your service, job, or workflow is being deployed to.
Name:
Type: String
Description: The name of the service, job, or workflow being deployed.
@efekarakus
efekarakus / redis.yml
Created April 23, 2021 18:50
Addon template to create an Elasticache cluster
View redis.yml
Parameters:
App:
Type: String
Description: Your application's name.
Env:
Type: String
Description: The environment name your service, job, or workflow is being deployed to.
Name:
Type: String
Description: The name of the service, job, or workflow being deployed.
@efekarakus
efekarakus / withrotation.template.yaml
Created October 4, 2020 20:42
regular aurora template
View withrotation.template.yaml
AWSTemplateFormatVersion: '2010-09-09'
Description: 'CloudFormation Template to create Aurora Postgresql Cluster DB Instance'
###############################################################################
# Parameters
###############################################################################
Parameters:
ParentVPCStack:
@efekarakus
efekarakus / db.template.yaml
Created October 4, 2020 20:40
Aurora Serverless Template for Addons
View db.template.yaml
Parameters:
App:
Type: String
Description: Your application's name.
Env:
Type: String
Description: The environment name your service, job, or workflow is being deployed to.
Name:
Type: String
Description: The name of the service, job, or workflow being deployed.
@efekarakus
efekarakus / gist:db0faa4bd48b6acb395280b8f3c23016
Created April 26, 2019 17:05
sample-integ-test-run-coverage
View gist:db0faa4bd48b6acb395280b8f3c23016
[Container] 2019/04/26 16:56:32 Running command make integ-test
Installing dependencies...
go get github.com/wadey/gocovmerge
Building ecs-cli.test...
env -i PATH=$PATH GOPATH=$GOPATH GOROOT=$GOROOT GOCACHE=$GOCACHE \
go test -coverpkg ./ecs-cli/modules/... -c -tags testrunmain -o ./bin/local/ecs-cli.test ./ecs-cli
Running integration tests...
go test -tags integ ./ecs-cli/integ/e2e/...
ok github.com/aws/amazon-ecs-cli/ecs-cli/integ/e2e 350.161s
# Our integration tests generate a separate coverage file for each CLI command.
@efekarakus
efekarakus / before.js
Last active June 1, 2017 05:33
closure-over-multiple-parameters
View before.js
// Before
function recordMetricOnCompletion(metricName, promise) {
const metric = Metric.newTimedMetric(metricName);
return promise
.then(values => {
metric.emitSuccess();
return Promise.resolve(values);
})
.catch(reason => {
@efekarakus
efekarakus / multiple-params-vs-closure-2.js
Created June 1, 2017 02:32
Multiple Parameters vs. Closure 2
View multiple-params-vs-closure-2.js
function getRecordedPromise(metricName) {
const metric = Metric.newTimedMetric(metricName);
return (promise) => {
return promise
.then(values => {
metric.emitSuccess();
return Promise.resolve(values);
})
.catch(reason => {
@efekarakus
efekarakus / multiple-params-vs-closure-1.js
Created June 1, 2017 02:31
Multiple Parameters vs. Closure 1
View multiple-params-vs-closure-1.js
function recordMetricOnCompletion(metricName, promise) {
const metric = Metric.newTimedMetric(metricName);
return promise
.then(values => {
metric.emitSuccess();
return Promise.resolve(values);
})
.catch(reason => {
metric.emitFailure();