Files
floci/docs/services/acm.md
T
TiM a32b7f1f3b docs: comprehensive audit sweep + CHANGELOG backfill (1.1.0-1.5.2) (#326)
CHANGELOG.md was empty for the 1.1.0-1.5.2 release cycle and service docs
had drifted from code behaviour. This sweep reconciles docs against the
current codebase on upstream/main.

- Backfill CHANGELOG.md for 1.1.0 through 1.5.2 from git history
- Correct exact operation counts in docs/services/index.md: S3 (~30 -> 58),
  Lambda (~25 -> 30), API Gateway v1 (~24 -> 62). Counts now come from the
  actual dispatch handlers rather than @Path annotation counts.
- Rewrite README "Supported Services" table to drop per-service op counts
  (they drift too fast); point readers at docs/services/index.md
- Update 24 service docs for accuracy, add "Not Implemented" sections
  where relevant (s3.md, lambda.md, api-gateway.md)
- Refresh configuration and getting-started docs
- Add EventBridge Scheduler and AppConfig to mkdocs nav
- Add AppConfig / AppConfigData rows to README and services index
  following the 1.5.2 upstream release
2026-04-10 10:52:34 -05:00

118 lines
4.0 KiB
Markdown

# ACM
**Protocol:** JSON 1.1 (`X-Amz-Target: CertificateManager.*`)
**Endpoint:** `POST http://localhost:4566/`
## Supported Actions
| Action | Description |
|---|---|
| `RequestCertificate` | Request a new certificate (auto-issued for emulation) |
| `DescribeCertificate` | Get certificate details and validation status |
| `GetCertificate` | Retrieve the certificate and chain in PEM format |
| `ListCertificates` | List all certificates with optional status filtering |
| `DeleteCertificate` | Delete a certificate |
| `AddTagsToCertificate` | Add tags to a certificate |
| `RemoveTagsFromCertificate` | Remove tags from a certificate |
| `ListTagsForCertificate` | List tags for a certificate |
| `ExportCertificate` | Export certificate with encrypted private key (PRIVATE type only) |
| `GetAccountConfiguration` | Get account-level ACM settings |
| `PutAccountConfiguration` | Update account-level ACM settings |
| `RenewCertificate` | Trigger certificate renewal |
## Emulation Behavior
- **Auto-Issuance:** All requested certificates are immediately issued with status `ISSUED` (no DNS/email validation required)
- **Real Cryptography:** Certificates are generated with real RSA/EC keys and valid X.509 structure
- **Key Algorithms:** Supports `RSA_2048`, `RSA_3072`, `RSA_4096`, `EC_prime256v1`, `EC_secp384r1`, `EC_secp521r1`
- **Certificate Types:** `AMAZON_ISSUED` (default) and `PRIVATE` (when `CertificateAuthorityArn` is provided)
- **Export:** Only `PRIVATE` type certificates can be exported with their private key
## Examples
```bash
export AWS_ENDPOINT_URL=http://localhost:4566
# Request a certificate
CERT_ARN=$(aws acm request-certificate \
--domain-name "example.com" \
--subject-alternative-names "www.example.com" "*.example.com" \
--validation-method DNS \
--query CertificateArn --output text \
--endpoint-url $AWS_ENDPOINT_URL)
# Describe the certificate
aws acm describe-certificate \
--certificate-arn $CERT_ARN \
--endpoint-url $AWS_ENDPOINT_URL
# Get certificate in PEM format
aws acm get-certificate \
--certificate-arn $CERT_ARN \
--endpoint-url $AWS_ENDPOINT_URL
# List all certificates
aws acm list-certificates \
--endpoint-url $AWS_ENDPOINT_URL
# List only issued certificates
aws acm list-certificates \
--certificate-statuses ISSUED \
--endpoint-url $AWS_ENDPOINT_URL
# Add tags
aws acm add-tags-to-certificate \
--certificate-arn $CERT_ARN \
--tags Key=Environment,Value=Production Key=Project,Value=Demo \
--endpoint-url $AWS_ENDPOINT_URL
# List tags
aws acm list-tags-for-certificate \
--certificate-arn $CERT_ARN \
--endpoint-url $AWS_ENDPOINT_URL
# Request a private certificate (exportable)
PRIVATE_ARN=$(aws acm request-certificate \
--domain-name "internal.example.com" \
--certificate-authority-arn "arn:aws:acm-pca:us-east-1:123456789012:certificate-authority/12345678-1234-1234-1234-123456789012" \
--query CertificateArn --output text \
--endpoint-url $AWS_ENDPOINT_URL)
# Export private certificate (passphrase must be base64-encoded, min 4 chars)
PASSPHRASE=$(echo -n "mypassphrase123" | base64)
aws acm export-certificate \
--certificate-arn $PRIVATE_ARN \
--passphrase $PASSPHRASE \
--endpoint-url $AWS_ENDPOINT_URL
# Delete a certificate
aws acm delete-certificate \
--certificate-arn $CERT_ARN \
--endpoint-url $AWS_ENDPOINT_URL
```
## SDK Example (Java)
```java
AcmClient acm = AcmClient.builder()
.endpointOverride(URI.create("http://localhost:4566"))
.region(Region.US_EAST_1)
.credentialsProvider(StaticCredentialsProvider.create(
AwsBasicCredentials.create("test", "test")))
.build();
// Request a certificate
RequestCertificateResponse response = acm.requestCertificate(req -> req
.domainName("example.com")
.subjectAlternativeNames("www.example.com", "*.example.com")
.validationMethod(ValidationMethod.DNS));
String certArn = response.certificateArn();
// Describe the certificate
DescribeCertificateResponse desc = acm.describeCertificate(req -> req
.certificateArn(certArn));
System.out.println("Status: " + desc.certificate().status());
```