aws-doc-sdk-examples

module
v0.0.0-...-d143327 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 24, 2023 License: Apache-2.0

README

Build Status GitHub Super-Linter []

AWS SDK Code Examples

This repository contains code examples that demonstrate how to use the AWSK SDKs to interact with AWS services.

Many examples are injected into the AWS Documentation.

How this repository is organized

Code examples for each language's SDK can be found within the following subdirectories. The examples here demonstrate the most common uses of the SDK for each language.

SDK folder SDK version
.NET dotnetv3/ 3.5+
.NET dotnet/ <3.5
C++ cpp/ 1
Go gov2/ 2
Go go/ 1
Java javav2/ 2
Java java/ 1
JavaScript javascriptv3/ 3
JavaScript javascript/ 2
Kotlin kotlin/ preview
PHP php/ 3
Python python/ 3
Ruby ruby/ 3
Rust rustv1/ preview
Swift swift/ preview

Within each directory, you will find SDK-specific instructions for understanding and invoking example code.

Additional directories
directory purpose usage
/applications Contains the non-language-specific components of example applications, which show how the SDKs can be used in the context of a production-like application. To view the language-specific components for each example application, see the cross-service folder in the sub-directory for your desired language (such as python/cross-service).
/test Contains all components supporting the custom test automation framework used to routinely test the code in this repository. Deploys to AWS as a polyglot container-based integration testing solution. WARNING: Still under active construction as of 2023.
/resources Contains shared components used by many code examples across this repository. Deploys as frontend (/clients) or backend (/cdk or /cfn) components.

Invoke example code

To invoke this example code, you must have an AWS account. For more information about creating an account, see AWS Free Tier.

You must also have AWS credentials configured. For steps on using the AWS Command Line Interface (AWS CLI) to configure credentials, see CLI Configuration basics

⚠️ Usage disclaimer

These code examples interact with services that may incur charges to your AWS account. For more information, see AWS Pricing.

Additionally, example code might theoretically modify or delete existing AWS resources. As a matter of due diligence, do the following:

  • Be aware of the resources that these examples create or delete.
  • Be aware of the costs that might be charged to your account as a result.
  • Back up your important data.

Contributing

This repository thrives on your contributions! ❤️ To get involved, see the CONTRIBUTING.md. 🙏

All content in this repository, unless otherwise stated, is Copyright © Amazon Web Services, Inc. or its affiliates. All rights reserved.

Except where otherwise noted, all examples in this collection are licensed under the Apache license, version 2.0 (the "License"). The full license text is provided in the LICENSE file accompanying this repository.

Directories

