AmazonWebServices 1.0.1
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package AmazonWebServices --version 1.0.1
NuGet\Install-Package AmazonWebServices -Version 1.0.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="AmazonWebServices" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add AmazonWebServices --version 1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: AmazonWebServices, 1.0.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install AmazonWebServices as a Cake Addin #addin nuget:?package=AmazonWebServices&version=1.0.1 // Install AmazonWebServices as a Cake Tool #tool nuget:?package=AmazonWebServices&version=1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Amazon Web Services
It offers simple yet effective methods for Amazon S3 and Simple Email Service.
Quick Start
The usage of AmazonWebServices is quite simple.
- Install
AmazonWebServices
NuGet package from here.
PM> Install-Package AmazonWebServices
- Add services.AddAmazonWebServices();
builder.Services.AddAmazonWebServices();
- Add the necessary information to the
appsettings.json
file.
"AmazonCredentialOptions": {
"AccessKey": "",
"SecretKey": ""
},
"AmazonS3Options": {
"BucketName": ""
},
"AmazonSESOptions": {
"ConfigurationSetName": "",
"SmtpOptions": {
"Host": "",
"UserName": "",
"Password": ""
}
}
- And start using it. And that's it.
To upload and delete files to Amazon S3. It currently supports these extensions: ".jpeg", ".jpg", ".png", ".pdf", ".svg".
[ApiController]
public class AmazonS3Service : ControllerBase
{
private readonly IAmazonS3Service _amazonS3Service;
public AmazonS3Service(IAmazonS3Service amazonS3Service)
{
_amazonS3Service = amazonS3Service;
}
[Consumes("multipart/form-data")]
[Produces("multipart/form-data", "application/json")]
[HttpPost("upload")]
public async Task<IActionResult> Upload([FromForm] IFormFile file, [FromQuery] string folderName, [FromQuery] string fileName)
{
var uploadedFileName = await _amazonS3Service.UploadAsync(new UploadObjectRequest
{
File = file,
FileName = fileName,
FolderName = folderName
});
return Ok(uploadedFileName);
}
[Consumes("application/json")]
[Produces("application/json", "text/plain")]
[HttpPost("delete")]
public async Task<IActionResult> Delete([FromQuery] string folderName, [FromQuery] string fileName)
{
await _amazonS3Service.DeleteAsync(fileName, folderName);
return Ok();
}
}
To send emails with Amazon SES.
[ApiController]
public class AmazonSesServiceController : ControllerBase
{
private readonly IAmazonSesService _amazonSesService;
public AmazonSesServiceController(IAmazonSesService amazonSesService)
{
_amazonSesService = amazonSesService;
}
[Consumes("application/json")]
[Produces("application/json", "text/plain")]
[HttpPost("/sendEmail")]
public async Task<IActionResult> SendEmail(SendEmailRequest sendEmailRequest)
{
await _amazonSesService.SendEMail(sendEmailRequest);
return Ok();
}
[Consumes("multipart/form-data")]
[Produces("multipart/form-data", "application/json")]
[HttpPost("/sendSmtpEmail")]
public async Task<IActionResult> SendSmtpEmail(SendSmtpEmailRequest sendSmtpEmailRequest)
{
await _amazonSesService.SendSmtpEMail(sendSmtpEmailRequest);
return Ok();
}
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net7.0
- AWSSDK.S3 (>= 3.7.203.15)
- AWSSDK.SimpleEmail (>= 3.7.200.40)
- CsQuery.NETStandard (>= 1.3.6.1)
- Microsoft.Extensions.Configuration.Binder (>= 7.0.4)
- Microsoft.Extensions.DependencyInjection (>= 7.0.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on AmazonWebServices:
Package | Downloads |
---|---|
SqlBackupToS3
It backs up the MSSQL database you specify, compresses it into zip and backs it up to aws s3. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated | |
---|---|---|---|
2.1.4 | 507 | 6/28/2024 | |
2.1.3 | 376 | 5/25/2024 | |
2.1.2 | 695 | 2/27/2024 | |
2.1.1 | 223 | 1/22/2024 | |
2.1.0.1 | 121 | 1/22/2024 | |
2.1.0 | 328 | 12/16/2023 | |
2.0.0 | 140 | 12/15/2023 | |
1.1.1 | 116 | 12/7/2023 | |
1.1.0 | 139 | 12/2/2023 | |
1.0.4 | 283 | 10/26/2023 | |
1.0.3.1 | 88 | 10/23/2023 | |
1.0.3 | 120 | 9/29/2023 | |
1.0.2 | 108 | 9/21/2023 | |
1.0.1 | 97 | 9/15/2023 | |
1.0.0 | 117 | 9/13/2023 |