Chapter 3: Building and Deploying a Media Application
Solution for Activity 4: Creating an API to Delete the S3 Bucket
Go to the AWS API Gateway console and in the API created in this chapter, create a Delete API.
Configure the incoming headers and path parameters properly in the Method Request and Integration Request sections.
Your API configuration should look similar to the following screenshot:
Figure 3.37: The DELETE method execution window
Remember to change the authorization of the Delete method from NONE to AWS_IAM.
Click on the Deploy API.
Test the Delete method using the Test Tool (Ready API). Set content-type as application/xml:
Figure 3.38: Output showing the bucket getting deleted
You should see the bucket getting deleted in the AWS S3 console.