Path Synopsis
go
cloudtrail command
cloudwatch/CreateCustomMetric command
Copyright Amazon.com, Inc.
Copyright Amazon.com, Inc.
cloudwatch/CreateRole command
Copyright Amazon.com, Inc.
Copyright Amazon.com, Inc.
cloudwatch/CreateRule command
Copyright Amazon.com, Inc.
Copyright Amazon.com, Inc.
cloudwatch/CreateTarget command
Copyright Amazon.com, Inc.
Copyright Amazon.com, Inc.
cloudwatch/DeleteAlarm command
Copyright Amazon.com, Inc.
Copyright Amazon.com, Inc.
cloudwatch/DescribeAlarms command
Copyright Amazon.com, Inc.
Copyright Amazon.com, Inc.
cloudwatch/DisableAlarm command
Copyright Amazon.com, Inc.
Copyright Amazon.com, Inc.
cloudwatch/EnableAlarm command
Copyright Amazon.com, Inc.
Copyright Amazon.com, Inc.
cloudwatch/GetLogEvents command
Copyright Amazon.com, Inc.
Copyright Amazon.com, Inc.
cloudwatch/Lambda command
snippet-start:[cloudwatch.go.lambda_main]
snippet-start:[cloudwatch.go.lambda_main]
cloudwatch/ListMetrics command
Copyright Amazon.com, Inc.
Copyright Amazon.com, Inc.
cloudwatch/SendEvent command
Copyright Amazon.com, Inc.
Copyright Amazon.com, Inc.
ec2/CreateImage command
example_code/cloudformation command
Copyright Amazon.com, Inc.
Copyright Amazon.com, Inc.
example_code/cloudtrail command
snippet-comment:[These are tags for the AWS doc team's sample catalog.
snippet-comment:[These are tags for the AWS doc team's sample catalog.
example_code/cloudwatch command
snippet-comment:[These are tags for the AWS doc team's sample catalog.
snippet-comment:[These are tags for the AWS doc team's sample catalog.
example_code/cognito command
snippet-comment:[These are tags for the AWS doc team's sample catalog.
snippet-comment:[These are tags for the AWS doc team's sample catalog.
example_code/dynamodb command
snippet-comment:[These are tags for the AWS doc team's sample catalog.
snippet-comment:[These are tags for the AWS doc team's sample catalog.
example_code/ec2 command
snippet-comment:[These are tags for the AWS doc team's sample catalog.
snippet-comment:[These are tags for the AWS doc team's sample catalog.
example_code/extending_sdk command
snippet-comment:[These are tags for the AWS doc team's sample catalog.
snippet-comment:[These are tags for the AWS doc team's sample catalog.
example_code/extending_sdk/ecs command
snippet-comment:[These are tags for the AWS doc team's sample catalog.
snippet-comment:[These are tags for the AWS doc team's sample catalog.
example_code/glacier command
snippet-comment:[These are tags for the AWS doc team's sample catalog.
snippet-comment:[These are tags for the AWS doc team's sample catalog.
example_code/lambda command
snippet-comment:[These are tags for the AWS doc team's sample catalog.
snippet-comment:[These are tags for the AWS doc team's sample catalog.
example_code/rds command
snippet-comment:[These are tags for the AWS doc team's sample catalog.
snippet-comment:[These are tags for the AWS doc team's sample catalog.
example_code/s3 command
snippet-comment:[These are tags for the AWS doc team's sample catalog.
snippet-comment:[These are tags for the AWS doc team's sample catalog.
example_code/s3/delete-buckets-by-prefix command
Copyright Amazon.com, Inc.
Copyright Amazon.com, Inc.
example_code/sns command
snippet-comment:[These are tags for the AWS doc team's sample catalog.
snippet-comment:[These are tags for the AWS doc team's sample catalog.
example_code/sqs command
snippet-comment:[These are tags for the AWS doc team's sample catalog.
snippet-comment:[These are tags for the AWS doc team's sample catalog.
example_code/sts command
snippet-comment:[These are tags for the AWS doc team's sample catalog.
snippet-comment:[These are tags for the AWS doc team's sample catalog.
example_code/workdocs command
snippet-comment:[These are tags for the AWS doc team's sample catalog.
snippet-comment:[These are tags for the AWS doc team's sample catalog.
iam/CreateUser command
iam/DeleteUser command
iam/GetPolicy command
iam/ListAdmins command
iam/ListUsers command
iam/UpdateUser command
kms/CreateKey command
kms/DecryptData command
kms/EncryptData command
lambda/UploadLambdaFunction command
Copyright Amazon.com, Inc.
Copyright Amazon.com, Inc.
s3/CRUD command
snippet-start:[s3.go.crud_ops]
snippet-start:[s3.go.crud_ops]
s3/CopyObject command
Copyright Amazon.com, Inc.
Copyright Amazon.com, Inc.
s3/CreateBucket command
Copyright Amazon.com, Inc.
Copyright Amazon.com, Inc.
s3/CreateBucketAndObject command
Copyright Amazon.com, Inc.
Copyright Amazon.com, Inc.
s3/CustomClient command
Copyright Amazon.com, Inc.
Copyright Amazon.com, Inc.
s3/DeleteBucket command
Copyright Amazon.com, Inc.
Copyright Amazon.com, Inc.
s3/DeleteBucketPolicy command
Copyright Amazon.com, Inc.
Copyright Amazon.com, Inc.
s3/DeleteBucketWebsite command
Copyright Amazon.com, Inc.
Copyright Amazon.com, Inc.
s3/DeleteObject command
Copyright Amazon.com, Inc.
Copyright Amazon.com, Inc.
s3/DeleteObjects command
Copyright Amazon.com, Inc.
Copyright Amazon.com, Inc.
s3/DownloadObject command
snippet-start:[s3.go.download_object]
snippet-start:[s3.go.download_object]
s3/EncryptOnServerWithKms command
Copyright Amazon.com, Inc.
Copyright Amazon.com, Inc.
s3/EnforceMD5 command
Copyright Amazon.com, Inc.
Copyright Amazon.com, Inc.
s3/GeneratePresignedURL command
Copyright Amazon.com, Inc.
Copyright Amazon.com, Inc.
s3/GeneratePresignedURLSpecificPayload command
Copyright Amazon.com, Inc.
Copyright Amazon.com, Inc.
s3/GetBucketAcl command
Copyright Amazon.com, Inc.
Copyright Amazon.com, Inc.
s3/GetBucketPolicy command
Copyright Amazon.com, Inc.
Copyright Amazon.com, Inc.
s3/GetBucketWebsite command
Copyright Amazon.com, Inc.
Copyright Amazon.com, Inc.
s3/GetObjectAcl command
Copyright Amazon.com, Inc.
Copyright Amazon.com, Inc.
s3/ListBuckets command
Copyright Amazon.com, Inc.
Copyright Amazon.com, Inc.
s3/ListObjects command
Copyright Amazon.com, Inc.
Copyright Amazon.com, Inc.
s3/MakeBucketPublic command
Copyright Amazon.com, Inc.
Copyright Amazon.com, Inc.
s3/PutBucketAcl command
Copyright Amazon.com, Inc.
Copyright Amazon.com, Inc.
s3/PutObjectAcl command
Copyright Amazon.com, Inc.
Copyright Amazon.com, Inc.
s3/PutObjectWithSetters command
Copyright Amazon.com, Inc.
Copyright Amazon.com, Inc.
s3/RequireServerEncryption command
Copyright Amazon.com, Inc.
Copyright Amazon.com, Inc.
s3/RestoreObject command
Copyright Amazon.com, Inc.
Copyright Amazon.com, Inc.
s3/SetBucketPolicy command
Copyright Amazon.com, Inc.
Copyright Amazon.com, Inc.
s3/SetBucketWebsite command
Copyright Amazon.com, Inc.
Copyright Amazon.com, Inc.
s3/SetCors command
Copyright Amazon.com, Inc.
Copyright Amazon.com, Inc.
s3/SetDefaultEncryption command
Copyright Amazon.com, Inc.
Copyright Amazon.com, Inc.
s3/TLS command
snippet-comment:[The snippet tags are for the AWS SDK for Go Developer Guide.
snippet-comment:[The snippet tags are for the AWS SDK for Go Developer Guide.
s3/UploadDirectory command
snippet-start:[s3.go.upload_directory]
snippet-start:[s3.go.upload_directory]
s3/UploadObject command
snippet-start:[s3.go.upload_object]
snippet-start:[s3.go.upload_object]
s3/UploadStream command
Copyright Amazon.com, Inc.
Copyright Amazon.com, Inc.
ses/SendMessage command
sns/MakeTopic command
sns/ShowTopics command
sqs/ChangeMsgVisibility command
Copyright Amazon.com, Inc.
Copyright Amazon.com, Inc.
sqs/ConfigureLPQueue command
Copyright Amazon.com, Inc.
Copyright Amazon.com, Inc.
sqs/CreateLPQueue command
Copyright Amazon.com, Inc.
Copyright Amazon.com, Inc.
sqs/CreateQueue command
Copyright Amazon.com, Inc.
Copyright Amazon.com, Inc.
sqs/DeadLetterQueue command
Copyright Amazon.com, Inc.
Copyright Amazon.com, Inc.
sqs/DeleteMessage command
Copyright Amazon.com, Inc.
Copyright Amazon.com, Inc.
sqs/DeleteQueue command
Copyright Amazon.com, Inc.
Copyright Amazon.com, Inc.
sqs/GetQueueURL command
Copyright Amazon.com, Inc.
Copyright Amazon.com, Inc.
sqs/ListQueues command
Copyright Amazon.com, Inc.
Copyright Amazon.com, Inc.
sqs/ReceiveLPMessage command
Copyright Amazon.com, Inc.
Copyright Amazon.com, Inc.
sqs/ReceiveMessage command
Copyright Amazon.com, Inc.
Copyright Amazon.com, Inc.
sqs/SendMessage command
Copyright Amazon.com, Inc.
Copyright Amazon.com, Inc.
sqs/SendReceiveLongPolling command
Copyright Amazon.com, Inc.
Copyright Amazon.com, Inc.
sts/TakeRole command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL