aws-cloudformation / aws-cloudformation/cloudformation-coverage-roadmap

[Resource Type] - [BUG] -

Open
#2,178 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
No language data
Stars
1.1k
Forks
62
PR merge metrics
No merged PRs in 30d

Description

### Name of the resource

AWS::EC2::SubnetRouteTableAssociation

### Resource Name

_No response_

### Issue Description

GetResource operation sporadically fails on SubnetRouteTableAssociation when the resource was recently created.

Specifically the call sequence looks like this:

```
cc.CreateResource()
while True:
status = cc.GetResourceRequestStatus()
if status.OperationStatus == "SUCCESS":
break
cc.GetResource() # failing
```

Most of the time this works fine, but intermittently this code fails. The impact for my team is that some of the integration tests are flaky.

### Expected Behavior

It is expected that if GetResourceRequestStatus returns a success marker, GetResource should not fail.

### Observed Behavior

GetResource errors with:

```
AWS::EC2::SubnetRouteTableAssociation Handler returned status FAILED: No route tables Found with association rtbassoc-082c838c79cd2c578 (HandlerErrorCode: NotFound, RequestToken: 34ad7106-e65d-4109-ba17-6b9eae30dc82)
```

### Test Cases

N/A

### Other Details

CloudTrail example of a failing GetResource:

```
{
"eventVersion": "1.08",
"userIdentity": null,
"eventTime": "2024-11-07T07:07:25Z",
"eventSource": "cloudcontrolapi.amazonaws.com",
"eventName": "GetResource",
"awsRegion": "us-west-2",
"sourceIPAddress": "52.225.77.97",
"userAgent": "APN/1.0 Pulumi/1.0 PulumiAwsNative/1.6, aws-sdk-go-v2/1.26.1 os/linux lang/go#1.21.13 md/GOOS#linux md/GOARCH#amd64 api/cloudcontrol#1.15.7",
"errorCode": "ResourceNotFoundException",
"errorMessage": "AWS::EC2::SubnetRouteTableAssociation Handler returned status FAILED: No route tables Found with association rtbassoc-082c838c79cd2c578 (HandlerErrorCode: NotFound, RequestToken: 34ad7106-e65d-4109-ba17-6b9eae30dc82)",
"requestParameters": {
"typeName": "AWS::EC2::SubnetRouteTableAssociation",
"identifier": "rtbassoc-082c838c79cd2c578"
},
"responseElements": null,
"requestID": "64019c27-6f64-48c8-974c-55842b382035",
"eventID": "063a708e-2e52-47fa-9c13-5195510f5732",
"readOnly": true,
"eventType": "AwsApiCall",
"managementEvent": true,
"recipientAccountId": "894850187425",
"eventCategory": "Management",
"tlsDetails": {
"clientProvidedHostHeader": "cloudcontrolapi.us-west-2.amazonaws.com"
}
}

```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.