aws / aws/chalice

resource ApiGatewayCustomDomainMapping does not support attribute type Arn in Fn::GetAtt

Open
#1,837 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
11.1k
Forks
1k
Avg merge
1d 22h
Merged PRs (30d)
2

Description

I'm wondering if anybody else has seen this error. I decided to make a acm cert, in cdk and reference if like so in the chalice stage config.

```
cdk: 1.132.0 (build 5c75891)
chalice 1.26.0, python 3.9.4, linux 5.11.0-38-generic
```

This is the error, config will follow.
``` ❌ myapp-chalice-api failed: Error: Failed to create ChangeSet cdk-deploy-change-set on myapp-chalice-api: FAILED, Template error: resource ApiGatewayCustomDomainMapping does not support attribute type Arn in Fn::GetAtt
at /home/project_dir/myapp/node_modules/aws-cdk/lib/api/util/cloudformation.ts:229:11
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at waitFor (/home/project_dir/myapp/node_modules/aws-cdk/lib/api/util/cloudformation.ts:190:20)
at Object.waitForChangeSet (/home/project_dir/myapp/node_modules/aws-cdk/lib/api/util/cloudformation.ts:215:15)
at prepareAndExecuteChangeSet (/home/project_dir/myapp/node_modules/aws-cdk/lib/api/deploy-stack.ts:294:32)
at CdkToolkit.deploy (/home/project_dir/myapp/node_modules/aws-cdk/lib/cdk-toolkit.ts:194:24)
at initCommandLine (/home/project_dir/myapp/node_modules/aws-cdk/bin/cdk.ts:267:9)
Failed to create ChangeSet cdk-deploy-change-set on myapp-chalice-api: FAILED, Template error: resource ApiGatewayCustomDomainMapping does not support attribute type Arn in Fn::GetAtt
```

api cert setup

```
self.api_cert = acm.DnsValidatedCertificate(
self,
"apicert",
domain_name=self.api_fqdn,
hosted_zone=self.domain,
)
```

This created just fine.

and in the config dict.

```
...
"api_gateway_custom_domain": {
"domain_name": self.api_fqdn,
"certificate_arn": self.api_cert.certificate_arn,
},
...
```

removing this from the config makes the error go away.

Oh, I also put the cert arn as a static string, i.e. `arn:13234:...certificate` and it threw the same error.

Cheers, and thank you for the wonderful project.

If anybody has a word around, I'd love to hear it.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the failure from the Chalice stage configuration using the api_gateway_custom_domain certificate_arn reference, then inspect the generated CloudFormation and the deployment path mentioned in aws-cdk/lib/api/util/cloudformation.ts and deploy-stack.ts. Done means the generated template no longer requests the unsupported Arn attribute and the stack creates its change set successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, python
Domain
api, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.