go/

directory
v0.0.0-...-406194d Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2025 License: Apache-2.0

README

SDK for Go V1 code examples

Overview

The code examples in this topic show you how to use the AWS SDK for Go V1 with AWS. If you're looking for examples of how to use the SDK for Go V2, see the README for SDK for Go V2 examples in this repo.

⚠️ AWS SDK for Go V1 will enter maintenance mode on July 31, 2024 and reach end-of-support on July 31, 2025. For more information, see this announcement.

The SDK for Go V1 provides a Go API for AWS infrastructure services. Using the SDK, you can build applications on top of Amazon S3, Amazon EC2, Amazon DynamoDB, and more.

Types of code examples

  • Single-service actions - Code examples that show you how to call individual service functions.
Finding code examples

Single-service actions are organized by AWS service. A README in each folder lists and describes how to run the examples.

⚠️ Important

  • Running this code might result in charges to your AWS account.
  • Running the tests might result in charges to your AWS account.
  • We recommend that you grant your code least privilege. At most, grant only the minimum permissions required to perform the task. For more information, see Grant least privilege.
  • This code is not tested in every AWS Region. For more information, see AWS Regional Services.

Run the examples

Prerequisites
Run the code

Each example can be run separately at a command prompt. The README in each service folder has instructions for how to run the examples.

Run the tests

All tests use go test, and you can find them alongside the code in the folder for each example. The README in each service folder has instructions for how to run the examples.

Additional resources


Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.

SPDX-License-Identifier: Apache-2.0

Directories

Path Synopsis
cloudformation
CreateStack command
DeleteStack command
ListStacks command
cloudwatch
CreateRole command
CreateRule command
CreateTarget command
DeleteAlarm command
DescribeAlarms command
DisableAlarm command
EnableAlarm command
GetLogEvents command
Lambda command
ListMetrics command
SendEvent command
codebuild
BuildProject command
ListBuilds command
ListProjects command
dynamodb
CreateTable command
CreateTableItem command
DeleteItem command
GetItem command
ListTables command
LoadTableItems command
ScanItems command
UpdateItem command
ec2
AllocateAddress command
CreateImage command
CreateInstance command
CreateKeyPair command
DeleteKeyPair command
RebootInstances command
RegionsAndZones command
ReleaseAddress command
example_code
cloudformation command
cloudtrail command
cloudwatch command
codebuild command
cognito command
costexplorer command
dynamodb command
ec2 command
extending_sdk command
glacier command
iam command
kms command
lambda command
polly command
rds command
snippet-start:[rds.go.copy_rds_snapshot_to_s3]
snippet-start:[rds.go.copy_rds_snapshot_to_s3]
rekognition command
s3 command
s3/crud command
ses command
sns command
sqs command
sts command
snippet-start:[sts.go.assume_role]
snippet-start:[sts.go.assume_role]
workdocs command
glacier
CreateVault command
UploadArchive command
iam
CreateAccessKey command
CreatePolicy command
CreateUser command
DeleteAccessKey command
DeleteUser command
GetPolicy command
GetPublicKeys command
GetServerCert command
ListAccessKeys command
ListAdmins command
ListServerCerts command
ListUsers command
UpdateAccessKey command
UpdateUser command
kms
CreateKey command
DecryptData command
EncryptData command
ReEncryptData command
lambda
MakeFunction command
RunFunction command
ShowFunctions command
polly
DescribeVoices command
ListLexicons command
rds
ListInstances command
s3
CRUD command
snippet-start:[s3.go.crud_ops]
snippet-start:[s3.go.crud_ops]
CopyObject command
CreateBucket command
CustomClient command
DeleteBucket command
DeleteObject command
DeleteObjects command
DownloadObject command
snippet-start:[s3.go.download_object]
snippet-start:[s3.go.download_object]
EnforceMD5 command
GetBucketAcl command
GetBucketPolicy command
GetObjectAcl command
ListBuckets command
ListObjects command
PutBucketAcl command
PutObjectAcl command
RestoreObject command
SetBucketPolicy command
SetCors command
TLS command
UploadDirectory command
snippet-start:[s3.go.upload_directory]
snippet-start:[s3.go.upload_directory]
UploadObject command
snippet-start:[s3.go.upload_object]
snippet-start:[s3.go.upload_object]
UploadStream command
ses
DeleteAddress command
GetStatistics command
ListAddresses command
SendMessage command
VerifyAddress command
sns
MakeTopic command
PublishMessage command
ShowTopics command
SubscribeTopic command
sqs
CreateLPQueue command
CreateQueue command
DeadLetterQueue command
DeleteMessage command
DeleteQueue command
GetQueueURL command
ListQueues command
ReceiveMessage command
SendMessage command
ssm
DeleteParameter command
GetParameter command
PutParameter command
sts
TakeRole command
workdocs
ShowUsers command
ShowUsersDocs command

Jump to

Keyboard shortcuts

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