Skip to content

Commit bd41be2

Browse files
committed
aws prompt
1 parent 4a378d6 commit bd41be2

File tree

3 files changed

+39
-5
lines changed

3 files changed

+39
-5
lines changed

docs/tutorials/deploy-to-aws.mdx

Lines changed: 39 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Defang allows you deploy to your own Amazon Web Services (AWS) acco
55

66
# Deploy to Amazon Web Services (AWS)
77

8-
This tutorial will show you how to deploy your services to your own AWS account using Defang.
8+
This tutorial will show you how to deploy your services to your own AWS account using Defang with the CLI or MCP.
99

1010
## Pre-requisites
1111
* [A Dockerfile in your project](https://docs.docker.com/get-started/docker-concepts/building-images/writing-a-dockerfile/)
@@ -14,13 +14,19 @@ This tutorial will show you how to deploy your services to your own AWS account
1414
* [The Defang CLI](/docs/getting-started#install-the-defang-cli)
1515
* [AWS Account Credentials](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-authentication.html)
1616

17-
## Step 1 - Navigate to your project directory
17+
:::warning["MCP Pre-requisite"]
18+
If you would like to deploy using [MCP](https://modelcontextprotocol.io/), you like need to setup the [Defang MCP Server](../concepts/mcp.md) with the IDE of your choice.
19+
:::
20+
21+
## CLI
22+
23+
### Step 1 - Navigate to your project directory
1824
Head to the folder where your project is located.
1925
```bash
2026
$ cd path/to/your/project
2127
```
2228

23-
## Step 2 - Authenticate Defang to use your AWS Account
29+
### Step 2 - Authenticate Defang to use your AWS Account
2430

2531
There are many ways to authenticate your [AWS account](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-authentication.html).
2632
Once you've done that, Defang will look for your AWS credentials in your shell environment and expect to find one of the following credential sets:
@@ -31,7 +37,7 @@ Once you've done that, Defang will look for your AWS credentials in your shell e
3137
If you have the AWS CLI installed (which is not required in order to use the Defang CLI), you can verify that you've authenticated to AWS by running `aws sts get-caller-identity` and see your account ID.
3238
:::
3339

34-
## Step 3 - Deploy
40+
### Step 3 - Deploy
3541

3642
Invoke the `defang compose up` CLI command with the `--provider=aws` flag or set the `DEFANG_PROVIDER=aws` environment variable.
3743

@@ -41,10 +47,38 @@ For example:
4147
$ defang compose up --provider=aws
4248
```
4349

44-
## Step 4 - Inspect your deployment
50+
### Step 4 - Inspect your deployment
4551

4652
Defang will provision resources in your AWS account and deploy your services. You can inspect the resources created in your AWS Dashboard.
4753

54+
---
55+
56+
## MCP
57+
58+
### Step 1 - Navigate to your project directory with your IDE
59+
Navigate to your project directory and open it in an IDE that has the [Defang MCP Server](../concepts/mcp.md) installed.
60+
61+
:::tip
62+
If the Defang MCP server doesn’t start automatically, try starting or restarting it from your IDE settings.
63+
![VS Code](/img/prompts/start-server.png)
64+
:::
65+
66+
### Step 2 - Setting your provider
67+
In your chat window, type `/mcp.defang.AWS_Setup` or select the corresponding prompt from your IDE’s options.
68+
69+
![Trigger Prompt](/img/prompts/aws-prompt.png)
70+
71+
The [MCP prompt](https://modelcontextprotocol.io/specification/2025-06-18/server/prompts) accepts two types of credentials:
72+
* the AWS Profile arguement (skip the rest of the prompts after entering the AWS Profile)
73+
* or, the AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and AWS_REGION arguments
74+
75+
### Step 3 - Deploy
76+
Once the prompt completes without errors, your chat input will be automatically populated with the deployment command for the LLM to execute.
77+
78+
### Step 4 - Inspect your deployment
79+
You can check the status of your depolyment by using the [Defang Services tool](../concepts/mcp#services) or you can inspect the resources created in your AWS Dashboard.
80+
81+
4882
***
4983

5084
For a deeper discussion of the Defang AWS Architecture, including a list of the resources we provision in your account, see our [AWS Provider docs](/docs/providers/aws).

static/img/prompts/aws-prompt.png

37.4 KB
Loading
20.4 KB
Loading

0 commit comments

Comments
 (0)