AWS - S3 Sync your Webhooks to S3
The following Steps shows you how to securely store your webhook data in an Amazon S3 bucket using Dehook, ensuring your data's safety and accessibility.
Set up a Webhook in Dehook
- Log in to your Dehook account.
- Create or select the app that will receive your webhooks.
- Add a new webhook.
- Configure the webhook's URL, Name, and Security settings (like Body HMAC for verification).
- Initially, you can forward these webhooks to a simple API endpoint for testing.
Add an S3 Connection in Dehook
- Navigate to the 'Webhooks' section of your Dehook app.
- Click "Add Connection".
- Choose "AWS S3 Bucket" as your destination.
- Provide the following details:
- Name: A descriptive name for the connection (e.g., "[Your App] Webhooks to S3").
- Bucket Name: The exact name of your S3 bucket.
- Path Root: The directory within your bucket where you want to store the webhook data (e.g., "[your-app]-webhooks").
- Region: The AWS region where your S3 bucket is located.
Set up an IAM Role in AWS
- Open the AWS Management Console.
- Go to the IAM (Identity and Access Management) service.
- Click on "Roles".
- Click "Create Role".
- Select "Another AWS account" as the trusted entity type.
- Enter Dehook's Account ID (provided in the Dehook S3 connection setup).
- Check the box "Require external ID" for enhanced security. Enter a unique external ID (for example a UUIDV4
"a86dab1d-1d0c-4d98-9004-ce89de752ed5"). - Click "Next".
- On the "Add Permissions" page, search for and select the Dehook policy allowing S3 put actions (e.g., "dehook-[your-app]-webhook-bucket-writer"). This policy is pre-configured by Dehook to grant write access only to your specific bucket.
- Click "Next".
- Give your role a name (e.g., "[your-app]-webhook-role").
- Click "Create Role".
Complete Dehook S3 Connection Setup
- Go back to the Dehook S3 connection setup screen.
- Copy the ARN (Amazon Resource Name) of the newly created IAM Role.
- Paste the ARN into the "Role Name" field in Dehook.
- Paste your chosen External ID into the "External ID" field in Dehook.
- Click "Save".
Testing and Verification
- Send a test webhook event to your webhook.
- In Dehook, go to the "Events" section to confirm the webhook was received and successfully delivered to S3.
- Navigate to your S3 bucket in the AWS console and verify that the webhook data is stored within the specified path.
That's it! You have successfully configured Dehook to send your webhook data to Amazon S3, providing a secure and reliable storage solution.**