@backyard/platform-aws
v0.2.26
Published
Use AWS as your Backyard Remote Platform
Downloads
14
Readme
AWS Platform for Backyard
Use AWS as your Backyard Remote Platform
What is Backyard
Backyard is an opinioned microservices platform
Supported AWS Services
- ECS
- Lambda
Install
Usage
This platform can be used as both your Workspace Remote Platform and a Service Remote Platform. Note: This platform can not be used locally
{
platform: {
remote: ["@backyard/platform-aws", AwsRemoteOptions]
},
services: [
{
name: "db",
provider: "@backyard/service-postgresql",
platform: {
remote: ["@backyard/platform-aws/ecs", AwsRemoteEcsOptions]
}
}
]
}
Workspace Remote Platform
import { createWorkspaceConfiguration } from '@backyard/common';
import { useAwsRemotePlatform } from '@backyard/platform-aws';
export default createWorkspaceConfiguration({
platform: {
remote: useAwsRemotePlatform({
profile: 'elwood',
region: 'us-west-1',
vpc: {
name: 'backyard',
subnetCount: 2,
},
ecs: {
clusters: [
{
name: 'main',
cpu: 512,
memory: 1024,
},
],
},
}),
},
});
Service Remote Platform
import { createWorkspaceConfiguration } from '@backyard/common';
import { useAwsRemoteEcsPlatform, useAwsRemotePlatform } from '@backyard/platform-aws';
export default createWorkspaceConfiguration({
platform: {
remote: useAwsRemotePlatform({
profile: 'elwood',
region: 'us-west-1',
vpc: {
name: 'backyard',
subnetCount: 2,
},
ecs: {
clusters: [
{
name: 'main',
cpu: 512,
memory: 1024,
},
],
},
}),
},
services: [
{
name: 'gateway',
enabled: true,
settings: {
jwt: {
secret: '<secret>',
iat: 1624047323,
},
},
platform: {
remote: useAwsRemoteEcsPlatform({
cluster: 'main',
containerCpu: 0.5,
containerMemory: 0.5,
}),
},
},
{
name: 'db',
provider: ['@backyard/service-postgresql'],
platform: {
remote: useAwsRemoteEcsPlatform({
cluster: 'main',
containerCpu: 0.5,
containerMemory: 0.5,
}),
},
},
]
});