diff --git a/website/pages/docs/builders/amazon/index.mdx b/website/pages/docs/builders/amazon/index.mdx
index ee6cc9dc2..a07e2d41e 100644
--- a/website/pages/docs/builders/amazon/index.mdx
+++ b/website/pages/docs/builders/amazon/index.mdx
@@ -67,15 +67,32 @@ explained below:
Static credentials can be provided in the form of an access key id and secret.
These look like:
+
+
+
```json
-{
+"builders": {
+ "type": "amazon-ebs"
"access_key": "AKIAIOSFODNN7EXAMPLE",
"secret_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
"region": "us-east-1",
- "type": "amazon-ebs"
}
```
+
+
+
+```hcl
+source "amazon-ebs" "basic-example" {
+ access_key = "AKIAIOSFODNN7EXAMPLE"
+ secret_key = "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
+ region = "us-east-1"
+}
+```
+
+
+
+
### Environment variables
You can provide your credentials via the `AWS_ACCESS_KEY_ID` and
@@ -110,14 +127,31 @@ The format for the credentials file is like so
You may also configure the profile to use by setting the `profile`
configuration option, or setting the `AWS_PROFILE` environment variable:
+
+
+
```json
-{
+"builders": {
+ "type": "amazon-ebs"
"profile": "customprofile",
"region": "us-east-1",
- "type": "amazon-ebs"
}
```
+
+
+
+```hcl
+source "amazon-ebs" "basic-example" {
+ profile = "customprofile"
+ region = "us-east-1"
+}
+```
+
+
+
+
+
### IAM Task or Instance Role
Finally, Packer will use credentials provided by the task's or instance's IAM