Deleting a file from a bucket is not so easy. The transfer utility does not have replace or delete functions. For this, you can use the provided S3 object. You need to create a delete object request and specify the details for that. Also, you need to configure some other items that would normally be in the config file but in this case, it could get overwritten.
- [Narrator] Now that we've deleted the item,…assuming if it's successful,…let's delete the file as well.…So we'll say, "if success equal, equal true,"…then we're going to call deleteFile…and we'll pass in as the name the objects,…indexPath.row,…and get the imageName from that.…We'll put a self in front,…and now we have to define this function.…So, at the very bottom of the file,…we'll add a new function on line 292,…func deleteFile and take the name as a string.…
Now, we're going to have to do a little bit more configuration…in here, because we can't manually do it…in the awsconfiguration.json file,…that might get overwritten.…It's also good to get an idea of how this is done.…So on line 293, we're going to say,…"let credentials Provider…"equal AWSCognito,…"Creditial Provider."…And, we'll instantiate that with the Region Type…of USEast1…and the identityPool string that we'll fill in…in just a minute.…
Then we're going to create a configuration.…So on line 294, we'll say "let conf equal AWS…"Service Configuration," and we'll create that…
- Working with the Amplify toolchain
- Creating a React app
- Adding analytics to a React app with Amplify
- User authentication via AWS
- Using Amplify to simplify account creation and management
- Creating a GraphQL API
- Storing files online
Skill Level Intermediate
AWS API Gateway with HTTP, Lambda, DynamoDB, and iOSwith Bear Cahill1h 33m Intermediate
1. AWS Amplify Overview
2. Amplified React App
3. Mobile App Features
4. Serverless Back End
5. Storing Files Online
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.