Skip to content

Commit 4c86f39

Browse files
Merge pull request #314441 from MadhuraBharadwaj-MSFT/main
Refine Lambda migration Copilot guidance and simplify prompts
2 parents 4ebc3cf + 9aaebea commit 4c86f39

1 file changed

Lines changed: 45 additions & 62 deletions

File tree

articles/azure-functions/migration/migrate-aws-lambda-to-azure-functions.md

Lines changed: 45 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -32,25 +32,59 @@ This article doesn't address:
3232
- Hosting AWS Lambda containers in Azure.
3333
- Fundamental Azure adoption approaches by your organization, such as [Azure landing zones](/azure/cloud-adoption-framework/ready/landing-zone/) or other topics addressed in the Cloud Adoption Framework [migrate methodology](/azure/cloud-adoption-framework/migrate/).
3434

35-
## Migration custom chat mode
35+
## Migrate with GitHub Copilot and Azure Skills
3636

37-
To make it easier to migrate your AWS Lambda apps to Azure using Visual Studio Code, Azure Functions provides a [custom chat mode](https://code.visualstudio.com/docs/copilot/customization/custom-chat-modes) in GitHub Copilot. Use these steps to add the `LambdaToFunctionMigration` custom chat mode to your project in Visual Studio Code:
37+
GitHub Copilot with Azure Skills has built-in support to guide migration from AWS Lambda to Azure Functions.
3838

39-
1. If you don't already have the [GitHub Copilot for Azure](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azure-github-copilot) Visual Studio Code extension, install it now.
39+
You can use Copilot to automate most migration steps interactively, while using this article as your reference for architecture decisions, validation, and production readiness.
4040

41-
1. Open your Lambda project as a workspace in Visual Studio Code.
41+
To use Azure Skills in GitHub Copilot (in VS Code or Copilot CLI), follow these steps:
4242

43-
1. Run this prompt in **Agent** mode in GitHub Copilot:
43+
### Prerequisites
4444

45-
```copilot-prompt
46-
Help me migrate my Lambda app to Azure
45+
- **Node.js 18+** - required for MCP servers ([Download Node.js](https://nodejs.org/en/download/))
46+
- Access to an **Azure subscription** for creating and testing your migrated function app.
47+
- **Azure CLI (`az`)** installed and authenticated ([Install Azure CLI](/cli/azure/install-azure-cli)) (`az login`)
48+
- **Azure Developer CLI (`azd`)** installed and authenticated ([Install Azure Developer CLI](/azure/developer/azure-developer-cli/install-azd)) (`azd auth login`)
49+
50+
### For GitHub Copilot CLI
51+
52+
1. [Install Copilot CLI](https://github.com/github/copilot-cli)
53+
2. Add the marketplace source (first time only):
54+
```
55+
/plugin marketplace add microsoft/azure-skills
56+
```
57+
3. Install the plugin:
58+
```
59+
/plugin install azure@azure-skills
60+
```
61+
4. After install, reload MCP servers:
4762
```
63+
/mcp reload
64+
```
65+
5. Verify installation:
66+
```
67+
/mcp status
68+
```
69+
You should see the azure MCP server listed and running.
4870

49-
1. When prompted in the notification area, select **Install** to add the `LambdaToFunctionMigration` custom chat mode to your project.
50-
51-
You can now use guided prompts defined in this custom chat for each stage of your migration. Start typing `/LambdaMigration` in chat to see the complete list of available commands.
71+
### For Visual Studio Code
5272

53-
### Compare functionality
73+
1. [Install the Azure MCP extension](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azure-mcp-server) from the VS Code Marketplace (Extension ID: `ms-azuretools.vscode-azure-mcp-server`).
74+
2. The extension auto-installs a companion extension, GitHub Copilot for Azure, which contains the Azure skills.
75+
3. Open Copilot Chat (Ctrl+Shift+I / Cmd+Shift+I).
76+
4. Make sure you're in Agent mode (not Ask or Edit mode).
77+
5. Open the Command Palette (Ctrl+Shift+P) -> search "MCP" -> verify servers are listed and running.
78+
79+
Use this prompt to start and continue the migration workflow in Copilot:
80+
81+
```copilot-prompt
82+
Help me migrate my Lambda app to Azure Functions
83+
```
84+
85+
This prompt guides the migration in phases: first generating a detailed assessment report, then migrating code and configuration, and finally building the required infrastructure-as-code (IaC) assets for deployment to Azure.
86+
87+
## Compare functionality
5488

5589
This article maps AWS Lambda features to Azure Functions equivalents to help ensure compatibility.
5690

@@ -77,13 +111,6 @@ The first step is to conduct a detailed discovery process to evaluate your exist
77111
- Cost of ownership
78112
- Performance targets and current performance
79113

80-
> [!TIP]
81-
> Use this custom chat mode prompt to generate an assessment report for your AWS Lambda setup:
82-
>
83-
> ```copilot-prompt
84-
> /LambdaMigration-Phase1-AssessLambdaProject
85-
> ```
86-
87114
## Perform premigration planning
88115

89116
Before you start migrating your workload, you must map AWS Lambda features to Azure Functions to ensure compatibility and develop a migration plan. Then you can select key workloads for a proof of concept.
@@ -262,26 +289,13 @@ The following tables compare AWS Lambda concepts, resources, and properties with
262289

263290
1. Test iteratively and gather feedback.
264291

265-
> [!TIP]
266-
> Use this custom chat mode prompt to check the current status of the migration process at any time:
267-
>
268-
> ```copilot-prompt
269-
> /LambdaMigration-GetStatus
270-
> ```
271-
272292
Use the proof of concept to gather feedback, identify gaps, and fine-tune the process before you scale to larger workloads. This iterative approach ensures that by the time you move to full-scale migration, you address potential challenges and refine the process.
273293

274294
## Build the migration assets
275295

276296
This step is a transitional development phase. During this phase, you build source code, infrastructure as code (IaC) templates, and deployment pipelines to represent the workload in Azure. You must adapt function code for compatibility and best practices before you can perform the migration.
277297

278298
- [Adapt function code, configuration files, and infrastructure as code files](#adapt-function-code-configuration-files-and-infrastructure-as-code-files)
279-
> [!TIP]
280-
> Use this custom chat mode prompt to start the code migration process:
281-
>
282-
> ```copilot-prompt
283-
> /LambdaMigration-Phase2-MigrateLambdaCode
284-
> ```
285299
- [Adjust configuration settings](#adjust-configuration-settings)
286300
- [Generate IaC files](#generate-iac-files)
287301
- [Use tools for refactoring](#use-tools-for-refactoring)
@@ -614,13 +628,6 @@ Deployments follow a single path. After you build your project code and zip it i
614628

615629
- Use tools like Bicep, Azure Resource Manager templates, or Terraform to create IaC files to deploy Azure resources.
616630

617-
> [!TIP]
618-
> Use this custom chat mode prompt to generate infrastructure as code (IaC) files for Azure Functions:
619-
>
620-
> ```copilot-prompt
621-
> /LambdaMigration-Phase3-GenerateFunctionsInfra
622-
> ```
623-
624631
- Define resources such as Azure Functions, storage accounts, and networking components in your IaC files.
625632

626633
- Use this [IaC samples repository](https://github.com/Azure-Samples/azure-functions-flex-consumption-samples/tree/main/IaC) for samples that use Azure Functions recommendations and best practices.
@@ -629,9 +636,6 @@ Deployments follow a single path. After you build your project code and zip it i
629636

630637
Use tools like GitHub Copilot in VS Code for help with code refactoring, manual refactoring for specific changes, or other migration aids.
631638

632-
> [!NOTE]
633-
> Use *Agent mode* in GitHub Copilot in VS Code.
634-
635639
The following articles provide specific examples and detailed steps to facilitate the migration process:
636640

637641
- [Azure for AWS professionals](/azure/architecture/aws-professional)
@@ -647,13 +651,6 @@ Develop failover and failback strategies for your migration and thoroughly test
647651

648652
- Test each function thoroughly to ensure that it works as expected. These tests should include input/output, event triggers, and bindings verification.
649653

650-
> [!TIP]
651-
> Use this custom chat mode prompt to validate the migrated Azure Functions code:
652-
>
653-
> ```copilot-prompt
654-
> /LambdaMigration-Phase4-ValidateCode
655-
> ```
656-
657654
- Use tools like curl or [REST Client](https://marketplace.visualstudio.com/items?itemName=humao.rest-client) extensions on VS Code to send HTTP requests for HTTP-triggered functions.
658655

659656
- For other triggers, such as timers or queues, ensure that the triggers fire correctly and the functions run as expected.
@@ -663,13 +660,6 @@ Develop failover and failback strategies for your migration and thoroughly test
663660
- Conduct performance testing to compare the new Azure Functions deployment with the previous AWS Lambda deployment.
664661

665662
- Monitor metrics like response time, run time, and resource consumption.
666-
667-
> [!TIP]
668-
> Use this custom chat mode prompt to validate the infrastructure configuration:
669-
>
670-
> ```copilot-prompt
671-
> /LambdaMigration-Phase5-ValidateInfra
672-
> ```
673663

674664
- Use Application Insights for [monitoring, log analysis, and troubleshooting](/azure/azure-functions/functions-monitoring) during the testing phase.
675665

@@ -685,13 +675,6 @@ Deploy and test functions to validate their performance and correctness.
685675

686676
### Deploy to Azure
687677

688-
> [!TIP]
689-
> Use this custom chat mode prompt to deploy the validated project to Azure:
690-
>
691-
> ```copilot-prompt
692-
> /LambdaMigration-Phase6-DeployToAzure
693-
> ```
694-
695678
Deploy workloads by using the [VS Code](/azure/azure-functions/functions-develop-vs-code#publish-to-azure) publish feature. You can also deploy workloads from the command line by using [Azure Functions Core Tools](/azure/azure-functions/functions-run-local#project-file-deployment) or the [Azure CLI](/cli/azure/functionapp/deployment/source#az-functionapp-deployment-source-config-zip). [Azure DevOps](/azure/azure-functions/functions-how-to-azure-devops#deploy-your-app) and [GitHub Actions](/azure/azure-functions/functions-how-to-github-actions) also use One Deploy.
696679

697680
- Azure Functions Core Tools: [Deploy your function app](/azure/azure-functions/flex-consumption-how-to#deploy-your-code-project) by using [Azure Functions Core Tools](/azure/azure-functions/functions-run-local) with the `func azure functionapp publish <FunctionAppName>` command.

0 commit comments

Comments
 (0)