Support
Persistence:
3 minute read
Introduction
AWS Support is a service provided by Amazon Web Services (AWS) that offers technical assistance and resources to help you optimize your AWS environment, troubleshoot issues, and maintain operational efficiency. Support APIs provide programmatic access to AWS Support services, including the ability to create and manage support cases programmatically. You can further automate your support workflow using various AWS services, such as Lambda, CloudWatch, and EventBridge.
LocalStack allows you to use the Support APIs in your local environment to create and manage new cases, while testing your configurations locally. LocalStack provides a mock implementation via a mock Support Center provided by Moto, and does not create real cases in the AWS. The supported APIs are available on our API coverage page, which provides information on the extent of Support API’s integration with LocalStack.
Note
For technical support with LocalStack, you can reach out through our support channels. It’s important to note that LocalStack doesn’t offer a programmatic interface to create support cases, and this documentation is only intended to demonstrate how you can use and mock the AWS Support APIs in your local environment.Getting started
This guide is designed for users new to Support and assumes basic knowledge of the AWS CLI and our awslocal
wrapper script.
Start your LocalStack container using your preferred method. We will demonstrate how you can create a case in the mock Support Center using the AWS CLI.
Create a support case
To create a support case, you can use the CreateCase
API.
The following example creates a case with the subject “Test case” and the description “This is a test case” in the category “General guidance”.
$ awslocal support create-case \
--subject "Test case" \
--service-code "general-guidance" \
--category-code "general-guidance" \
--communication-body "This is a test case"
The following output would be retrieved:
{
"caseId": "case-12345678910-2020-kEa16f90bJE766J4"
}
List support cases
To list all support cases, you can use the DescribeCases
API.
The following example lists all cases in the category “General guidance”.
$ awslocal support describe-cases
The following output would be retrieved:
{
"cases": [
{
"caseId": "case-12345678910-2020-kEa16f90bJE766J4",
...
"submittedBy": "moto@moto.com",
"timeCreated": "2023-08-24T18:03:08.895247",
"recentCommunications": {
"communications": [
{
"caseId": "case-12345678910-2020-kEa16f90bJE766J4",
"body": "This is a test case",
"submittedBy": "moto@moto.com",
...
}
],
"nextToken": "foo_next_token"
}
}
]
}
Resolve a support case
To resolve a support case, you can use the ResolveCase
API.
The following example resolves the case created in the previous step.
$ awslocal support resolve-case \
--case-id "case-12345678910-2020-kEa16f90bJE766J4"
Replace the case ID with the ID of the case you want to resolve. The following output would be retrieved:
{
"initialCaseStatus": "resolved",
"finalCaseStatus": "resolved"
}
You can also use the DescribeCases
API to verify that the case has been resolved.