AWS Lambda runs code without managing servers. You publish a function. AWS runs it on demand. You pay for compute time. Teams use Lambda for APIs, event processing, and automation.
The AWS Lambda plugin brings your functions into Backstage. It maps Lambda functions to your service catalog entities. It shows key metadata like runtime, region, memory, and last modified. You can browse versions and aliases. You can see recent invocations, errors, duration, and throttles based on CloudWatch metrics. You can jump to logs and the AWS console when you need more detail.
Use it to check a deploy, track cold starts after a change, or triage a spike in errors. Keep the team in one place during on call. Give product engineers a simple view of their functions without switching tools. Reduce the back and forth with platform teams. It helps you spot drift across regions and environments. It makes ownership clear by tying functions to the Backstage catalog. It brings runtime signals next to docs and ownership info in Backstage. It can help you plan migrations or find runtimes that are out of date. You get context that is close to the code and the people who own it.
Installation Instructions
These instructions apply to self-hosted Backstage only.
- Install the frontend package in packages app
yarn workspace app add @roadiehq/backstage-plugin-aws-lambda
- Add the Lambda card to your catalog entity page
Open packages app src components catalog EntityPage.tsx. Import the components from the plugin. Add the card inside your overview content. Keep the EntitySwitch guard so the card only renders when annotations are present.
// packages/app/src/components/catalog/EntityPage.tsx
import React from 'react';
import { Grid } from '@material-ui/core';
import { EntitySwitch } from '@backstage/plugin-catalog';
import {
EntityAWSLambdaOverviewCard,
isAWSLambdaAvailable,
} from '@roadiehq/backstage-plugin-aws-lambda';
// keep your existing code above
const overviewContent = (
<Grid container spacing={3} alignItems="stretch">
<EntitySwitch>
<EntitySwitch.Case if={e => Boolean(isAWSLambdaAvailable(e))}>
<Grid item md={6}>
<EntityAWSLambdaOverviewCard />
</Grid>
</EntitySwitch.Case>
</EntitySwitch>
</Grid>
);
// keep your existing page layout below
- Optionally allow the card to assume a specific role for cross account access
Pass a roleArn prop. The backend user or role must be allowed to assume this role.
<EntityAWSLambdaOverviewCard
roleArn={'arn:aws:iam::000000000000:role/roleName'}
/>
- Add entity annotations so the plugin knows what function and region to use
Update your catalog entity yaml. Add the annotations under metadata.
metadata:
annotations:
aws.com/lambda-function-name: HelloWorld
aws.com/lambda-region: us-east-1
- Install the backend auth plugin in packages backend
The Lambda card asks the backend for temporary credentials at api aws credentials. Install the Roadie AWS auth backend plugin.
yarn workspace backend add @roadiehq/backstage-plugin-aws-auth-backend
- Wire the backend plugin in the old backend system
Create a router file.
// packages/backend/src/plugins/awsAuth.ts
import { Router } from 'express';
import { createRouter } from '@roadiehq/backstage-plugin-aws-auth-backend';
import { PluginEnvironment } from '../types';
export default async function createPlugin(
env: PluginEnvironment,
): Promise<Router> {
return await createRouter({
logger: env.logger,
config: env.config,
});
}
Mount the router at the aws path. The card will call api aws credentials.
// packages/backend/src/index.ts
import awsAuth from './plugins/awsAuth';
// inside your main bootstrap function after creating apiRouter
apiRouter.use('/aws', await awsAuth(env));
Provide AWS credentials to your backend process using the normal AWS SDK chain. For example environment variables or an instance role. The credentials need read access to the Lambda functions you want to show.
- Wire the backend plugin in the new backend system
Register a small feature that mounts the router on the shared http router.
// packages/backend/src/index.ts
import { createBackend } from '@backstage/backend-defaults';
import { createRouter } from '@roadiehq/backstage-plugin-aws-auth-backend';
const backend = createBackend();
backend.add({
id: 'aws-auth',
register(env) {
env.registerInit({
deps: {
logger: env.logger,
config: env.config,
httpRouter: env.httpRouter,
},
async init({ logger, config, httpRouter }) {
const router = await createRouter({ logger, config });
httpRouter.use('/aws', router);
},
});
},
});
backend.start();
Make sure your backend process can obtain AWS credentials using the standard AWS SDK flow.
- Run the app and open a Service entity page that has the annotations
The Lambda overview card will render in the overview section. It will use the function name and region from the annotations. It will fetch temporary credentials from api aws credentials. If you passed roleArn to the card it will request credentials for that role.
Things to Know
Authentication
In order to perform requests to AWS lambda plugin you must install @roadiehq/backstage-plugin-aws-auth backend plugin.
Then ask backend for temporary credentials via /api/aws/credentials.
You can select what functions will be shown in the table using your yaml config file:
metadata:
annotations:
aws.com/lambda-function-name: HelloWorld
aws.com/lambda-region: us-east-1
Changelog
This changelog is produced from commits made to the AWS Lambda plugin since a year ago, and based on the code located here. It may not contain information about all commits. Releases and version bumps are intentionally omitted. This changelog is generated by AI.
Improvements
- Upgrade to Backstage 1.40 #1952 merged 2 months ago
- Remove unused dependencies in the plugin #1847 merged 7 months ago
- Move date handling to luxon and remove moment #1759 merged 9 months ago
Maintenance
- Revert a previous dependency update to keep things stable #1825 merged 7 months ago
- Update Backstage dependencies #1821 merged 7 months ago
- Update Backstage package versions #1728 merged 10 months ago
- Update dependencies across plugins #1684 merged 11 months ago
Breaking changes
- None detected based on the linked pull requests
Set up Backstage in minutes with Roadie
Focus on using Backstage, rather than building and maintaining it.