Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 101 additions & 0 deletions src/content/docs/aws/services/account-management.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
---
title: "Account Management"
linkTitle: "Account Management"
description: Get started with AWS Account Management on LocalStack
tags: ["Ultimate"]
---

## Introduction

The Account service provides APIs to manage your AWS account.
You can use the Account APIs to retrieve information about your account, manage your contact information and alternate contacts.
Additionally, you can use the Account APIs to enable or disable a region for your account, and delete alternate contacts in your account.

LocalStack allows you to use the Account API to retrieve information about your account.
The supported APIs are available on our [API coverage page]({{< ref "coverage_account" >}}), which provides information on the extent of Account's integration with LocalStack.

{{< callout >}}
LocalStack's Account provider is mock-only and does not support any real AWS account.
The Account APIs are only intended to demonstrate how you can use and mock the AWS Account APIs in your local environment.
It's important to note that LocalStack doesn't offer a programmatic interface to manage your AWS or your LocalStack account.
{{< /callout >}}

## Getting started

This guide is designed for users who are new to Account and assumes basic knowledge of the AWS CLI and our [`awslocal`](https://github.com/localstack/awscli-local) wrapper script.

Start your LocalStack container using your preferred method.
We will demonstrate how to put contact information, fetch account details, and attach an alternate contact to your account.

### Put contact information

You can use the [`PutContactInformation`](https://docs.aws.amazon.com/accounts/latest/reference/API_PutContactInformation.html) API to add or update the contact information for your AWS account.
Run the following command to add contact information to your account:

{{< command >}}
$ awslocal account put-contact-information \
--contact-information '{
"FullName": "Jane Doe",
"PhoneNumber": "+XXXXXXXXX",
"AddressLine1": "XXXX Main St",
"City": "XXXX",
"PostalCode": "XXXXX",
"CountryCode": "US",
"StateOrRegion": "WA"
}'
{{< /command >}}

### Fetch account details

You can use the [`GetContactInformation`](https://docs.aws.amazon.com/accounts/latest/reference/API_GetContactInformation.html) API to retrieve the contact information for your AWS account.
Run the following command to fetch the contact information for your account:

{{< command >}}
$ awslocal account get-contact-information
{{< /command >}}

The command will return the contact information for your account:

```json
{
"ContactInformation": {
"AddressLine1": "XXXX Main St",
"City": "XXXX",
"CountryCode": "US",
"FullName": "Jane Doe",
"PhoneNumber": "+XXXXXXXXX",
"PostalCode": "XXXXX",
"StateOrRegion": "WA"
}
}
```

### Attach alternate contact

You can attach an alternate contact using [`PutAlternateContact`](https://docs.aws.amazon.com/accounts/latest/reference/API_PutAlternateContact.html) API.
Run the following command to attach an alternate contact to your account:

{{< command >}}
$ awslocal account put-alternate-contact \
--alternate-contact-type "BILLING" \
--email-address "[email protected]" \
--name "Bill Ing" \
--phone-number "+1 555-555-5555" \
--title "Billing"
{{< /command >}}

## Resource Browser

The LocalStack Web Application provides a Resource Browser for managing contact information & alternate accounts for the Account service.
You can access the Resource Browser by opening the LocalStack Web Application in your browser, navigating to the Resources section, and then clicking on **Account** under the **Management & Governance** section.

<img src="account-resource-browser.png" alt="Account Resource Browser" title="Account Resource Browser" width="900" />
<br><br>

The Resource Browser allows you to perform the following actions:

* **Create Contact Information**: Add the contact information for your mocked AWS account by clicking on the **Create** button in the contact information section.
* **Create Alternate Contact**: Add an alternate contact for your mocked AWS account by clicking on the **Create** button in the alternate contacts section.
* **View Contact Information**: View the contact information for your mocked AWS account by clicking on the contact information.
* **Update Contact Information**: Update the contact information for your mocked AWS account by clicking on the contact information.
* **Filter**: Filter the contact information and alternate contacts by types, such as `BILLING`, `OPERATIONS`, and `SECURITY`.
93 changes: 93 additions & 0 deletions src/content/docs/aws/services/acm.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
---
title: "Certificate Manager (ACM)"
linkTitle: "Certificate Manager (ACM)"
description: Get started with AWS Certificate Manager (ACM) on LocalStack
tags: ["Free"]
---

## Introduction

[AWS Certificate Manager (ACM)](https://aws.amazon.com/certificate-manager/) is a service that enables you to create and manage SSL/TLS certificates that can be used to secure your applications and resources in AWS.
You can use ACM to provision and deploy public or private certificates trusted by browsers and other clients.

ACM supports securing multiple domain names and subdomains and can create wildcard SSL certificates to protect an entire domain and its subdomains.
You can also use ACM to import certificates from third-party certificate authorities or to generate private certificates for internal use.

LocalStack allows you to use the ACM APIs to create, list, and delete certificates.
The supported APIs are available on our [API coverage page]({{< ref "coverage_acm" >}}), which provides information on the extent of ACM's integration with LocalStack.

## Getting started

This guide is designed for users who are new to ACM and assumes basic knowledge of the AWS CLI and our [`awslocal`](https://github.com/localstack/awscli-local) wrapper script.

### Request a public certificate

Start your LocalStack container using your preferred method, then use the [RequestCertificate API](https://docs.aws.amazon.com/acm/latest/APIReference/API_RequestCertificate.html) to request a new public ACM certificate.
Specify the domain name you want to request the certificate for, and any additional options you need.
Here's an example command:

{{< command >}}
$ awslocal acm request-certificate \
--domain-name www.example.com \
--validation-method DNS \
--idempotency-token 1234 \
--options CertificateTransparencyLoggingPreference=DISABLED
{{< /command >}}

This command will return the Amazon Resource Name (ARN) of the new certificate, which you can use in other ACM commands.

```json
{
"CertificateArn": "arn:aws:acm:<region>:000000000000:certificate/<certificate_ID>"
}
```

### List the certificates

Use the [`ListCertificates` API](https://docs.aws.amazon.com/acm/latest/APIReference/API_ListCertificates.html) to list all the certificates.
This command returns a list of the ARNs of all the certificates that have been requested or imported into ACM.
Here's an example command:

{{< command >}}
$ awslocal acm list-certificates --max-items 10
{{< /command >}}

### Describe the certificate

Use the [`DescribeCertificate` API](https://docs.aws.amazon.com/acm/latest/APIReference/API_DescribeCertificate.html) to view the details of a specific certificate.
Provide the ARN of the certificate you want to view, and this command will return information about the certificate's status, domain name, and other attributes.
Here's an example command:

{{< command >}}
$ awslocal acm describe-certificate --certificate-arn arn:aws:acm:<region>:account:certificate/<certificate_ID>
{{< /command >}}

### Delete the certificate

Finally you can use the [`DeleteCertificate` API](https://docs.aws.amazon.com/acm/latest/APIReference/API_DeleteCertificate.html) to delete a certificate from ACM, by passing the ARN of the certificate you want to delete.
Here's an example command:

{{< command >}}
$ awslocal acm delete-certificate --certificate-arn arn:aws:acm:<region>:account:certificate/<certificate_ID>
{{< /command >}}

## Resource Browser

The LocalStack Web Application provides a Resource Browser for managing ACM Certificates.
You can access the Resource Browser by opening the LocalStack Web Application in your browser, navigating to the **Resource Browser** section, and then clicking on **Certificate Manager** under the **Security Identity Compliance** section.

<img src="acm-resource-browser.png" alt="ACM Resource Browser" title="ACM Resource Browser" width="900" />
<br><br>

The Resource Browser allows you to perform the following actions:

- **Create Certificate**: Create a new ACM certificate by clicking **Create Certificate** and providing the required information.
- **View Certificate**: View the details of a specific certificate by clicking on the domain name.
- **Delete Certificate**: Delete a certificate by selecting the certificate, followed by clicking **Actions** and then **Remove Selected**.

## Examples

The following code snippets and sample applications provide practical examples of how to use ACM in LocalStack for various use cases:

- [API Gateway with Custom Domains](https://github.com/localstack/localstack-pro-samples/tree/master/apigw-custom-domain)
- [Generating an ACM certificate via Terraform](https://github.com/localstack/localstack-terraform-samples/tree/master/acm-route53)
75 changes: 75 additions & 0 deletions src/content/docs/aws/services/amplify.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
---
title: "Amplify"
linkTitle: "Amplify"
description: Get started with Amplify on LocalStack
tags: ["Ultimate"]
persistence: supported
---

## Introduction

Amplify is a JavaScript-based development framework with libraries, UI components, and a standard CLI interface for building and deploying web and mobile applications.
With Amplify, developers can build and host static websites, single-page applications, and full-stack serverless web applications using an abstraction layer over popular AWS services like DynamoDB, Cognito, AppSync, Lambda, S3, and more.

LocalStack allows you to use the Amplify APIs to build and test their Amplify applications locally.
The supported APIs are available on our [API coverage page]({{< ref "coverage_amplify" >}}), which provides information on the extent of Amplify's integration with LocalStack.

{{< callout "note" >}}
The `amplifylocal` CLI and the Amplify JS library have been deprecated and are no longer supported.
We recommend using the Amplify CLI with the Amplify LocalStack Plugin instead.
{{< /callout >}}

## Amplify LocalStack Plugin

[Amplify LocalStack Plugin](https://github.com/localstack/amplify-localstack) allows the `amplify` CLI tool to create resources on your local machine instead of AWS.
It achieves this by redirecting any requests to AWS to a LocalStack container running locally on your machine.

### Installation

To install the Amplify LocalStack Plugin, install the [amplify-localstack](https://www.npmjs.com/package/amplify-localstack) package from the npm registry and add the plugin to your Amplify setup:

{{< command >}}
$ npm install -g amplify-localstack
$ amplify plugin add amplify-localstack
{{< /command >}}

### Configuration

You can configure the following environment variables to customize LocalStack's behaviour:

- `EDGE_PORT`: The port number under which the LocalStack edge service is accessible.
The default value is `4566`.
- `LOCALSTACK_HOSTNAME`: It specifies the target host under which the LocalStack edge service is accessible.
The default value is `localhost.localstack.cloud`.
- `LOCALSTACK_ENDPOINT`: It allows you to set a custom endpoint directly.
If set, it overrides the values set for `EDGE_PORT` and `LOCALSTACK_HOSTNAME`.
The default value is `https://localhost.localstack.cloud:4566`.

### Usage

After installing the plugin, you can deploy your resources to LocalStack using the `amplify init` or `amplify push` commands.
The console will prompt you to select whether to deploy to LocalStack or AWS.

You can also add the parameter `--use-localstack true` to your commands to avoid being prompted and automatically use LocalStack.
Here is an example:

{{< command >}}
$ amplify init --use-localstack true
$ amplify add api
$ amplify push --use-localstack true
{{< /command >}}

## Resource Browser

The LocalStack Web Application provides a Resource Browser for managing Amplify applications.
You can access the Resource Browser by opening the LocalStack Web Application in your browser, navigating to the **Resource Browser** section, and then clicking on **Amplify** under the **Front-end Web & Mobile** section.

<img src="amplify-resource-browser.png" alt="Amplify Resource Browser" title="Amplify Resource Browser" width="900" />
<br><br>

The Resource Browser allows you to perform the following actions:

- **Create new Amplify applications**: Create new Amplify applications by clicking **Create App** and filling in the required details.
- **View Amplify applications**: View the list of Amplify applications created in LocalStack by clicking on the application ID.
- **Edit Amplify applications**: Edit the configuration of an existing Amplify application by clicking on the application ID and then clicking **Edit App**.
- **Delete Amplify applications**: Delete an existing Amplify application by selecting the application, followed by clicking **Actions** and then **Remove Selected**.
Loading