Skip to content

Commit

Permalink
Removes the explicit user data cleanup since that's taken care of by …
Browse files Browse the repository at this point in the history
…the stack.
  • Loading branch information
beqqrry-aws authored and cpyle0819 committed Nov 18, 2024
1 parent bfec18b commit 28b1275
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 42 deletions.
18 changes: 0 additions & 18 deletions php/example_code/s3/S3ExpressBasics.php
Original file line number Diff line number Diff line change
Expand Up @@ -328,24 +328,6 @@ public function cleanUp()
unset($this->resources['stackName']);
}

// delete User data
if(isset($this->resources['regularKey'])) {
$this->iamService->deleteAccessKey($this->resources['regularKey'], $this->resources['regularUserName']);
unset($this->resources['regularKey']);
}
if(isset($this->resources['regularUserName'])) {
$this->iamService->deleteUser($this->resources['regularUserName']);
unset($this->resources['regularUserName']);
}
if(isset($this->resources['expressKey'])) {
$this->iamService->deleteAccessKey($this->resources['expressKey'], $this->resources['expressUserName']);
unset($this->resources['expressKey']);
}
if(isset($this->resources['expressUserName'])) {
$this->iamService->deleteUser($this->resources['expressUserName']);
unset($this->resources['expressUserName']);
}

// delete all the objects in both buckets
if(isset($this->resources['objectKey'])){
$this->s3Service->deleteObject($this->resources['directoryBucketName'], $this->resources['objectKey']);
Expand Down
48 changes: 24 additions & 24 deletions php/example_code/s3/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 28b1275

Please sign in to comment.