@roadiehq/backstage-plugin-aws-backend
TypeScript icon, indicating that this package has built-in type declarations

1.1.26 • Public • Published

AWS Plugin Backend for Backstage

To use the backend, you will need to configure the following in the app-config.yaml file:

Region and External ID are optional.

integrations:
  aws:
    - accountId: '9999999999'
      roleArn: arn:aws:iam::9999999999:role/ops
      region: eu-west-1
      externalId: 'blah'

Create a file in packages/backend/src/plugins/aws.ts

import { createRouter } from '@roadiehq/backstage-plugin-aws-backend';
import type { PluginEnvironment } from '../types';

export default async function createPlugin({
  logger,
  config,
}: PluginEnvironment) {
  return await createRouter({ logger, config });
}

In packages/backend/src/index.ts add the following:

import aws from './plugins/aws';
// ...
async function main() {
  // ...
  const awsEnv = useHotMemoize(module, () => createEnv('aws'));
  const apiRouter = Router();
  apiRouter.use('/aws', await aws(awsEnv));
  // ...
}

At this point you can retrieve details of an aws resource as follows:

You can optionally pass a parameter region.

$ curl http://localhost:7007/api/aws/9999999999/AWS::S3::Bucket/bucket1
{ "Arn":"arn:aws:s3:::bucket1", "BucketName":"bucket1", ... }

Roadie gives you a hassle-free, fully customisable SaaS Backstage. Find out more here: https://roadie.io.

Package Sidebar

Install

npm i @roadiehq/backstage-plugin-aws-backend

Weekly Downloads

1

Version

1.1.26

License

Apache-2.0

Unpacked Size

26.4 kB

Total Files

7

Last publish

Collaborators

  • samnixon87
  • gorkaroadie
  • joao.roadie
  • kissmikijr
  • sblausten
  • roadiehq-david
  • iainbillett
  • brianfletcher
  • xantier
  • irma1203
  • roadie-bot