Use AWS as your Backyard Remote Platform
npm install @backyard/platform-aws - ECS
- Lambda
``javascript`
{
platform: {
remote: ["@backyard/platform-aws", AwsRemoteOptions]
},
services: [
{
name: "db",
provider: "@backyard/service-postgresql",
platform: {
remote: ["@backyard/platform-aws/ecs", AwsRemoteEcsOptions]
}
}
]
}
typescript
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,
},
],
},
}),
},
});
`$3
`typescript
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: '',
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,
}),
},
},
]
});
``