Amplify has re-imagined the way frontend developers build fullstack applications. Develop and deploy without the hassle.

Page updated May 16, 2024

Modify Amplify-generated Lambda resources with CDK

Amplify Functions utilize the NodejsFunction construct from the AWS Cloud Development Kit (CDK). The underlying resources can be modified, overridden, or extended using CDK after setting the resource on your backend.

import { defineBackend } from '@aws-amplify/backend';
import { myFunction } from './functions/my-function';
const backend = defineBackend({
// CDK constructs can be accessed via
// where the Lambda function can be found on

The Lambda resource available is a representation of IFunction.

Adding IAM Policies

To learn how to add IAM policies to a Function's execution role, visit the documentation for granting access to other resources.