paperduck
paperduck

Reputation: 1195

How to deploy AWS CLI within a project so I can use it programmatically?

I have an existing web application and I want to add S3 functionality to it. I have the aws cli working on my local machine. I can upload files to S3 on the command line.

However, I am having trouble finding documentation about how to encapsulate this and put it into my project repo so I can use it programmatically. For example, I assume I need to add some sort of config file to the project. What about the aws executable? Those sorts of things.

It's a Symfony project (PHP).

Upvotes: 1

Views: 100

Answers (1)

Marcin
Marcin

Reputation: 238687

AWS provides variety of SDKs to work with its services:

Depending on your programming language, you usually use the SDK you require, e.g. in Python or Node.js, in your project. The SDK is also available for PHP.

The configuration aspects depend on where your application is going to be hosted. If it runs on AWS infrastructure, you usually use IAM roles (e.g. instance roles) to provide needed permissions (e.g. to read and write to S3). If it is outside of AWS, you can also use roles through, e.g. web federation.

Upvotes: 4

Related Questions