aws-cloudformation / aws-cloudformation/custom-resource-helper

Do not send response to CloudFormation when testing with sam local

Open
#54 4 comments 3 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
382
Forks
61
PR merge metrics
No merged PRs in 30d

Description

When testing my custom resource with _sam local_, the resource helper tries to send a response to CloudFormation.

It generates an error since I am using fake information in my request payload.

Example:
```
{
"RequestType": "Create",
"ResponseURL": "http://pre-signed-S3-url-for-response",
"StackId": "arn:aws:cloudformation:us-east-1:123456789012:stack/MyStack/guid",
"RequestId": "unique id for this create request",
"ResourceType": "Custom::TestResource",
"LogicalResourceId": "MyTestResource",
...
```

It would be nice to disable response sending to cfn when testing with _sam local_.

crhelper version: 2.0.10

Contributor guide

Open the contributing guide

Research direction

No file or test is named. Start by locating the custom resource helper's response-sending path and how local SAM requests are represented, then determine how local testing should disable the CloudFormation response. Done means local SAM testing no longer attempts the response and existing response behavior remains unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, python
Domain
cloud
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.