This solution demonstrates simple no-code ingestion approach for batch type of ingestion use cases.
- You have an existing Amazon S3 bucket that's in same Region
where you plan to deploy CloudFormation stack in following steps.
To create an Amazon S3 bucket, please see creating s3 bucket.
- Deploy the
cloudformation-stack.template
CloudFormation Template location in this folder. ForS3BucketName
parameter, enter the S3 bucket name from prerequisites.
For instructions on creating a CloudFormation stack, see initiating stack creation guide using stack template upload a template file. - On deployment complete, open the CloudFormation stack
Outputs
tab.
- Open the link on the
ApiKeyValue
value. ClickShow
to see the API key secret. Paste the value to your notes.
- Back in the CloudFormation stack
Outputs
tab, observe theApiGatewayUrlEndpoint
key. - In the curl command below, replace the variables with values for
ApiGatewayUrlEndpoint
andApiKeyValue
.
curl -X PUT ${ApiGatewayUrlEndpoint}/myfile.json \
-H "x-api-key: ${ApiKeyValue}" \
-H "Content-Type: application/json" \
-d '{"msg": "hello"}'
- Open the S3 bucket, observe new file
myfile.json
. Open the file, observe the data is{"msg": "hello"}
- Delete the CloudFormation Stack.
- (Optional) Delete the file in S3 bucket and the S3 bucket itself.
See CONTRIBUTING for more information.
This library is licensed under the MIT-0 License. See the LICENSE file.