0.2.26 • Published 3 years ago

@backyard/platform-aws v0.2.26

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

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

npm (scoped)

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,
        }),
      },
    },
  ]
});
0.2.26

3 years ago

0.2.25

3 years ago

0.2.24

3 years ago

0.2.23

3 years ago

0.2.22

3 years ago

0.2.21

3 years ago

0.2.19

3 years ago

0.2.20

3 years ago

0.2.18

3 years ago

0.2.17

3 years ago

0.2.16

3 years ago